Return to Snippet

Revision: 63752
at June 4, 2013 19:52 by andrewcolby


Updated Code
// ========================
// = Admin Area Functions =
// ========================

require_once(TEMPLATEPATH . '/help_page.php'); 

// After Registration Redirect
function __my_registration_redirect()
{
    return home_url( '/thank-you-for-registering' );
}
add_filter( 'registration_redirect', '__my_registration_redirect' );

// Remove Generator
remove_action('wp_head', 'wp_generator');

// Admin Footer
function remove_footer_admin () {
    echo "<strong>CTRM Center</strong> created by <a href=\"http://www.andrewcolby.com\">Andrew Colby</a>";
}
add_filter('admin_footer_text', 'remove_footer_admin');

// Remove Default Dashboard Items
function example_remove_dashboard_widgets() {
    // Globalize the metaboxes array, this holds all the widgets for wp-admin
    global $wp_meta_boxes;
    // Remove the incomming links widget
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); 
    // Plugins
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); 
    // EasymMail
    unset($wp_meta_boxes['dashboard']['normal']['core']['alo-easymail-widget']);  
    // Remove right now
    //unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}
// Hoook into the 'wp_dashboard_setup' action to register our function
add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );

// remove unnecessary page/post meta boxes
function remove_meta_boxes() {
	// posts
	remove_meta_box('postcustom','post','normal');
	remove_meta_box('trackbacksdiv','post','normal');
  remove_meta_box('slugdiv','post','normal');
	//remove_meta_box('commentstatusdiv','post','normal');
	//remove_meta_box('commentsdiv','post','normal');
	//remove_meta_box('categorydiv','post','normal');
	//remove_meta_box('tagsdiv-post_tag','post','normal');
	//remove_meta_box('authordiv','post','normal');
	// pages
	remove_meta_box('postcustom','page','normal');
	remove_meta_box('commentstatusdiv','page','normal');
	remove_meta_box('trackbacksdiv','page','normal');
	remove_meta_box('commentsdiv','page','normal');
	remove_meta_box('slugdiv','page','normal');
	//remove_meta_box('authordiv','page','normal');
}
add_action('admin_init','remove_meta_boxes');

// Screen Options - Remove Columns 
function my_remove_columns( $posts_columns ) {
    unset( $posts_columns['comments'] );
    return $posts_columns;
}

add_filter( 'manage_post_posts_columns', 'my_remove_columns' );

add_action( 'admin_menu', 'my_remove_meta_boxes' );

// Remove WP Logo
function annointed_admin_bar_remove() {
        global $wp_admin_bar;
        /* Remove their stuff */
        $wp_admin_bar->remove_menu('wp-logo');
        $wp_admin_bar->remove_menu('comments');
}
add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove', 0);

Revision: 63751
at June 4, 2013 19:20 by andrewcolby


Updated Code
// ========================
// = Admin Area Functions =
// ========================

require_once(TEMPLATEPATH . '/help_page.php'); 

// After Registration Redirect
function __my_registration_redirect()
{
    return home_url( '/thank-you-for-registering' );
}
add_filter( 'registration_redirect', '__my_registration_redirect' );

// Remove Generator
remove_action('wp_head', 'wp_generator');

// Admin Footer
function remove_footer_admin () {
    echo "<strong>CTRM Center</strong> created by <a href=\"http://www.andrewcolby.com\">Andrew Colby</a>";
}
add_filter('admin_footer_text', 'remove_footer_admin');

// Remove Default Dashboard Items
function example_remove_dashboard_widgets() {
    // Globalize the metaboxes array, this holds all the widgets for wp-admin
    global $wp_meta_boxes;
    // Remove the incomming links widget
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); 
    // Plugins
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); 
    // EasymMail
    unset($wp_meta_boxes['dashboard']['normal']['core']['alo-easymail-widget']);  
    // Remove right now
    //unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}
// Hoook into the 'wp_dashboard_setup' action to register our function
add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );

// Screen Options - Remove Columns 
function my_remove_columns( $posts_columns ) {
    unset( $posts_columns['comments'] );
    return $posts_columns;
}

add_filter( 'manage_post_posts_columns', 'my_remove_columns' );

add_action( 'admin_menu', 'my_remove_meta_boxes' );

// Remove WP Logo
function annointed_admin_bar_remove() {
        global $wp_admin_bar;
        /* Remove their stuff */
        $wp_admin_bar->remove_menu('wp-logo');
        $wp_admin_bar->remove_menu('comments');
}
add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove', 0);

Revision: 63750
at June 4, 2013 18:47 by andrewcolby


Updated Code
// ========================
// = Admin Area Functions =
// ========================

require_once(TEMPLATEPATH . '/admin_page.php'); 

// After Registration Redirect
function __my_registration_redirect()
{
    return home_url( '/thank-you-for-registering' );
}
add_filter( 'registration_redirect', '__my_registration_redirect' );

// Remove Generator
remove_action('wp_head', 'wp_generator');

// Admin Footer
function remove_footer_admin () {
    echo "<strong>Website</strong> created by <a href=\"http://www.andrewcolby.com\">Andrew Colby</a>";
}
add_filter('admin_footer_text', 'remove_footer_admin');

// Remove Default Dashboard Items
function example_remove_dashboard_widgets() {
    // Globalize the metaboxes array, this holds all the widgets for wp-admin
    global $wp_meta_boxes;
    // Remove the incomming links widget
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); 
    // Plugins
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);   
    // Remove right now
    //unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}
// Hoook into the 'wp_dashboard_setup' action to register our function
add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );

// Remove WP Logo
function annointed_admin_bar_remove() {
        global $wp_admin_bar;
        /* Remove their stuff */
        $wp_admin_bar->remove_menu('wp-logo');
        $wp_admin_bar->remove_menu('comments');
}
add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove', 0);

Revision: 63749
at June 4, 2013 18:46 by andrewcolby


Updated Code
// ========================
// = Admin Area Functions =
// ========================

require_once(TEMPLATEPATH . '/admin_page.php'); 

// After Registration Redirect
function __my_registration_redirect()
{
    return home_url( '/thank-you-for-registering' );
}
add_filter( 'registration_redirect', '__my_registration_redirect' );

// Remove Generator
remove_action('wp_head', 'wp_generator');

// Admin Footer
function remove_footer_admin () {
    echo "<strong>Website</strong> created by <a href="http://www.andrewcolby.com">Andrew Colby</a>";
}
add_filter('admin_footer_text', 'remove_footer_admin');

// Remove Default Dashboard Items
function example_remove_dashboard_widgets() {
    // Globalize the metaboxes array, this holds all the widgets for wp-admin
    global $wp_meta_boxes;
    // Remove the incomming links widget
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); 
    // Plugins
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);   
    // Remove right now
    //unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}
// Hoook into the 'wp_dashboard_setup' action to register our function
add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );

// Remove WP Logo
function annointed_admin_bar_remove() {
        global $wp_admin_bar;
        /* Remove their stuff */
        $wp_admin_bar->remove_menu('wp-logo');
        $wp_admin_bar->remove_menu('comments');
}
add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove', 0);

Revision: 63748
at June 4, 2013 18:43 by andrewcolby


Initial Code
// ========================
// = Admin Area Functions =
// ========================

require_once(TEMPLATEPATH . '/help_page.php'); 

// After Registration Redirect
function __my_registration_redirect()
{
    return home_url( '/thank-you-for-registering' );
}
add_filter( 'registration_redirect', '__my_registration_redirect' );

// Remove Generator
remove_action('wp_head', 'wp_generator');

// Admin Footer
function remove_footer_admin () {
    echo "<strong>CTRM Center</strong> created by <a href="http://www.andrewcolby.com">Andrew Colby</a>";
}
add_filter('admin_footer_text', 'remove_footer_admin');

// Remove Default Dashboard Items
function example_remove_dashboard_widgets() {
    // Globalize the metaboxes array, this holds all the widgets for wp-admin
    global $wp_meta_boxes;
    // Remove the incomming links widget
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); 
    // Plugins
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); 
    // EasymMail
    unset($wp_meta_boxes['dashboard']['normal']['core']['alo-easymail-widget']);  
    // Remove right now
    //unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}
// Hoook into the 'wp_dashboard_setup' action to register our function
add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );

// Remove WP Logo
function annointed_admin_bar_remove() {
        global $wp_admin_bar;
        /* Remove their stuff */
        $wp_admin_bar->remove_menu('wp-logo');
        $wp_admin_bar->remove_menu('comments');
}
add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove', 0);

Initial URL

                                

Initial Description
Wordpress admin area functions

Initial Title
Wordpress Admin Area Functions

Initial Tags
wordpress

Initial Language
PHP