Skip to content

Commit

Permalink
Method v1.4.3 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
theboldagency committed Nov 29, 2023
1 parent 844c076 commit 60278b2
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.4.3

Changes:
* ( build/ ) Updated to Method v1.4.3

---

## 1.4.2

Changes:
Expand Down
2 changes: 1 addition & 1 deletion build
Submodule build updated 1907 files
4 changes: 3 additions & 1 deletion njk/assets/lib/theme-customization.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,15 @@ function {{globals.code_prefix}}register_theme_options_metabox() {
'desc' => __( 'Which service are you adding a link for?', '{{globals.code_textdomain}}' ),
'options' => array(
'facebook' => esc_attr__( 'Facebook', '{{globals.code_textdomain}}' ),
'twitter' => esc_attr__( 'Twitter', '{{globals.code_textdomain}}' ),
'twitter' => esc_attr__( 'Twitter (X)', '{{globals.code_textdomain}}' ),
'linkedin' => esc_attr__( 'LinkedIn', '{{globals.code_textdomain}}' ),
'instagram' => esc_attr__( 'Instagram', '{{globals.code_textdomain}}' ),
'pinterest' => esc_attr__( 'Pinterest', '{{globals.code_textdomain}}' ),
'youtube' => esc_attr__( 'YouTube', '{{globals.code_textdomain}}' ),
'twitch' => esc_attr__( 'Twitch', '{{globals.code_textdomain}}' ),
'tiktok' => esc_attr__( 'TikTok', '{{globals.code_textdomain}}' ),
'threads' => esc_attr__( 'Threads', '{{globals.code_textdomain}}' ),
'bluesky' => esc_attr__( 'Bluesky', '{{globals.code_textdomain}}' ),
),
)
);
Expand Down
60 changes: 60 additions & 0 deletions njk/assets/lib/theme-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ function {{globals.code_prefix}}register_required_plugins() {
'slug' => 'method-podcast',
'source' => 'https://github.com/pixelwatt/method-podcast/archive/main.zip',
'required' => true,
),{% endif %}{% if globals.require_method_people_grid %}
array(
'name' => 'Method People Grid',
'slug' => 'method-people-grid',
'source' => 'https://github.com/pixelwatt/method-people-grid/archive/main.zip',
'required' => true,
),{% endif %}{% if globals.require_elliston %}
array(
'name' => 'Elliston',
Expand All @@ -161,4 +167,58 @@ function {{globals.code_prefix}}register_required_plugins() {

tgmpa( $plugins, $config );
}


//-----------------------------------------------------
// Function for conditionally enabling the block editor
// for specific posts. Uncomment and modify as needed.
//-----------------------------------------------------
/*
function {{globals.code_prefix}}enable_block_editor_for_post( $use_block_editor, $post ) {
$output = false;
$id = $post->ID;
$pt = get_post_type( $id );
if ( 'page' == $pt ) {
$template = get_post_meta( $id, '_wp_page_template', true );
if ( 'templates/page-template-mytemplate.php' == $template ) {
$output = true;
}
}
return $output;
}
add_filter( 'use_block_editor_for_post', '{{globals.code_prefix}}enable_block_editor_for_post', 10, 2 );
*/


//-----------------------------------------------------
// Function for condigitally suppressing specific
// WordPress features, mainly the editor. Uncomment
// and modify as needed.
//-----------------------------------------------------
/*
function {{globals.code_prefix}}remove_editor() {
if ( isset( $_GET['post'] ) ) {
$id = $_GET['post'];
$pt = get_post_type( $id );
if ( 'page' == $pt ) {
$template = get_post_meta( $id, '_wp_page_template', true );
$front_page = get_option( 'page_on_front' );
if ( $id == $front_page ) {
remove_post_type_support( 'page', 'editor' );
}
switch ( $template ) {
case 'templates/page-template-gateway.php':
remove_post_type_support( 'page', 'editor' );
break;
default:
# code...
break;
}
}
}
return;
}
add_action( 'init', '{{globals.code_prefix}}remove_editor' );
*/
{% endblock %}
3 changes: 2 additions & 1 deletion njk/templates/_globals-defaults.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{% 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.4.1" %}
{% set theme_version = "1.4.3" %}
{% set theme_license = "GNU General Public License v2 or later" %}
{% set theme_author = "Rob Clark" %}
{% set theme_author_uri = "https://robclark.io/" %}
Expand Down Expand Up @@ -67,6 +67,7 @@
{% set require_method_alerts = false %}
{% set require_method_gallery = false %}
{% set require_method_podcast = false %}
{% set require_method_people_grid = false %}
{% set require_elliston = false %}


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "method-generator",
"version": "1.4.2",
"version": "1.4.3",
"description": "This project allows you to rapidly create custom builds of the Method theme using Gulp and Nunjucks.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 60278b2

Please sign in to comment.