Genesis 3.6.0 is now available. It includes fixes for deprecation notices seen on sites running PHP 8.2+ and WordPress 6.7+.
How to update
Existing Genesis users will see an update prompt in the WordPress admin area.
If the update prompt is missing, check that you are running WordPress 5.0+, PHP 5.6+, are using a Genesis HTML5 child theme, and have enabled update notifications at Genesis → Theme Settings → Updates.
Child theme and plugin updates
If you update to Genesis 3.6.0 and still see fresh deprecation notices in your logs from Genesis, check your child theme and plugin versions too. These updated Genesis child themes and plugins include additional fixes for deprecation warnings:
- Genesis Blocks 3.1.7
- Genesis Sample 3.4.3
- Altitude Pro 1.5.2
- Essence Pro 1.5.3
- Navigation Pro 1.2.2
Update Genesis Blocks from Dashboard → Updates. For child theme updates, log in to your StudioPress or WP Engine account to find new downloads, then check information on child theme updates in StudioPress docs or child theme updates in WP Engine docs.
What’s changed
The Genesis changelog mentions fixes for two PHP notices:
- A
_doing_it_wrong()
notice, or multiple when using WordPress in a non-US English locale. - A notice some may have seen when using the Customizer:
PHP Deprecated: str_contains(): Passing null to parameter #1 ($haystack) of type string is deprecated
For developers
We recommend these actions for Genesis theme and plugin developers to help your users avoid deprecation notices:
- If you call the
genesis_responsive_menus()
function in your theme’sfunctions.php
or plugin file root without a hook, move it to theafter_setup_theme
hook. This prevents a “doing it wrong” notice about attempting to load menu translations too early. See PR 412 in Genesis Sample for an example of this change. - If your theme currently uses the
config/layouts.php
file to register or override Genesis layouts, we recommend that you:- Remove any translation functions from that file such as
__()
, replacing them with plain text strings, such as the layout slug or English version. - Add a
config/layouts-labels.php
file with the translated text label. This file will be loaded later to prevent translation notices. See the updated Genesis layout docs for an example.
- Remove any translation functions from that file such as
- For help tracking down the source of a “doing it wrong” translation notice, the Query Monitor plugin can be helpful.
- Check the Make WordPress blog post on internationalization in WordPress 6.7 for background information around these changes.