equal
deleted
inserted
replaced
262 |
262 |
263 if ( ! isset( $cur->response ) ) { |
263 if ( ! isset( $cur->response ) ) { |
264 $cur->response = ''; |
264 $cur->response = ''; |
265 } |
265 } |
266 |
266 |
267 // Include an unmodified $wp_version. |
267 $is_development_version = preg_match( '/alpha|beta|RC/', wp_get_wp_version() ); |
268 require ABSPATH . WPINC . '/version.php'; |
|
269 |
|
270 $is_development_version = preg_match( '/alpha|beta|RC/', $wp_version ); |
|
271 |
268 |
272 if ( $is_development_version ) { |
269 if ( $is_development_version ) { |
273 return sprintf( |
270 return sprintf( |
274 /* translators: 1: WordPress version number, 2: URL to WordPress Updates screen. */ |
271 /* translators: 1: WordPress version number, 2: URL to WordPress Updates screen. */ |
275 __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), |
272 __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), |
402 /** |
399 /** |
403 * Retrieves plugins with updates available. |
400 * Retrieves plugins with updates available. |
404 * |
401 * |
405 * @since 2.9.0 |
402 * @since 2.9.0 |
406 * |
403 * |
407 * @return array |
404 * @return object[] |
408 */ |
405 */ |
409 function get_plugin_updates() { |
406 function get_plugin_updates() { |
410 $all_plugins = get_plugins(); |
407 $all_plugins = get_plugins(); |
411 $upgrade_plugins = array(); |
408 $upgrade_plugins = array(); |
412 $current = get_site_transient( 'update_plugins' ); |
409 $current = get_site_transient( 'update_plugins' ); |
625 /** |
622 /** |
626 * Retrieves themes with updates available. |
623 * Retrieves themes with updates available. |
627 * |
624 * |
628 * @since 2.9.0 |
625 * @since 2.9.0 |
629 * |
626 * |
630 * @return array |
627 * @return WP_Theme[] |
631 */ |
628 */ |
632 function get_theme_updates() { |
629 function get_theme_updates() { |
633 $current = get_site_transient( 'update_themes' ); |
630 $current = get_site_transient( 'update_themes' ); |
634 |
631 |
635 if ( ! isset( $current->response ) ) { |
632 if ( ! isset( $current->response ) ) { |
852 * @global int $upgrading |
849 * @global int $upgrading |
853 * |
850 * |
854 * @return void|false |
851 * @return void|false |
855 */ |
852 */ |
856 function maintenance_nag() { |
853 function maintenance_nag() { |
857 // Include an unmodified $wp_version. |
|
858 require ABSPATH . WPINC . '/version.php'; |
|
859 global $upgrading; |
854 global $upgrading; |
860 |
855 |
861 $nag = isset( $upgrading ); |
856 $nag = isset( $upgrading ); |
862 |
857 |
863 if ( ! $nag ) { |
858 if ( ! $nag ) { |
871 * OK if they are now running the latest. |
866 * OK if they are now running the latest. |
872 * |
867 * |
873 * This flag is cleared whenever a successful update occurs using Core_Upgrader. |
868 * This flag is cleared whenever a successful update occurs using Core_Upgrader. |
874 */ |
869 */ |
875 $comparison = ! empty( $failed['critical'] ) ? '>=' : '>'; |
870 $comparison = ! empty( $failed['critical'] ) ? '>=' : '>'; |
876 if ( isset( $failed['attempted'] ) && version_compare( $failed['attempted'], $wp_version, $comparison ) ) { |
871 if ( isset( $failed['attempted'] ) && version_compare( $failed['attempted'], wp_get_wp_version(), $comparison ) ) { |
877 $nag = true; |
872 $nag = true; |
878 } |
873 } |
879 } |
874 } |
880 |
875 |
881 if ( ! $nag ) { |
876 if ( ! $nag ) { |