WordPress.org

Ready to get started?Download WordPress

Forums

hacked out dashboard widgets, cant get them back? (3 posts)

  1. a.deer
    Member
    Posted 3 years ago #

    hi, im customizing wordpress for better display for other users, and im removing some menu items by css, and i was using this code to remove dashboard widgets:

    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
    unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);

    i saw that i should use remove_meta_box instead, but right now im stuck where even if i have none of this in my fuctions.php file, i still dont get the Primary, Secondary [wordpress blog / news] and the Right Now widget!

    i dug some more and wp-admin/includes/template.php says

    // If a core box was previously added or removed by a plugin, don't add.
         if ( 'core' == $priority ) {
         // If core box previously deleted, don't add
              if ( false === $wp_meta_boxes[$page][$a_context][$a_priority][$id] )
               return; .....

    right now what im trying is just to get them back but they dont even appear in the screen options.

    i only made modifications in functions.php, but i dont know what more arguments i should put in set($wp_meta_boxes[.......?? to fix this, or even if it would..
    please tip me in the right direction.
    Thank you so much.

    adir

  2. Joshua Parker
    Member
    Posted 3 years ago #

  3. a.deer
    Member
    Posted 3 years ago #

    thanks, i actually saw these pages many times, but my problem is that i dont have anything "unset" now, but i still dont have all the widgets in there.

Topic Closed

This topic has been closed to new replies.

About this Topic