Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for Genesis 2.9 ... 3.0.3 ... 3.1.2 #15

Open
bobbingwide opened this issue Mar 18, 2019 · 4 comments
Open

Update for Genesis 2.9 ... 3.0.3 ... 3.1.2 #15

bobbingwide opened this issue Mar 18, 2019 · 4 comments
Assignees

Comments

@bobbingwide
Copy link
Owner

Update dependency on Genesis to 2.9.0 and take improvements into account.
e.g. Remove the need to set CHILD_THEME_ constant(s)... if appropriate.

@bobbingwide
Copy link
Owner Author

Genesis v3.0.3 was released recently. Can we now update the theme to work with Genesis 3.0.3? Does this mean applying the latest genesis-sample?

@bobbingwide bobbingwide changed the title Update for Genesis 2.9 Update for Genesis 2.9 ... 3.0.3 Aug 7, 2019
@bobbingwide bobbingwide changed the title Update for Genesis 2.9 ... 3.0.3 Update for Genesis 2.9 ... 3.0.3 .. 3.1.2 Sep 29, 2019
@bobbingwide bobbingwide changed the title Update for Genesis 2.9 ... 3.0.3 .. 3.1.2 Update for Genesis 2.9 ... 3.0.3 ... 3.1.2 Sep 29, 2019
@bobbingwide
Copy link
Owner Author

bobbingwide commented Sep 29, 2019

Genesis 3.1.0 was released on 21st August 2019. We now need to support the latest version: 3.1.2
This includes making a change for the deprecated filter genesis_footer_creds_text. Use genesis_pre_get_option_footer_text. See also bobbingwide/genesis-SB#18

@bobbingwide
Copy link
Owner Author

How it once was...

In genesis-a2z, after updating to use v3.1.0 of the Genesis theme framework there were still 4 CHILD_THEME_* constants in functions.php This table summarised their usage.

Constant Value / Example Usage
CHILD_THEME_NAME 'Genesis a2z' Used by Genesis to construct CHILD_THEME_HANDLE
CHILD_THEME_URL 'https://www.oik-plugins.com/oik-themes/genesis-a2z' Unused?
CHILD_THEME_VERSION wp_get_theme()->get( 'Version' ) Used by genesis_get_theme_version()
CHILD_THEME_HANDLE sanitize_title_with_dashes( wp_get_theme()->get( 'Name' ) Used generating inline styles

Note: For bespoke child themes that are delivered from bobbingwide.com the child theme URL should be of the form https://www.bobbingwide.com/blog/oik-themes/theme_name.

What it should be

It would appear that none of the above is necessary with Genesis 3.1.0
The values are automagically determined by the framework from the style.css file.

Constant| Style.css line used | Example
------------- |
CHILD_THEME_NAME | Theme Name: | Genesis a2z
CHILD_THEME_URL | Theme URI: | https://www.oik-plugins.com/oik-themes/genesis-a2z
CHILD_THEME_VERSION | Version: or, if SCRIPT_DEBUG is true the current timestamp | 2.0.0
CHILD_THEME_HANDLE | n/a | genesis_get_theme_handle()

So it would appear that none of this logic is necessary any more.

//* Child theme (do not remove) 
define( 'CHILD_THEME_NAME', 'Genesis a2z' );
define( 'CHILD_THEME_URL', 'https://www.oik-plugins.com/oik-themes/genesis-a2z' );
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
	$timestamp = filemtime( get_stylesheet_directory() . "/style.css" );
	define( 'CHILD_THEME_VERSION', $timestamp );
} else { 
	//define( 'CHILD_THEME_VERSION', '1.3.0' );
	define( 'CHILD_THEME_VERSION', wp_get_theme()->get( 'Version' ) );
}
// Defines constants to help enqueue scripts and styles.
define( 'CHILD_THEME_HANDLE', sanitize_title_with_dashes( wp_get_theme()->get( 'Name' ) ) );

@bobbingwide
Copy link
Owner Author

OK. So Genesis is 3.2.1 now. Anything else we need to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant