WP_Site_Health_Auto_Updates::test_accepts_minor_updates() WordPress Method
The WP_Site_Health_Auto_Updates::test_accepts_minor_updates() method is used to check whether a WordPress site is configured to accept minor updates. Minor updates to WordPress are released on a regular basis and typically include security and bug fixes. By default, WordPress sites are configured to automatically install minor updates, but some site owners may choose to disable this feature. This test will check the site's current settings and let you know if minor updates are being accepted or not. If minor updates are not being accepted, we recommend that you enable this feature to keep your site up-to-date and secure.
WP_Site_Health_Auto_Updates::test_accepts_minor_updates() #
Check if the site supports automatic minor updates.
Return
(array) The test results.
Source
File: wp-admin/includes/class-wp-site-health-auto-updates.php
public function test_accepts_minor_updates() { if ( defined( 'WP_AUTO_UPDATE_CORE' ) && false === WP_AUTO_UPDATE_CORE ) { return array( 'description' => sprintf( /* translators: %s: Name of the constant used. */ __( 'WordPress security and maintenance releases are blocked by %s.' ), "<code>define( 'WP_AUTO_UPDATE_CORE', false );</code>" ), 'severity' => 'fail', ); } /** This filter is documented in wp-admin/includes/class-core-upgrader.php */ if ( ! apply_filters( 'allow_minor_auto_core_updates', true ) ) { return array( 'description' => sprintf( /* translators: %s: Name of the filter used. */ __( 'WordPress security and maintenance releases are blocked by the %s filter.' ), '<code>allow_minor_auto_core_updates</code>' ), 'severity' => 'fail', ); } }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.2.0 | Introduced. |