Ticket #14696: 14696.diff
File 14696.diff, 32.5 KB (added by , 14 years ago) |
---|
-
wp-includes/vars.php
15 15 // On which page are we ? 16 16 if ( is_admin() ) { 17 17 // 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); 19 24 $pagenow = $self_matches[1]; 20 25 $pagenow = trim($pagenow, '/'); 21 26 $pagenow = preg_replace('#\?.*?$#', '', $pagenow); -
wp-includes/load.php
621 621 } 622 622 623 623 /** 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 */ 633 function is_user_admin() { 634 if ( defined( 'WP_USER_ADMIN' ) ) 635 return WP_USER_ADMIN; 636 return false; 637 } 638 639 /** 624 640 * Whether Multisite support is enabled 625 641 * 626 642 * @since 3.0.0 -
wp-includes/link-template.php
2130 2130 } 2131 2131 2132 2132 /** 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 */ 2142 function 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 /** 2133 2152 * Retrieve the url to the admin area for either the current blog or the network depending on context. 2134 2153 * 2135 2154 * @package WordPress … … 2142 2161 function self_admin_url($path = '', $scheme = 'admin') { 2143 2162 if ( is_network_admin() ) 2144 2163 return network_admin_url($path, $scheme); 2164 elseif ( is_user_admin() ) 2165 return user_admin_url($path, $scheme); 2145 2166 else 2146 2167 return admin_url($path, $scheme); 2147 2168 } -
wp-includes/capabilities.php
737 737 738 738 // Must have ALL requested caps 739 739 $capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args ); 740 $capabilities['exist'] = true; // Everyone is allowed to exist 740 741 foreach ( (array) $caps as $cap ) { 741 742 //echo "Checking cap $cap<br />"; 742 743 if ( empty( $capabilities[$cap] ) || !$capabilities[$cap] ) -
wp-includes/pluggable.php
81 81 return; 82 82 83 83 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') ) { 85 85 wp_set_current_user(0); 86 86 return false; 87 87 } … … 775 775 } 776 776 } 777 777 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) ) { 779 784 do_action('auth_redirect', $user_id); 780 785 781 786 // If the user wants ssl but the session is not ssl, redirect. -
wp-includes/ms-functions.php
72 72 function get_active_blog_for_user( $user_id ) { 73 73 global $wpdb; 74 74 $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; 82 77 83 78 $primary_blog = get_user_meta( $user_id, 'primary_blog', true ); 84 79 $details = get_dashboard_blog(); … … 120 115 } 121 116 } 122 117 } 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; 128 119 } 129 120 return $ret; 130 121 } else { -
wp-admin/users.php
18 18 $title = __('Users'); 19 19 $parent_file = 'users.php'; 20 20 21 add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) ); 22 21 23 // contextual help - choose Help on the top right of admin panel to preview this. 22 24 add_contextual_help($current_screen, 23 25 '<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
105 105 else 106 106 $title = __('Comments'); 107 107 108 add_screen_option( 'per_page', array('label' => _x( 'Comments', 'comments per page (screen options)' )) ); 109 108 110 add_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>' . 109 111 '<p>' . __('A yellow row means the comment is waiting for you to moderate it.') . '</p>' . 110 112 '<p>' . __('In the Author column, in addition to the author’s name, email address, and blog URL, the commenter’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
9 9 10 10 if ( is_network_admin() ) 11 11 do_action('_network_admin_menu'); 12 elseif ( is_user_admin() ) 13 do_action('_user_admin_menu'); 12 14 else 13 15 do_action('_admin_menu'); 14 16 … … 89 91 90 92 if ( is_network_admin() ) 91 93 do_action('network_admin_menu', ''); 94 elseif ( is_user_admin() ) 95 do_action('user_admin_menu', ''); 92 96 else 93 97 do_action('admin_menu', ''); 94 98 -
wp-admin/includes/default-list-tables.php
2719 2719 2720 2720 function WP_Sites_Table() { 2721 2721 parent::WP_List_Table( array( 2722 'screen' => ' ms-sites',2722 'screen' => 'sites-network', 2723 2723 'plural' => 'sites', 2724 2724 ) ); 2725 2725 } … … 2734 2734 2735 2735 $mode = ( empty( $_REQUEST['mode'] ) ) ? 'list' : $_REQUEST['mode']; 2736 2736 2737 $per_page = $this->get_items_per_page( ' ms_sites_per_page' );2737 $per_page = $this->get_items_per_page( 'sites_network_per_page' ); 2738 2738 2739 2739 $pagenum = $this->get_pagenum(); 2740 2740 … … 3007 3007 3008 3008 function WP_MS_Users_Table() { 3009 3009 parent::WP_List_Table( array( 3010 'screen' => ' ms-users',3010 'screen' => 'users-network', 3011 3011 ) ); 3012 3012 } 3013 3013 … … 3024 3024 3025 3025 $usersearch = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : ''; 3026 3026 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' ); 3028 3028 3029 3029 $paged = $this->get_pagenum(); 3030 3030 -
wp-admin/includes/dashboard.php
25 25 /* Register Widgets and Controls */ 26 26 27 27 // 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' ); 29 30 30 31 // 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' ); 36 41 } 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' );39 42 40 43 // 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' ); 51 57 } 52 wp_add_dashboard_widget( 'dashboard_incoming_links', __( 'Incoming Links' ), 'wp_dashboard_incoming_links', 'wp_dashboard_incoming_links_control' );53 58 54 59 // WP Plugins Widget 55 if ( current_user_can( 'install_plugins' ) )60 if ( is_blog_admin() && current_user_can( 'install_plugins' ) ) 56 61 wp_add_dashboard_widget( 'dashboard_plugins', __( 'Plugins' ), 'wp_dashboard_plugins' ); 57 62 58 63 // QuickPress Widget 59 if ( current_user_can('edit_posts') )64 if ( is_blog_admin() && current_user_can('edit_posts') ) 60 65 wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' ); 61 66 62 67 // Recent Drafts 63 if ( current_user_can('edit_posts') )68 if ( is_blog_admin() && current_user_can('edit_posts') ) 64 69 wp_add_dashboard_widget( 'dashboard_recent_drafts', __('Recent Drafts'), 'wp_dashboard_recent_drafts' ); 65 70 66 71 // Primary feed (Dev Blog) Widget … … 132 137 list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 ); 133 138 $widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( "$url#$widget_id" ) . '" class="edit-box open-box">' . __( 'Configure' ) . '</a></span>'; 134 139 } 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'); 136 144 $location = 'normal'; 137 145 if ( in_array($widget_id, $side_widgets) ) 138 146 $location = 'side'; -
wp-admin/includes/misc.php
343 343 344 344 switch ( $map_option ) { 345 345 case 'edit_per_page': 346 case ' ms_sites_per_page':346 case 'sites_network_per_page': 347 347 case 'users_per_page': 348 case ' ms_users_per_page':348 case 'users_network_per_page': 349 349 case 'edit_comments_per_page': 350 350 case 'upload_per_page': 351 351 case 'edit_tags_per_page': -
wp-admin/includes/template.php
1390 1390 if ( is_string($screen) ) 1391 1391 $screen = convert_to_screen($screen); 1392 1392 1393 if ( $screen->is_user ) 1394 return; 1395 1393 1396 if ( isset($screen->post_type) ) { 1394 1397 $post_type_object = get_post_type_object($screen->post_type); 1395 1398 if ( 'add' != $screen->action ) … … 1830 1833 return $return; 1831 1834 } 1832 1835 1836 function 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 1833 1845 function screen_options($screen) { 1846 global $wp_current_screen_options; 1847 1834 1848 if ( is_string($screen) ) 1835 1849 $screen = convert_to_screen($screen); 1836 1850 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 ''; 1869 1853 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']; 1876 1860 } 1877 1861 1878 1862 $per_page = (int) get_user_option( $option ); 1879 1863 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']; 1882 1866 else 1883 1867 $per_page = 20; 1884 1868 } … … 2060 2044 } 2061 2045 2062 2046 $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 } 2063 2056 2064 2057 $current_screen = apply_filters('current_screen', $current_screen); 2065 2058 } -
wp-admin/includes/ms.php
502 502 $c ++; 503 503 504 504 $blog = get_active_blog_for_user( get_current_user_id() ); 505 $dashboard_blog = get_dashboard_blog(); 505 506 506 if ( is_object( $blog ) ) { 507 507 wp_redirect( get_admin_url( $blog->blog_id, '?c=' . $c ) ); // redirect and count to 5, "just in case" 508 508 exit; 509 } else { 510 wp_redirect( user_admin_url( '?c=' . $c ) ); // redirect and count to 5, "just in case" 509 511 } 510 512 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 blog514 */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 }528 513 wp_die( __( 'You do not have sufficient permissions to access this page.' ) ); 529 514 } 530 515 add_action( 'admin_page_access_denied', 'redirect_user_to_blog', 99 ); -
wp-admin/edit-tags.php
22 22 $submenu_file = "edit-tags.php?taxonomy=$taxonomy"; 23 23 } 24 24 25 add_screen_option( 'per_page', array('label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page') ); 26 25 27 switch ( $wp_list_table->current_action() ) { 26 28 27 29 case 'add-tag': -
wp-admin/admin.php
11 11 * 12 12 * @since unknown 13 13 */ 14 if ( ! defined('WP_ADMIN') )14 if ( ! defined('WP_ADMIN') ) 15 15 define('WP_ADMIN', TRUE); 16 16 17 if ( ! defined('WP_NETWORK_ADMIN') ) {17 if ( ! defined('WP_NETWORK_ADMIN') ) 18 18 define('WP_NETWORK_ADMIN', FALSE); 19 20 if ( ! defined('WP_USER_ADMIN') ) 21 define('WP_USER_ADMIN', FALSE); 22 23 if ( ! WP_NETWORK_ADMIN && ! WP_USER_ADMIN ) { 19 24 define('WP_BLOG_ADMIN', TRUE); 20 25 } 21 26 … … 97 102 98 103 if ( WP_NETWORK_ADMIN ) 99 104 require(ABSPATH . 'wp-admin/network/menu.php'); 105 elseif ( WP_USER_ADMIN ) 106 require(ABSPATH . 'wp-admin/user/menu.php'); 100 107 else 101 108 require(ABSPATH . 'wp-admin/menu.php'); 102 109 -
wp-admin/index.php
42 42 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 43 43 ); 44 44 45 require_once('./admin-header.php');45 include (ABSPATH . 'wp-admin/admin-header.php'); 46 46 47 47 $today = current_time('mysql', 1); 48 48 ?> -
wp-admin/upload.php
134 134 wp_enqueue_script( 'jquery-ui-draggable' ); 135 135 wp_enqueue_script( 'media' ); 136 136 137 add_screen_option( 'per_page', array('label' => _x( 'Media items', 'items per page (screen options)' )) ); 138 137 139 add_contextual_help( $current_screen, 138 140 '<p>' . __('All the files you’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>' . 139 141 '<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
43 43 ?> 44 44 45 45 <div class="wrap"> 46 <?php screen_icon( ); ?>46 <?php screen_icon('options-general'); ?> 47 47 <h2><?php _e( 'Network Options' ) ?></h2> 48 48 <form method="post" action="edit.php?action=siteoptions"> 49 49 <?php wp_nonce_field( 'siteoptions' ); ?> -
wp-admin/network/users.php
16 16 $title = __( 'Users' ); 17 17 $parent_file = 'users.php'; 18 18 19 add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) ); 20 19 21 add_contextual_help($current_screen, 20 22 '<p>' . __('This table shows all users across the network and the sites to which they are assigned.') . '</p>' . 21 23 '<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
52 52 $user_dropdown = "<select name='blog[$val][{$key}]'>"; 53 53 $user_list = ''; 54 54 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>"; 57 57 } 58 58 if ( '' == $user_list ) 59 59 $user_list = $admin_out; … … 687 687 else 688 688 wp_new_user_notification( $user_id, $password ); 689 689 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 else693 add_user_to_blog( get_site_option( 'dashboard_blog' ), $user_id, get_site_option( 'default_user_role', 'subscriber' ) );694 695 690 wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => 'add' ), wp_get_referer() ) ); 696 691 exit(); 697 692 break; -
wp-admin/network/sites.php
18 18 $title = __( 'Sites' ); 19 19 $parent_file = 'sites.php'; 20 20 21 add_screen_option( 'per_page', array('label' => _x( 'Sites', 'sites per page (screen options)' )) ); 22 21 23 if ( isset( $_REQUEST['action'] ) && 'editblog' == $_REQUEST['action'] ) { 22 24 add_contextual_help($current_screen, 23 25 '<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>' . … … 109 111 require_once( '../admin-header.php' ); 110 112 ?> 111 113 <div class="wrap"> 112 <?php screen_icon( ); ?>114 <?php screen_icon('index'); ?> 113 115 <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> 114 116 <?php echo $msg; ?> 115 117 <form method="post" action="edit.php?action=updateblog"> … … 347 349 ?> 348 350 349 351 <div class="wrap"> 350 <?php screen_icon( ); ?>352 <?php screen_icon('index'); ?> 351 353 <h2><?php _e('Sites') ?> 352 354 <?php echo $msg; ?> 353 355 <a href="#form-add-site" class="button add-new-h2"><?php echo esc_html_x( 'Add New', 'sites' ); ?></a> -
wp-admin/network/upgrade.php
32 32 wp_die( __( 'You do not have permission to access this page.' ) ); 33 33 34 34 echo '<div class="wrap">'; 35 screen_icon( );35 screen_icon('tools'); 36 36 echo '<h2>' . __( 'Update Network' ) . '</h2>'; 37 37 38 38 $action = isset($_GET['action']) ? $_GET['action'] : 'show'; -
wp-admin/menu.php
232 232 'themes' => 'appearance', 233 233 ); 234 234 235 require (ABSPATH . 'wp-admin/includes/menu.php');235 require_once(ABSPATH . 'wp-admin/includes/menu.php'); 236 236 237 237 ?> -
wp-admin/plugins.php
290 290 wp_enqueue_script('plugin-install'); 291 291 add_thickbox(); 292 292 293 add_screen_option( 'per_page', array('label' => _x( 'Plugins', 'plugins per page (screen options)' ), 'default' => 999) ); 294 293 295 add_contextual_help($current_screen, 294 296 '<p>' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '</p>' . 295 297 '<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
163 163 ); 164 164 } 165 165 166 add_screen_option( 'per_page', array('label' => $title, 'default' => 20) ); 167 166 168 require_once('./admin-header.php'); 167 169 ?> 168 170 <div class="wrap"> -
wp-admin/index-extra.php
10 10 require_once( './admin.php' ); 11 11 12 12 /** Load WordPress Administration Dashboard API */ 13 require( './includes/dashboard.php' );13 require(ABSPATH . 'wp-admin/includes/dashboard.php' ); 14 14 15 15 @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); 16 16 send_nosniff_header(); -
wp-admin/user-edit.php
31 31 $submenu_file = 'users.php'; 32 32 else 33 33 $submenu_file = 'profile.php'; 34 $parent_file = 'users.php';35 34 35 if ( current_user_can('edit_users') && !is_user_admin() ) 36 $parent_file = 'users.php'; 37 else 38 $parent_file = 'profile.php'; 39 36 40 // contextual help - choose Help on the top right of admin panel to preview this. 37 41 add_contextual_help($current_screen, 38 42 '<p>' . __('Your profile contains information about you (your “account”) as well as some personal options related to using WordPress.') . '</p>' . -
wp-admin/user/profile.php
1 <?php 2 3 require_once( './admin.php' ); 4 5 require( '../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 3 require_once( './admin.php' ); 4 5 require( '../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 16 require_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 3 require_once( './admin.php' ); 4 5 require( '../index.php' ); -
wp-admin/user/admin.php
Property changes on: wp-admin/user/index.php ___________________________________________________________________ Added: svn:eol-style + native
1 <?php 2 3 define('WP_USER_ADMIN', TRUE); 4 5 require_once( dirname(dirname(__FILE__)) . '/admin.php'); 6 7 if ( ! 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 3 require_once( './admin.php' ); 4 5 require( '../index-extra.php' );