wpseek.com
WordPress开发者和主题制作者的搜索引擎
site_admin_notice › WordPress Function
Since3.0.0
已弃用n/a
› site_admin_notice ( 没有参数 )
返回: |
|
定义在: |
|
文档: |
Displays an admin notice to upgrade all sites after a core upgrade.
Related Functions: wp_admin_notice, wp_get_admin_notice, is_site_admin, wpmu_new_site_admin_notification, new_user_email_admin_notice
源码
function site_admin_notice() { global $wp_db_version, $pagenow; if ( ! current_user_can( 'upgrade_network' ) ) { return false; } if ( 'upgrade.php' === $pagenow ) { return; } if ( (int) get_site_option( 'wpmu_upgrade_site' ) !== $wp_db_version ) { $upgrade_network_message = sprintf( /* translators: %s: URL to Upgrade Network screen. */ __( 'Thank you for Updating! Please visit the <a href="%s">Upgrade Network</a> page to update all your sites.' ), esc_url( network_admin_url( 'upgrade.php' ) ) ); wp_admin_notice( $upgrade_network_message, array( 'type' => 'warning', 'additional_classes' => array( 'update-nag', 'inline' ), 'paragraph_wrap' => false, ) ); } }