This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// remove help thingo | |
add_filter( 'contextual_help', 'wpse50723_remove_help', 999, 3 ); | |
function wpse50723_remove_help($old_help, $screen_id, $screen){ | |
$screen->remove_help_tabs(); | |
return $old_help; | |
} | |
// remove other admin stuff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// change default auto embed size | |
add_filter('embed_defaults','aa99_embed_defaults'); | |
function aa99_embed_defaults($defaults) { | |
$defaults['width']=416; | |
return $defaults; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// disable default dashboard widgets | |
function disable_default_dashboard_widgets() { | |
remove_meta_box('dashboard_right_now', 'dashboard', 'core'); | |
remove_meta_box('dashboard_recent_comments', 'dashboard', 'core'); | |
remove_meta_box('dashboard_incoming_links', 'dashboard', 'core'); | |
remove_meta_box('dashboard_plugins', 'dashboard', 'core'); | |
remove_meta_box('dashboard_activity', 'dashboard', 'normal'); | |
remove_meta_box('dashboard_quick_press', 'dashboard', 'core'); | |
remove_meta_box('dashboard_recent_drafts', 'dashboard', 'core'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// hide specific pages from the All pages list, choose ids manually! | |
add_action( 'pre_get_posts' ,'exclude_this_page' ); | |
function exclude_this_page( $query ) { | |
if( !is_admin() ) | |
return $query; | |
global $pagenow; | |
if( 'edit.php' == $pagenow && ( get_query_var('post_type') && 'page' == get_query_var('post_type') ) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Hide editor on specific pages. | |
* | |
*/ | |
function hide_editor() { | |
global $pagenow; | |
if( !( 'post.php' == $pagenow ) ) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function revcon_change_post_label() { | |
global $menu; | |
global $submenu; | |
$menu[5][0] = 'Books'; | |
$submenu['edit.php'][5][0] = 'Books'; | |
$submenu['edit.php'][10][0] = 'Add Books'; | |
$submenu['edit.php'][16][0] = 'Books Tags'; | |
echo ''; | |
} | |
function revcon_change_post_object() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_custom_post_product() { | |
$labels = array( | |
'name' => _x( 'Products', 'post type general name' ), | |
'singular_name' => _x( 'Product', 'post type singular name' ), | |
'add_new' => _x( 'Add New', 'book' ), | |
'add_new_item' => __( 'Add New Product' ), | |
'edit_item' => __( 'Edit Product' ), | |
'new_item' => __( 'New Product' ), | |
'all_items' => __( 'All Products' ), | |
'view_item' => __( 'View Product' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_taxonomies_news() { | |
$labels = array( | |
'name' => _x( 'News Categories', 'taxonomy general name' ), | |
'singular_name' => _x( 'News Category', 'taxonomy singular name' ), | |
'search_items' => __( 'Search News Categories' ), | |
'all_items' => __( 'All News Categories' ), | |
'parent_item' => __( 'Parent News Category' ), | |
'parent_item_colon' => __( 'Parent News Category:' ), | |
'edit_item' => __( 'Edit News Category' ), | |
'update_item' => __( 'Update News Category' ), |
OlderNewer