Skip to content

Commit

Permalink
v1.3.6 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelwatt committed Apr 8, 2022
1 parent ce66245 commit 79d72f6
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 13 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 1.3.6

Changes:
* ( build/ ) Now pointing to v1.3.6 commit
* Implemented Method v1.3.6 revisions to njk templates (see release notes: https://github.com/pixelwatt/method/blob/v1.3.6/CHANGELOG)
* Added ability to specify theme license (by way of Velpeo's pull request), and added to style.css
* Changed the theme_license global to "GNU General Public License v2 or later" (mirroring Automattic)
* Added new bool to globals: require_method_alerts (if true, the custom theme build will require Method Alerts to be installed - https://github.com/pixelwatt/method-alerts)
* Added new bool to globals: require_elliston (if true, the custom theme build will require Elliston to be installed - https://github.com/theboldagency/elliston)

---

## 1.3.5

Changes:
Expand Down
2 changes: 1 addition & 1 deletion build
12 changes: 3 additions & 9 deletions njk/assets/lib/cmb2-metaboxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
add_action( 'cmb2_admin_init', '{{globals.code_prefix}}register_page_front_metabox' );

function {{globals.code_prefix}}register_page_front_metabox() {
$prefix = '_{{globals.code_prefix}}';

$cmb_options = new_cmb2_box(
array(
'id' => $prefix . 'metabox_page_front',
'id' => '_{{globals.code_prefix}}metabox_page_front',
'title' => esc_html__( 'Front Page Options', 'cmb2' ),
'object_types' => array( 'page' ),
'show_on' => array(
Expand All @@ -36,11 +34,9 @@ function {{globals.code_prefix}}register_page_front_metabox() {
add_action( 'cmb2_admin_init', '{{globals.code_prefix}}register_page_default_metabox' );

function {{globals.code_prefix}}register_page_default_metabox() {
$prefix = '_{{globals.code_prefix}}';

$cmb_options = new_cmb2_box(
array(
'id' => $prefix . 'metabox_page_default',
'id' => '_{{globals.code_prefix}}metabox_page_default',
'title' => esc_html__( 'Additional Options', 'cmb2' ),
'object_types' => array( 'page' ),
'show_on' => array(
Expand All @@ -60,11 +56,9 @@ function {{globals.code_prefix}}register_page_default_metabox() {
add_action( 'cmb2_admin_init', '{{globals.code_prefix}}register_page_template_tmpname_metabox' );
function {{globals.code_prefix}}register_page_template_tmpname_metabox() {
$prefix = '_{{globals.code_prefix}}';
$cmb_options = new_cmb2_box(
array(
'id' => $prefix . 'metabox_page_template_tmpname',
'id' => '_{{globals.code_prefix}}metabox_page_template_tmpname',
'title' => esc_html__( 'Template Options', 'cmb2' ),
'object_types' => array( 'page' ),
'priority' => 'high',
Expand Down
22 changes: 22 additions & 0 deletions njk/assets/lib/helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,28 @@ function {{globals.code_prefix}}get_term_array( $tax, $none = '' ) {
}


//-----------------------------------------------------
// Get an array of nav menus created in the menu editor
//-----------------------------------------------------

function {{globals.code_prefix}}get_menus_array() {
$menus = get_terms( 'nav_menu', array( 'hide_empty' => true ) );
$output = array();

if ( ! empty( $menus ) ) {
foreach ( $menus as $menu ) {
$output[ $menu->term_id ] = $menu->name;
}
}

return $output;
}


//-----------------------------------------------------
// Additional utility functions
//-----------------------------------------------------

function {{globals.code_prefix}}str_replace_assoc( array $replace, $subject ) {
return str_replace( array_keys( $replace ), array_values( $replace ), $subject );
}
Expand Down
12 changes: 12 additions & 0 deletions njk/assets/lib/theme-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,18 @@ function {{globals.code_prefix}}register_required_plugins() {
'slug' => 'cmb2-mapbox',
'source' => 'https://github.com/pixelwatt/cmb2-mapbox/archive/master.zip',
'required' => true,
),{% endif %}{% if globals.require_method_alerts %}
array(
'name' => 'Method Alerts',
'slug' => 'method-alerts',
'source' => 'https://github.com/pixelwatt/method-alerts/archive/main.zip',
'required' => true,
),{% endif %}{% if globals.require_elliston %}
array(
'name' => 'Elliston',
'slug' => 'elliston',
'source' => 'https://github.com/theboldagency/elliston/archive/master.zip',
'required' => true,
),{% endif %}

);
Expand Down
1 change: 1 addition & 0 deletions njk/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Theme Name: {{globals.theme_name}}
Theme URI: {{globals.theme_uri}}
Description: {{globals.theme_description}}
Version: {{globals.theme_version}}
License: {{globals.theme_license}},
Author: {{globals.theme_author}}
Author URI: {{globals.theme_author_uri}}
Tags: {{globals.theme_tags}}
Expand Down
8 changes: 5 additions & 3 deletions njk/templates/_globals-defaults.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
{% set theme_name = "Method" %}
{% set theme_uri = "https://github.com/pixelwatt/method" %}
{% set theme_description = "A barebones foundation for custom theme development." %}
{% set theme_version = "1.3.5" %}
{% set theme_license = "LGPL" %}
{% set theme_version = "1.3.6" %}
{% set theme_license = "GNU General Public License v2 or later" %}
{% set theme_author = "Rob Clark" %}
{% set theme_author_uri = "https://robclark.io/" %}
{% set theme_tags = "CMB2, Bootstrap 5" %}
Expand Down Expand Up @@ -41,7 +41,7 @@
{# ---------------------------------------------------------------- #}

{% set image_sizes = [
{ name: "header_bg", width: 1400, height: 600, cropped: true }
{ name: "method_1400_600", width: 1400, height: 600, cropped: true }
] %}


Expand All @@ -54,6 +54,8 @@
{% set require_github_updater = false %}
{% set require_cmb2_roadway_segments = false %}
{% set require_cmb2_mapbox = false %}
{% set require_method_alerts = false %}
{% set require_elliston = false %}


{# ---------------------------------------------------------------- #}
Expand Down

0 comments on commit 79d72f6

Please sign in to comment.