update_right_now_message
函数
update_right_now_message ( No parameters )
- 定义位置
-
-
wp-admin/includes/update.php
, line 336
-
wp-admin/includes/update.php
- 引入
- 2.5.0
- 弃用
- –
Displays WordPress version and active theme in the ‘At a Glance’ dashboard widget.
function update_right_now_message() {
$theme_name = wp_get_theme();
if ( current_user_can( 'switch_themes' ) ) {
$theme_name = sprintf( '%1$s', $theme_name );
}
$msg = '';
if ( current_user_can( 'update_core' ) ) {
$cur = get_preferred_from_update_core();
if ( isset( $cur->response ) && 'upgrade' === $cur->response ) {
$msg .= sprintf(
'%s ',
network_admin_url( 'update-core.php' ),
/* translators: %s: WordPress version number, or 'Latest' string. */
sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) )
);
}
}
/* translators: 1: Version number, 2: Theme name. */
$content = __( 'WordPress %1$s running %2$s theme.' );
/**
* Filters the text displayed in the 'At a Glance' dashboard widget.
*
* Prior to 3.8.0, the widget was named 'Right Now'.
*
* @since 4.4.0
*
* @param string $content Default text.
*/
$content = apply_filters( 'update_right_now_text', $content );
$msg .= sprintf( '' . $content . '', get_bloginfo( 'version', 'display' ), $theme_name );
echo "$msg
";
}
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。


