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
add_action( 'admin_menu', 'remove_dashboard_boxes' ); | |
function remove_dashboard_boxes() { | |
remove_meta_box( 'dashboard_right_now', 'dashboard', 'core' ); | |
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'core' ); | |
remove_meta_box( 'dashboard_plugins', 'dashboard', 'core' ); | |
remove_meta_box( 'dashboard_quick_press', '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
//Deregister Categories Taxonomy | |
add_action( 'init', 'unregister_taxonomy'); | |
function unregister_taxonomy(){ | |
global $wp_taxonomies; | |
$taxonomy = 'category'; | |
if ( taxonomy_exists( $taxonomy)) | |
unset( $wp_taxonomies[$taxonomy]); | |
} |
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
//Move Featured Image Box by Post Type | |
add_action('do_meta_boxes', 'customposttype_image_box'); | |
function customposttype_image_box() { | |
remove_meta_box( 'postimagediv', 'art', 'side' ); | |
add_meta_box('postimagediv', __('Custom Image'), 'post_thumbnail_meta_box', 'art', 'normal', 'high'); | |
} |
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 Admin Bar Except For Administrators | |
function my_function_admin_bar($content) { | |
return ( current_user_can("administrator") ) ? $content : false; | |
} | |
add_filter( 'show_admin_bar' , 'my_function_admin_bar'); |
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
//Force Post type to be Private | |
function force_type_private($post){ | |
if ($post['post_type'] == 'my_post_type') | |
$post['post_status'] = 'private'; | |
return $post; | |
} | |
add_filter('wp_insert_post_data', 'force_type_private'); |
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
//Exclude Categories From The Feed | |
function myFeedExcluder($query) { | |
if ($query->is_feed) { | |
$query->set('cat','-178,-9'); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts','myFeedExcluder'); |
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
//Custom Elements For TinyMCE | |
// add style selector drop down | |
add_filter( 'mce_buttons_2', 'my_mce_buttons_2' ); | |
function my_mce_buttons_2( $buttons ) { | |
array_unshift( $buttons, 'styleselect' ); | |
return $buttons; | |
} | |
// add styles - more info: http://alisothegeek.com/2011/05/tinymce-styles-dropdown-wordpress-visual-editor/ |