WordPress 5.6 New Features: New UI for Auto-Updates
WordPress 5.6 introduces a new UI to allow website administrators to opt-in to major versions automatic updates.
This feature follows plugins and themes auto-updates user interface which was shipped in WordPress 5.5. Both are part of the 9 WordPress Core projects for 2019-2020.
How does it look?
The core auto-updates feature already exists for years in WordPress. WP 5.6 only introduces a new user interface to make it easier to opt-in to automatic updates for major versions.
By default, WordPress auto-updates itself, but only for minor releases. Developers can already opt-in to major releases auto-updates by setting up the existing WP_AUTO_UPDATE_CORE
constant to true
or by using the allow_major_auto_core_updates
existing filter.
With WordPress 5.6, it’s possible for website administrators to opt-in/out to automatic updates for major versions, using a specific interface located on the Updates screen:
How does it work?
This settings section basically adds a checkbox to allow administrators to opt-in to major core auto-updates. But it also checks for any existing constant or filter to see if the checkbox should be checked or not by default, using the following order:
- By default, the checkbox is unchecked.
- If
get_site_option( 'auto_update_core_major' )
returns true, the checkbox is checked. Otherwise, it’s unchecked. This option is the one stored in the database when the checkbox value is changed. - If
WP_AUTO_UPDATE_CORE
constant returnstrue
,beta
orrc
, the checkbox is checked. If the constant returnsfalse
,minor
or is not defined, the checkbox is unchecked. If this constant is set, it overrides the above parameters. - If
allow_major_auto_core_updates
filter returnstrue
, the checkbox is checked. If the filter returnsfalse
or is not used, the checkbox is unchecked. If this filter is used, it overrides the above parameters.
To disable the checkbox by default, developers can set the WP_AUTO_UPDATE_CORE
to false
(to disable all auto-updates) or minor
(to enable only minor core auto-updates, which is the default behavior). It has to be done using the wp-config.php
file.
Developers can alternatively use the allow_major_auto_core_updates
filter to set up core major versions auto-updates to true
or false
by default. Example:
1
|
add_filter( 'allow_major_auto_core_updates' , '_return_false' ); |
How to extend core major versions auto-updates feature?
The feature also checks for dev
(development versions of WordPress) and for minor
updates. There is an action hook running right before the submit button of that settings section to add some options if needed. Using the after_core_auto_updates_settings_fields
action hook, developers can add other settings or texts.
For example, the following snippet adds an option to opt-in/out for minor releases auto-updates:
function
my_plugin_after_core_auto_updates_settings_fields(
$auto_update_settings
) {
if
( isset(
$_POST
[
'core-auto-updates-settings'
] ) && wp_verify_nonce(
$_POST
[
'set_core_auto_updates_settings'
],
'core-auto-updates-nonce'
) ) {
if
( isset(
$_POST
[
'my-plugin-core-auto-updates-minor'
] ) && 1 === (int)
$_POST
[
'my-plugin-core-auto-updates-minor'
] ) {
update_site_option(
'my_plugin_auto_update_core_minor'
, 1 );
}
else
{
update_site_option(
'my_plugin_auto_update_core_minor'
, 0 );
}
}
$minor_auto_updates_settings
= get_site_option(
'my_plugin_auto_update_core_minor'
);
?>
<p>
<input type=
"checkbox"
name=
"my-plugin-core-auto-updates-minor"
id=
"my-plugin-core-auto-updates-minor"
value=
"1"
<?php checked(
$minor_auto_updates_settings
, 1 ); ?> />
<label
for
=
"my-plugin-core-auto-updates-minor"
>
<?php _e(
'Automatically keep this site up-to-date with minor updates.'
,
'my-plugin'
); ?>
</label>
</p>
<?php
}
add_action(
'after_core_auto_updates_settings_fields'
,
'my_plugin_after_core_auto_updates_settings_fields'
, 10, 1 );
This snippet adds a new option right after the major releases option:
WordPress 5.6 Roadmap:
- October 20, 2020: WordPress 5.6 Beta 1 release
- October 27, 2020: WordPress 5.6 Beta 2 release
- November 2, 2020: WordPress 5.6 Beta 3 release
- November 10, 2020: WordPress 5.6 Beta 4 release
- November 17, 2020: Release WordPress 5.6 candidate 1
- December 1, 2020: Release WordPress 5.6 candidate 2
- December 7, 2020: WordPress 5.6 dry run
- December 8, 2020: WordPress 5.6 Release Date
Wrapping Up
Above are the latest features of WordPress 5.6. Our team has been updating our WordPress themes to support this version. Please stay tuned!
See Our Best-selling WordPress Themes 2020:
Below are our best-selling WordPress themes 2020 compatible with WordPress 5.5.x.
BROWSE ALL WORDPRESS THEMES
See our theme collections:
- See Best Elementor WooCommerce WordPress Themes 2020
- See Best-selling WordPress themes on Themeforest 2020
- See Best free and premium WordPress themes 2020
- See Best multi-vendor marketplace WordPress themes 2020
- See 12+ Best Auto Parts Shop WordPress Themes 2020
- See 15+ Best Clothing & Fashion Shop WordPress Themes 2020
- See 20+ Best Electronics Store WooCommerce Themes 2020
- See 15+ Best Selling Furniture Store WordPress Themes 2020
Our Support Help Desks:
Documentation: Find documentation for themes and frequently asked question on our Documentation channel wpthemego.com/document
Forum Support: Join our public WPThemeGo Community at forum.wpthemego.com to find the frequently asked questions, post your problem and get support to solve it.
Ticket System: Submit a ticket about your problem on WPThemeGo Support at support.wpthemego.com to get help from the support team. All your information will be kept confidential.
Email Support: Contact us via email for presale questions about our themes and other questions via contact@wpthemego.com.
Leave Your Comment