SO网友:Frank P. Walentynowicz
在里面functions.php
在子主题中,插入以下代码:
if(is_admin()) {
function wpse_version_check() {
global $wp_version;
echo \'<div>Current version of WordPress is <strong>\' . $wp_version . \'</strong></div>\';
}
function wpse_add_dashboard_widgets() {
wp_add_dashboard_widget(
\'wp_version\',
\'WP Version\',
\'wpse_version_check\'
);
}
add_action(\'wp_dashboard_setup\', \'wpse_add_dashboard_widgets\');
}
这将创建仪表板小部件
WP Version
.