- 將控制台中的快貼完全取消掉,連勾選的機會都要沒有
function wpc_dashboard_widgets() {
global $wp_meta_boxes;
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
}
add_action('wp_dashboard_setup', 'wpc_dashboard_widgets');
仔細看看Dashboard Widgets API,原來做到可以再客製的地步了,例如其中提到
Add an Example Widget
Here's an example of a very basic dashboard widget. This code would go in one of your plugin's files, or in your theme's functions.php, for example.
/** * Add a widget to the dashboard. * * This function is hooked into the 'wp_dashboard_setup' action below. */ function example_add_dashboard_widgets() { wp_add_dashboard_widget( 'example_dashboard_widget', // Widget slug. 'Example Dashboard Widget', // Title. 'example_dashboard_widget_function' // Display function. ); } add_action( 'wp_dashboard_setup', 'example_add_dashboard_widgets' ); /** * Create the function to output the contents of our Dashboard Widget. */ function example_dashboard_widget_function() { // Display whatever it is you want to show. echo "Hello World, I'm a great Dashboard Widget"; }也許用這方式可以不用登入後,為了跳過控制台還要轉址到其他地方,直接都拿掉,放入自己的資訊。
PS. 樂在設計的作者是個高一的學生,江山果然代有才人出,年紀只是多活的天數比較多,希望不會只是比他多活幾十年而已 XD
參考網址:
WP客製化 #4: 客製 WordPress 後台登入 LOGO、連結、版權訊息、後台首頁訊息資訊 (非外掛)
Dashboard Widgets API
Example Dashboard Widget
沒有留言:
張貼留言