Make WordPress Core

Ticket #14696: 14696.diff

File 14696.diff, 32.5 KB (added by ryan, 14 years ago)

Dump of what I'm playing with

  • wp-includes/vars.php

     
    1515// On which page are we ?
    1616if ( is_admin() ) {
    1717        // wp-admin pages are checked more carefully
    18         preg_match('#/wp-admin/?(.*?)$#i', $PHP_SELF, $self_matches);
     18        if ( is_network_admin() )
     19                preg_match('#/wp-admin/network/?(.*?)$#i', $PHP_SELF, $self_matches);
     20        elseif ( is_user_admin() )
     21                preg_match('#/wp-admin/user/?(.*?)$#i', $PHP_SELF, $self_matches);
     22        else
     23                preg_match('#/wp-admin/?(.*?)$#i', $PHP_SELF, $self_matches);
    1924        $pagenow = $self_matches[1];
    2025        $pagenow = trim($pagenow, '/');
    2126        $pagenow = preg_replace('#\?.*?$#', '', $pagenow);
  • wp-includes/load.php

     
    621621}
    622622
    623623/**
     624 * Whether the current request is for a user admin screen /wp-admin/user/
     625 *
     626 * Does not inform on whether the user is an admin! Use capability checks to
     627 * tell if the user should be accessing a section or not.
     628 *
     629 * @since 3.1.0
     630 *
     631 * @return bool True if inside WordPress user administration pages.
     632 */
     633function is_user_admin() {
     634        if ( defined( 'WP_USER_ADMIN' ) )
     635                return WP_USER_ADMIN;
     636        return false;
     637}
     638
     639/**
    624640 * Whether Multisite support is enabled
    625641 *
    626642 * @since 3.0.0
  • wp-includes/link-template.php

     
    21302130}
    21312131
    21322132/**
     2133 * Retrieve the url to the admin area for the current user.
     2134 *
     2135 * @package WordPress
     2136 * @since 3.0.0
     2137 *
     2138 * @param string $path Optional path relative to the admin url
     2139 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
     2140 * @return string Admin url link with optional path appended
     2141*/
     2142function user_admin_url( $path = '', $scheme = 'admin' ) {
     2143        $url = network_site_url('wp-admin/user/', $scheme);
     2144
     2145        if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
     2146                $url .= ltrim($path, '/');
     2147
     2148        return apply_filters('user_admin_url', $url, $path);
     2149}
     2150
     2151/**
    21332152 * Retrieve the url to the admin area for either the current blog or the network depending on context.
    21342153 *
    21352154 * @package WordPress
     
    21422161function self_admin_url($path = '', $scheme = 'admin') {
    21432162        if ( is_network_admin() )
    21442163                return network_admin_url($path, $scheme);
     2164        elseif ( is_user_admin() )
     2165                return user_admin_url($path, $scheme);
    21452166        else
    21462167                return admin_url($path, $scheme);
    21472168}
  • wp-includes/capabilities.php

     
    737737
    738738                // Must have ALL requested caps
    739739                $capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args );
     740                $capabilities['exist'] = true; // Everyone is allowed to exist
    740741                foreach ( (array) $caps as $cap ) {
    741742                        //echo "Checking cap $cap<br />";
    742743                        if ( empty( $capabilities[$cap] ) || !$capabilities[$cap] )
  • wp-includes/pluggable.php

     
    8181                return;
    8282
    8383        if ( ! $user = wp_validate_auth_cookie() ) {
    84                  if ( is_admin() || empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) {
     84                 if ( is_blog_admin() || is_network_admin() || empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) {
    8585                        wp_set_current_user(0);
    8686                        return false;
    8787                 }
     
    775775                }
    776776        }
    777777
    778         if ( $user_id = wp_validate_auth_cookie( '', apply_filters( 'auth_redirect_scheme', '' ) ) ) {
     778        if ( is_user_admin() )
     779                $scheme = 'logged_in';
     780        else
     781                $scheme = apply_filters( 'auth_redirect_scheme', '' );
     782
     783        if ( $user_id = wp_validate_auth_cookie( '',  $scheme) ) {
    779784                do_action('auth_redirect', $user_id);
    780785
    781786                // If the user wants ssl but the session is not ssl, redirect.
  • wp-includes/ms-functions.php

     
    7272function get_active_blog_for_user( $user_id ) {
    7373        global $wpdb;
    7474        $blogs = get_blogs_of_user( $user_id );
    75         if ( empty( $blogs ) ) {
    76                 $details = get_dashboard_blog();
    77                 add_user_to_blog( $details->blog_id, $user_id, 'subscriber' );
    78                 update_user_meta( $user_id, 'primary_blog', $details->blog_id );
    79                 wp_cache_delete( $user_id, 'users' );
    80                 return $details;
    81         }
     75        if ( empty( $blogs ) )
     76                return null;
    8277
    8378        $primary_blog = get_user_meta( $user_id, 'primary_blog', true );
    8479        $details = get_dashboard_blog();
     
    120115                                }
    121116                        }
    122117                } else {
    123                         // Should never get here
    124                         $dashboard_blog = get_dashboard_blog();
    125                         add_user_to_blog( $dashboard_blog->blog_id, $user_id, 'subscriber' ); // Add subscriber permission for dashboard blog
    126                         update_user_meta( $user_id, 'primary_blog', $dashboard_blog->blog_id );
    127                         return $dashboard_blog;
     118                        return null;
    128119                }
    129120                return $ret;
    130121        } else {
  • wp-admin/users.php

     
    1818$title = __('Users');
    1919$parent_file = 'users.php';
    2020
     21add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) );
     22
    2123// contextual help - choose Help on the top right of admin panel to preview this.
    2224add_contextual_help($current_screen,
    2325    '<p>' . __('This screen lists all the existing users for your site. Each user has one of five defined roles as set by the site admin: Site Administrator, Editor, Author, Contributor, or Subscriber. Users with roles other than Administrator will see fewer options when they are logged in, based on their role.') . '</p>' .
  • wp-admin/edit-comments.php

     
    105105else
    106106        $title = __('Comments');
    107107
     108add_screen_option( 'per_page', array('label' => _x( 'Comments', 'comments per page (screen options)' )) );
     109
    108110add_contextual_help( $current_screen, '<p>' . __('You can manage comments made on your site similar to the way you manage Posts and other content. This screen is customizable in the same ways as other management screens, and you can act on comments using the on-hover action links or the Bulk Actions.') . '</p>' .
    109111        '<p>' . __('A yellow row means the comment is waiting for you to moderate it.') . '</p>' .
    110112        '<p>' . __('In the Author column, in addition to the author&#8217;s name, email address, and blog URL, the commenter&#8217;s IP address is shown. Clicking on this link will show you all the comments made from this IP address.') . '</p>' .
  • wp-admin/includes/menu.php

     
    99
    1010if ( is_network_admin() )
    1111        do_action('_network_admin_menu');
     12elseif ( is_user_admin() )
     13        do_action('_user_admin_menu');
    1214else
    1315        do_action('_admin_menu');
    1416
     
    8991
    9092if ( is_network_admin() )
    9193        do_action('network_admin_menu', '');
     94elseif ( is_user_admin() )
     95        do_action('user_admin_menu', '');
    9296else
    9397        do_action('admin_menu', '');
    9498
  • wp-admin/includes/default-list-tables.php

     
    27192719
    27202720        function WP_Sites_Table() {
    27212721                parent::WP_List_Table( array(
    2722                         'screen' => 'ms-sites',
     2722                        'screen' => 'sites-network',
    27232723                        'plural' => 'sites',
    27242724                ) );
    27252725        }
     
    27342734
    27352735                $mode = ( empty( $_REQUEST['mode'] ) ) ? 'list' : $_REQUEST['mode'];
    27362736
    2737                 $per_page = $this->get_items_per_page( 'ms_sites_per_page' );
     2737                $per_page = $this->get_items_per_page( 'sites_network_per_page' );
    27382738
    27392739                $pagenum = $this->get_pagenum();
    27402740
     
    30073007
    30083008        function WP_MS_Users_Table() {
    30093009                parent::WP_List_Table( array(
    3010                         'screen' => 'ms-users',
     3010                        'screen' => 'users-network',
    30113011                ) );
    30123012        }
    30133013
     
    30243024
    30253025                $usersearch = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';
    30263026
    3027                 $users_per_page = $this->get_items_per_page( 'ms_users_per_page' );
     3027                $users_per_page = $this->get_items_per_page( 'users_network_per_page' );
    30283028
    30293029                $paged = $this->get_pagenum();
    30303030
  • wp-admin/includes/dashboard.php

     
    2525        /* Register Widgets and Controls */
    2626
    2727        // Right Now
    28         wp_add_dashboard_widget( 'dashboard_right_now', __( 'Right Now' ), 'wp_dashboard_right_now' );
     28        if ( is_blog_admin() && current_user_can('edit_posts') )
     29                wp_add_dashboard_widget( 'dashboard_right_now', __( 'Right Now' ), 'wp_dashboard_right_now' );
    2930
    3031        // Recent Comments Widget
    31         if ( !isset( $widget_options['dashboard_recent_comments'] ) || !isset( $widget_options['dashboard_recent_comments']['items'] ) ) {
    32                 $update = true;
    33                 $widget_options['dashboard_recent_comments'] = array(
    34                         'items' => 5,
    35                 );
     32        if ( is_blog_admin() && current_user_can('moderate_comments') ) {
     33                if ( !isset( $widget_options['dashboard_recent_comments'] ) || !isset( $widget_options['dashboard_recent_comments']['items'] ) ) {
     34                        $update = true;
     35                        $widget_options['dashboard_recent_comments'] = array(
     36                                'items' => 5,
     37                        );
     38                }
     39                $recent_comments_title = __( 'Recent Comments' );
     40                wp_add_dashboard_widget( 'dashboard_recent_comments', $recent_comments_title, 'wp_dashboard_recent_comments', 'wp_dashboard_recent_comments_control' );
    3641        }
    37         $recent_comments_title = __( 'Recent Comments' );
    38         wp_add_dashboard_widget( 'dashboard_recent_comments', $recent_comments_title, 'wp_dashboard_recent_comments', 'wp_dashboard_recent_comments_control' );
    3942
    4043        // Incoming Links Widget
    41         if ( !isset( $widget_options['dashboard_incoming_links'] ) || !isset( $widget_options['dashboard_incoming_links']['home'] ) || $widget_options['dashboard_incoming_links']['home'] != get_option('home') ) {
    42                 $update = true;
    43                 $num_items = isset($widget_options['dashboard_incoming_links']['items']) ? $widget_options['dashboard_incoming_links']['items'] : 10;
    44                 $widget_options['dashboard_incoming_links'] = array(
    45                         'home' => get_option('home'),
    46                         'link' => apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch.google.com/blogsearch?scoring=d&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ),
    47                         'url' => isset($widget_options['dashboard_incoming_links']['url']) ? apply_filters( 'dashboard_incoming_links_feed', $widget_options['dashboard_incoming_links']['url'] ) : apply_filters( 'dashboard_incoming_links_feed', 'http://blogsearch.google.com/blogsearch_feeds?scoring=d&ie=utf-8&num=' . $num_items . '&output=rss&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ),
    48                         'items' => $num_items,
    49                         'show_date' => isset($widget_options['dashboard_incoming_links']['show_date']) ? $widget_options['dashboard_incoming_links']['show_date'] : false
    50                 );
     44        if ( is_blog_admin() && current_user_can('publish_posts') ) {
     45                if ( !isset( $widget_options['dashboard_incoming_links'] ) || !isset( $widget_options['dashboard_incoming_links']['home'] ) || $widget_options['dashboard_incoming_links']['home'] != get_option('home') ) {
     46                        $update = true;
     47                        $num_items = isset($widget_options['dashboard_incoming_links']['items']) ? $widget_options['dashboard_incoming_links']['items'] : 10;
     48                        $widget_options['dashboard_incoming_links'] = array(
     49                                'home' => get_option('home'),
     50                                'link' => apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch.google.com/blogsearch?scoring=d&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ),
     51                                'url' => isset($widget_options['dashboard_incoming_links']['url']) ? apply_filters( 'dashboard_incoming_links_feed', $widget_options['dashboard_incoming_links']['url'] ) : apply_filters( 'dashboard_incoming_links_feed', 'http://blogsearch.google.com/blogsearch_feeds?scoring=d&ie=utf-8&num=' . $num_items . '&output=rss&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ),
     52                                'items' => $num_items,
     53                                'show_date' => isset($widget_options['dashboard_incoming_links']['show_date']) ? $widget_options['dashboard_incoming_links']['show_date'] : false
     54                        );
     55                }
     56                wp_add_dashboard_widget( 'dashboard_incoming_links', __( 'Incoming Links' ), 'wp_dashboard_incoming_links', 'wp_dashboard_incoming_links_control' );
    5157        }
    52         wp_add_dashboard_widget( 'dashboard_incoming_links', __( 'Incoming Links' ), 'wp_dashboard_incoming_links', 'wp_dashboard_incoming_links_control' );
    5358
    5459        // WP Plugins Widget
    55         if ( current_user_can( 'install_plugins' ) )
     60        if ( is_blog_admin() && current_user_can( 'install_plugins' ) )
    5661                wp_add_dashboard_widget( 'dashboard_plugins', __( 'Plugins' ), 'wp_dashboard_plugins' );
    5762
    5863        // QuickPress Widget
    59         if ( current_user_can('edit_posts') )
     64        if ( is_blog_admin() && current_user_can('edit_posts') )
    6065                wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' );
    6166
    6267        // Recent Drafts
    63         if ( current_user_can('edit_posts') )
     68        if ( is_blog_admin() && current_user_can('edit_posts') )
    6469                wp_add_dashboard_widget( 'dashboard_recent_drafts', __('Recent Drafts'), 'wp_dashboard_recent_drafts' );
    6570
    6671        // Primary feed (Dev Blog) Widget
     
    132137                list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 );
    133138                $widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( "$url#$widget_id" ) . '" class="edit-box open-box">' . __( 'Configure' ) . '</a></span>';
    134139        }
    135         $side_widgets = array('dashboard_quick_press', 'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary');
     140        if ( is_user_admin() )
     141                $side_widgets = array();
     142        else
     143                $side_widgets = array('dashboard_quick_press', 'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary');
    136144        $location = 'normal';
    137145        if ( in_array($widget_id, $side_widgets) )
    138146                $location = 'side';
  • wp-admin/includes/misc.php

     
    343343
    344344                switch ( $map_option ) {
    345345                        case 'edit_per_page':
    346                         case 'ms_sites_per_page':
     346                        case 'sites_network_per_page':
    347347                        case 'users_per_page':
    348                         case 'ms_users_per_page':
     348                        case 'users_network_per_page':
    349349                        case 'edit_comments_per_page':
    350350                        case 'upload_per_page':
    351351                        case 'edit_tags_per_page':
  • wp-admin/includes/template.php

     
    13901390        if ( is_string($screen) )
    13911391                $screen = convert_to_screen($screen);
    13921392
     1393        if ( $screen->is_user )
     1394                return;
     1395
    13931396        if ( isset($screen->post_type) ) {
    13941397                $post_type_object = get_post_type_object($screen->post_type);
    13951398                if ( 'add' != $screen->action )
     
    18301833        return $return;
    18311834}
    18321835
     1836function add_screen_option( $option, $args = array() ) {
     1837        global $wp_current_screen_options;
     1838
     1839        if ( !isset($wp_current_screen_options) )
     1840                $wp_current_screen_options = array();
     1841
     1842        $wp_current_screen_options[$option] = $args;
     1843}
     1844
    18331845function screen_options($screen) {
     1846        global $wp_current_screen_options;
     1847
    18341848        if ( is_string($screen) )
    18351849                $screen = convert_to_screen($screen);
    18361850
    1837         switch ( $screen->base ) {
    1838                 case 'edit':
    1839                 case 'edit-pages':
    1840                         $post_type = 'post';
    1841                         if ( isset($_GET['post_type']) && in_array( $_GET['post_type'], get_post_types( array( 'show_ui' => true ) ) ) )
    1842                                 $post_type = $_GET['post_type'];
    1843                         $post_type_object = get_post_type_object($post_type);
    1844                         $per_page_label = $post_type_object->labels->name;
    1845                         break;
    1846                 case 'ms-sites':
    1847                         $per_page_label = _x( 'Sites', 'sites per page (screen options)' );
    1848                         break;
    1849                 case 'users':
    1850                 case 'ms-users':
    1851                         $per_page_label = _x( 'Users', 'users per page (screen options)' );
    1852                         break;
    1853                 case 'edit-comments':
    1854                         $per_page_label = _x( 'Comments', 'comments per page (screen options)' );
    1855                         break;
    1856                 case 'upload':
    1857                         $per_page_label = _x( 'Media items', 'items per page (screen options)' );
    1858                         break;
    1859                 case 'edit-tags':
    1860                         global $tax;
    1861                         $per_page_label = $tax->labels->name;
    1862                         break;
    1863                 case 'plugins':
    1864                         $per_page_label = _x( 'Plugins', 'plugins per page (screen options)' );
    1865                         break;
    1866                 default:
    1867                         return '';
    1868         }
     1851        if ( !isset($wp_current_screen_options['per_page']) )
     1852                return '';
    18691853
    1870         $option = str_replace( '-', '_', "{$screen->id}_per_page" );
    1871         if ( 'edit_tags_per_page' == $option ) {
    1872                 if ( 'category' == $tax->name )
    1873                         $option = 'categories_per_page';
    1874                 elseif ( 'post_tag' != $tax->name )
    1875                         $option = 'edit_' . $tax->name . '_per_page';
     1854        $per_page_label = $wp_current_screen_options['per_page']['label'];
     1855
     1856        if ( empty($wp_current_screen_options['per_page']['option']) ) {
     1857                $option = str_replace( '-', '_', "{$screen->id}_per_page" );
     1858        } else {
     1859                $option = $wp_current_screen_options['per_page']['option'];
    18761860        }
    18771861
    18781862        $per_page = (int) get_user_option( $option );
    18791863        if ( empty( $per_page ) || $per_page < 1 ) {
    1880                 if ( 'plugins' == $screen->id )
    1881                         $per_page = 999;
     1864                if ( isset($wp_current_screen_options['per_page']['default']) )
     1865                        $per_page = $wp_current_screen_options['per_page']['default'];
    18821866                else
    18831867                        $per_page = 20;
    18841868        }
     
    20602044        }
    20612045
    20622046        $current_screen->is_network = is_network_admin() ? true : false;
     2047        $current_screen->is_user = is_user_admin() ? true : false;
     2048       
     2049        if ( $current_screen->is_network ) {
     2050                $current_screen->base .= '-network';
     2051                $current_screen->id .= '-network';
     2052        } elseif ( $current_screen->is_user ) {
     2053                $current_screen->base .= '-user';
     2054                $current_screen->id .= '-user';
     2055        }
    20632056
    20642057        $current_screen = apply_filters('current_screen', $current_screen);
    20652058}
  • wp-admin/includes/ms.php

     
    502502        $c ++;
    503503
    504504        $blog = get_active_blog_for_user( get_current_user_id() );
    505         $dashboard_blog = get_dashboard_blog();
     505
    506506        if ( is_object( $blog ) ) {
    507507                wp_redirect( get_admin_url( $blog->blog_id, '?c=' . $c ) ); // redirect and count to 5, "just in case"
    508508                exit;
     509        } else {
     510                wp_redirect( user_admin_url( '?c=' . $c ) ); // redirect and count to 5, "just in case"
    509511        }
    510512
    511         /*
    512            If the user is a member of only 1 blog and the user's primary_blog isn't set to that blog,
    513            then update the primary_blog record to match the user's blog
    514          */
    515         $blogs = get_blogs_of_user( get_current_user_id() );
    516 
    517         if ( !empty( $blogs ) ) {
    518                 foreach( $blogs as $blogid => $blog ) {
    519                         if ( $blogid != $dashboard_blog->blog_id && get_user_meta( get_current_user_id() , 'primary_blog', true ) == $dashboard_blog->blog_id ) {
    520                                 update_user_meta( get_current_user_id(), 'primary_blog', $blogid );
    521                                 continue;
    522                         }
    523                 }
    524                 $blog = get_blog_details( get_user_meta( get_current_user_id(), 'primary_blog', true ) );
    525                         wp_redirect( get_admin_url( $blog->blog_id, '?c=' . $c ) );
    526                 exit;
    527         }
    528513        wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
    529514}
    530515add_action( 'admin_page_access_denied', 'redirect_user_to_blog', 99 );
  • wp-admin/edit-tags.php

     
    2222        $submenu_file = "edit-tags.php?taxonomy=$taxonomy";
    2323}
    2424
     25add_screen_option( 'per_page', array('label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page') );
     26
    2527switch ( $wp_list_table->current_action() ) {
    2628
    2729case 'add-tag':
  • wp-admin/admin.php

     
    1111 *
    1212 * @since unknown
    1313 */
    14 if ( !defined('WP_ADMIN') )
     14if ( ! defined('WP_ADMIN') )
    1515        define('WP_ADMIN', TRUE);
    1616
    17 if ( !defined('WP_NETWORK_ADMIN') ) {
     17if ( ! defined('WP_NETWORK_ADMIN') )
    1818        define('WP_NETWORK_ADMIN', FALSE);
     19
     20if ( ! defined('WP_USER_ADMIN') )
     21        define('WP_USER_ADMIN', FALSE);
     22
     23if ( ! WP_NETWORK_ADMIN && ! WP_USER_ADMIN ) {
    1924        define('WP_BLOG_ADMIN', TRUE);
    2025}
    2126
     
    97102
    98103if ( WP_NETWORK_ADMIN )
    99104        require(ABSPATH . 'wp-admin/network/menu.php');
     105elseif ( WP_USER_ADMIN )
     106        require(ABSPATH . 'wp-admin/user/menu.php');
    100107else
    101108        require(ABSPATH . 'wp-admin/menu.php');
    102109
  • wp-admin/index.php

     
    4242        '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
    4343);
    4444
    45 require_once('./admin-header.php');
     45include (ABSPATH . 'wp-admin/admin-header.php');
    4646
    4747$today = current_time('mysql', 1);
    4848?>
  • wp-admin/upload.php

     
    134134wp_enqueue_script( 'jquery-ui-draggable' );
    135135wp_enqueue_script( 'media' );
    136136
     137add_screen_option( 'per_page', array('label' => _x( 'Media items', 'items per page (screen options)' )) );
     138
    137139add_contextual_help( $current_screen,
    138140        '<p>' . __('All the files you&#8217;ve uploaded are listed in the Media Library, with the most recent uploads listed first. You can use the <em>Screen Options</em> tab to customize the display of this screen.') . '</p>' .
    139141        '<p>' . __('You can narrow the list by file type/status using the text link filters at the top of the screen. You also can refine the list by date using the dropdown menu above the media table.') . '</p>' .
  • wp-admin/network/settings.php

     
    4343?>
    4444
    4545<div class="wrap">
    46         <?php screen_icon(); ?>
     46        <?php screen_icon('options-general'); ?>
    4747        <h2><?php _e( 'Network Options' ) ?></h2>
    4848        <form method="post" action="edit.php?action=siteoptions">
    4949                <?php wp_nonce_field( 'siteoptions' ); ?>
  • wp-admin/network/users.php

     
    1616$title = __( 'Users' );
    1717$parent_file = 'users.php';
    1818
     19add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) );
     20
    1921add_contextual_help($current_screen,
    2022        '<p>' . __('This table shows all users across the network and the sites to which they are assigned.') . '</p>' .
    2123        '<p>' . __('Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to his or her Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.') . '</p>' .
  • wp-admin/network/edit.php

     
    5252                                                $user_dropdown = "<select name='blog[$val][{$key}]'>";
    5353                                                $user_list = '';
    5454                                                foreach ( $blog_users as $user ) {
    55                                                         if ( $user->user_id != $val && !in_array( $user->user_id, $allusers ) )
    56                                                                 $user_list .= "<option value='{$user->user_id}'>{$user->user_login}</option>";
     55                                                        if ( $user->user_id != $val && !in_array( $user->id, $allusers ) )
     56                                                                $user_list .= "<option value='{$user->id}'>{$user->user_login}</option>";
    5757                                                }
    5858                                                if ( '' == $user_list )
    5959                                                        $user_list = $admin_out;
     
    687687                else
    688688                        wp_new_user_notification( $user_id, $password );
    689689
    690                 if ( get_site_option( 'dashboard_blog' ) == false )
    691                         add_user_to_blog( $current_site->blog_id, $user_id, get_site_option( 'default_user_role', 'subscriber' ) );
    692                 else
    693                         add_user_to_blog( get_site_option( 'dashboard_blog' ), $user_id, get_site_option( 'default_user_role', 'subscriber' ) );
    694 
    695690                wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => 'add' ), wp_get_referer() ) );
    696691                exit();
    697692        break;
  • wp-admin/network/sites.php

     
    1818$title = __( 'Sites' );
    1919$parent_file = 'sites.php';
    2020
     21add_screen_option( 'per_page', array('label' => _x( 'Sites', 'sites per page (screen options)' )) );
     22
    2123if ( isset( $_REQUEST['action'] ) && 'editblog' == $_REQUEST['action'] ) {
    2224        add_contextual_help($current_screen,
    2325                '<p>' . __('This extensive list of options has five modules: Site Info, Site Options, allowing Site Themes for this given site, changing user roles and passwords for that site, adding a new user, and Miscellaneous Site Actions (upload size limits).') . '</p>' .
     
    109111                require_once( '../admin-header.php' );
    110112                ?>
    111113                <div class="wrap">
    112                 <?php screen_icon(); ?>
     114                <?php screen_icon('index'); ?>
    113115                <h2><?php _e( 'Edit Site' ); ?> - <a href="<?php echo esc_url( get_home_url( $id ) ); ?>"><?php echo esc_url( get_home_url( $id ) ); ?></a></h2>
    114116                <?php echo $msg; ?>
    115117                <form method="post" action="edit.php?action=updateblog">
     
    347349                ?>
    348350
    349351                <div class="wrap">
    350                 <?php screen_icon(); ?>
     352                <?php screen_icon('index'); ?>
    351353                <h2><?php _e('Sites') ?>
    352354                <?php echo $msg; ?>
    353355                <a href="#form-add-site" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'sites' ); ?></a>
  • wp-admin/network/upgrade.php

     
    3232        wp_die( __( 'You do not have permission to access this page.' ) );
    3333
    3434echo '<div class="wrap">';
    35 screen_icon();
     35screen_icon('tools');
    3636echo '<h2>' . __( 'Update Network' ) . '</h2>';
    3737
    3838$action = isset($_GET['action']) ? $_GET['action'] : 'show';
  • wp-admin/menu.php

     
    232232        'themes' => 'appearance',
    233233        );
    234234
    235 require(ABSPATH . 'wp-admin/includes/menu.php');
     235require_once(ABSPATH . 'wp-admin/includes/menu.php');
    236236
    237237?>
  • wp-admin/plugins.php

     
    290290wp_enqueue_script('plugin-install');
    291291add_thickbox();
    292292
     293add_screen_option( 'per_page', array('label' => _x( 'Plugins', 'plugins per page (screen options)' ), 'default' => 999) );
     294
    293295add_contextual_help($current_screen,
    294296        '<p>' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '</p>' .
    295297        '<p>' . sprintf(__('You can find additional plugins for your site by using the <a href="%1$s">Plugin Browser/Installer</a> functionality or by browsing the <a href="%2$s" target="_blank">WordPress Plugin Directory</a> directly and installing new plugins manually. To manually install a plugin you generally just need to upload the plugin file into your <code>/wp-content/plugins</code> directory. Once a plugin has been installed, you can activate it here.'), 'plugin-install.php', 'http://wordpress.org/extend/plugins/') . '</p>' .
  • wp-admin/edit.php

     
    163163        );
    164164}
    165165
     166add_screen_option( 'per_page', array('label' => $title, 'default' => 20) );
     167
    166168require_once('./admin-header.php');
    167169?>
    168170<div class="wrap">
  • wp-admin/index-extra.php

     
    1010require_once( './admin.php' );
    1111
    1212/** Load WordPress Administration Dashboard API */
    13 require( './includes/dashboard.php' );
     13require(ABSPATH . 'wp-admin/includes/dashboard.php' );
    1414
    1515@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
    1616send_nosniff_header();
  • wp-admin/user-edit.php

     
    3131        $submenu_file = 'users.php';
    3232else
    3333        $submenu_file = 'profile.php';
    34 $parent_file = 'users.php';
    3534
     35if ( current_user_can('edit_users') && !is_user_admin() )
     36        $parent_file = 'users.php';
     37else
     38        $parent_file = 'profile.php';
     39
    3640// contextual help - choose Help on the top right of admin panel to preview this.
    3741add_contextual_help($current_screen,
    3842    '<p>' . __('Your profile contains information about you (your &#8220;account&#8221;) as well as some personal options related to using WordPress.') . '</p>' .
  • wp-admin/user/profile.php

     
     1<?php
     2
     3require_once( './admin.php' );
     4
     5require( '../profile.php' );
     6 No newline at end of file
  • wp-admin/user/user-edit.php

    Property changes on: wp-admin/user/profile.php
    ___________________________________________________________________
    Added: svn:eol-style
       + native
    
     
     1<?php
     2
     3require_once( './admin.php' );
     4
     5require( '../user-edit.php' );
     6 No newline at end of file
  • wp-admin/user/menu.php

    Property changes on: wp-admin/user/user-edit.php
    ___________________________________________________________________
    Added: svn:eol-style
       + native
    
     
     1<?php
     2
     3/* translators: Network menu item */
     4$menu[0] = array(__('Dashboard'), 'exist', 'index.php', '', 'menu-top menu-top-first menu-icon-site', 'menu-site', 'div');
     5
     6$menu[4] = array( '', 'exist', 'separator1', '', 'wp-menu-separator' );
     7
     8$menu[70] = array( __('Profile'), 'exist', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'div' );
     9
     10$menu[99] = array( '', 'exist', 'separator-last', '', 'wp-menu-separator-last' );
     11
     12$_wp_real_parent_file['users.php'] = 'profile.php';
     13$compat = array();
     14$submenu = array();
     15
     16require_once(ABSPATH . 'wp-admin/includes/menu.php');
     17
     18?>
     19 No newline at end of file
  • wp-admin/user/index.php

    Property changes on: wp-admin/user/menu.php
    ___________________________________________________________________
    Added: svn:eol-style
       + native
    
     
     1<?php
     2
     3require_once( './admin.php' );
     4
     5require( '../index.php' );
  • wp-admin/user/admin.php

    Property changes on: wp-admin/user/index.php
    ___________________________________________________________________
    Added: svn:eol-style
       + native
    
     
     1<?php
     2
     3define('WP_USER_ADMIN', TRUE);
     4
     5require_once( dirname(dirname(__FILE__)) . '/admin.php');
     6
     7if ( ! is_main_site() )
     8        wp_redirect( user_admin_url() );
     9
     10?>
  • wp-admin/user/index-extra.php

    Property changes on: wp-admin/user/admin.php
    ___________________________________________________________________
    Added: svn:eol-style
       + native
    
     
     1<?php
     2
     3require_once( './admin.php' );
     4
     5require( '../index-extra.php' );