Ejemplo n.º 1
0
 public static function add_options()
 {
     $option = 'per_page';
     $args = array('label' => MainWPManageSitesView::sitesPerPage(), 'default' => 10, 'option' => 'mainwp_managesites_per_page');
     add_screen_option($option, $args);
     if (false === get_user_option('mainwp_default_hide_actions_column')) {
         global $current_user;
         $hidden = get_user_option("manage" . MainWPManageSites::$page . "columnshidden");
         if (!is_array($hidden)) {
             $hidden = array();
         }
         $hidden[] = 'site_actions';
         update_user_option($current_user->ID, "manage" . MainWPManageSites::$page . "columnshidden", $hidden, true);
         update_user_option($current_user->ID, "mainwp_default_hide_actions_column", 1);
     }
     self::$sitesTable = new MainWPManageSites_List_Table();
 }