diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 2a4a2771f..b7a939e3d 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -723,13 +723,13 @@ case 'add-menu-item' : require_once ABSPATH . 'wp-admin/includes/nav-menu.php'; - // For performance reasons, we omit some object properties from the checklist. + // For performance reasons, we omit some object properties from the checklist. // The following is a hacky way to restore them when adding non-custom items. $menu_items_data = array(); foreach ( (array) $_POST['menu-item'] as $menu_item_data ) { if ( - ! empty( $menu_item_data['menu-item-type'] ) && + ! empty( $menu_item_data['menu-item-type'] ) && 'custom' != $menu_item_data['menu-item-type'] && ! empty( $menu_item_data['menu-item-object-id'] ) ) { @@ -739,19 +739,19 @@ case 'add-menu-item' : break; case 'taxonomy' : - $_object = get_term( $menu_item_data['menu-item-object-id'], $menu_item_data['menu-item-object'] ); + $_object = get_term( $menu_item_data['menu-item-object-id'], $menu_item_data['menu-item-object'] ); break; } - $_menu_items = array_map( 'wp_setup_nav_menu_item', array( $_object ) ); + $_menu_items = array_map( 'wp_setup_nav_menu_item', array( $_object ) ); $_menu_item = array_shift( $_menu_items ); // Restore the missing menu item properties $menu_item_data['menu-item-description'] = $_menu_item->description; } - + $menu_items_data[] = $menu_item_data; - } + } $item_ids = wp_save_nav_menu_items( 0, $menu_items_data ); if ( is_wp_error( $item_ids ) ) @@ -1077,7 +1077,7 @@ case 'wp-link-ajax': require_once ABSPATH . WPINC . '/js/tinymce/wp-mce-link-includes.php'; wp_link_ajax( $_POST ); - + exit; break; case 'menu-locations-save': diff --git a/wp-admin/css/colors-classic.dev.css b/wp-admin/css/colors-classic.dev.css index 52e196933..019f4bc87 100644 --- a/wp-admin/css/colors-classic.dev.css +++ b/wp-admin/css/colors-classic.dev.css @@ -1126,8 +1126,8 @@ table.widefat .spam a:hover, .folded #adminmenu li.wp-has-current-submenu, .folded #adminmenu li.menu-top.current { - background: #e0e0e0 url(../images/menu-bits-vs.gif?ver=20101102) top left repeat-x; - border: #5589aa 1px solid; + background: #e0e0e0 url(../images/menu-bits-vs.gif?ver=20101102) top left repeat-x; + border: #5589aa 1px solid; color: #464646; } diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index c26989219..51bbdc35a 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -10,7 +10,7 @@ require_once('./admin.php'); if ( !current_user_can('edit_posts') ) wp_die(__('Cheatin’ uh?')); - + $wp_list_table = get_list_table('WP_Comments_List_Table'); $wp_list_table->check_permissions(); diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index d3635cfe0..c7703a8ea 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -11,7 +11,7 @@ require_once('./admin.php'); $tax = get_taxonomy( $taxnow ); if ( !current_user_can( $tax->cap->manage_terms ) ) wp_die( __( 'Cheatin’ uh?' ) ); - + $wp_list_table = get_list_table('WP_Terms_List_Table'); $wp_list_table->check_permissions(); diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index 63d72bc37..509bf2529 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -98,7 +98,7 @@ class WP_Media_List_Table extends WP_List_Table { if ( $this->detached ) { submit_button( __( 'Scan for lost attachments' ), 'secondary', 'find_detached', false ); - } elseif ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) { + } elseif ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) { submit_button( __( 'Empty Trash' ), 'button-secondary apply', 'delete_all', false ); } ?> diff --git a/wp-admin/includes/class-wp-ms-sites-list-table.php b/wp-admin/includes/class-wp-ms-sites-list-table.php index 7c26acf57..2034fafb2 100644 --- a/wp-admin/includes/class-wp-ms-sites-list-table.php +++ b/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -194,7 +194,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table { echo ""; $blogname = ( is_subdomain_install() ) ? str_replace( '.'.$current_site->domain, '', $blog['domain'] ) : $blog['path']; - + list( $columns, $hidden ) = $this->get_column_info(); foreach ( $columns as $column_name => $column_display_name ) { diff --git a/wp-admin/includes/class-wp-ms-themes-list-table.php b/wp-admin/includes/class-wp-ms-themes-list-table.php index 47c2fc90b..ec61c8ddc 100644 --- a/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -7,7 +7,7 @@ * @since 3.1.0 */ class WP_MS_Themes_List_Table extends WP_List_Table { - + var $site_id; var $is_site_themes; @@ -34,7 +34,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { 'plural' => 'plugins', // @todo replace with themes and add css ) ); } - + function check_permissions() { if ( is_multisite() ) { $menu_perms = get_site_option( 'menu_items', array() ); @@ -45,9 +45,9 @@ class WP_MS_Themes_List_Table extends WP_List_Table { } } - if ( $this->is_site_themes && !current_user_can('manage_sites') ) - wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) ); - else if ( !$this->is_site_themes && !current_user_can('manage_network_themes') ) + if ( $this->is_site_themes && !current_user_can('manage_sites') ) + wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) ); + else if ( !$this->is_site_themes && !current_user_can('manage_network_themes') ) wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) ); } @@ -64,7 +64,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { 'upgrade' => array() ); - $site_allowed_themes = get_site_allowed_themes(); + $site_allowed_themes = get_site_allowed_themes(); if ( !$this->is_site_themes ) { $allowed_themes = $site_allowed_themes; $themes_per_page = $this->get_items_per_page( 'themes_network_per_page' ); @@ -72,7 +72,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { $allowed_themes = wpmu_get_blog_allowedthemes( $this->site_id ); $themes_per_page = $this->get_items_per_page( 'site_themes_network_per_page' ); } - + $current = get_site_transient( 'update_themes' ); foreach ( (array) $themes['all'] as $key => $theme ) { @@ -89,10 +89,10 @@ class WP_MS_Themes_List_Table extends WP_List_Table { if ( isset( $current->response[ $theme['Template'] ] ) ) $themes['upgrade'][$key] = $themes['all'][$key]; - if ( $this->is_site_themes && isset( $site_allowed_themes[$theme_key] ) ) { - unset( $themes['all'][$key] ); - unset( $themes['enabled'][$key] ); - unset( $themes['disabled'][$key] ); + if ( $this->is_site_themes && isset( $site_allowed_themes[$theme_key] ) ) { + unset( $themes['all'][$key] ); + unset( $themes['enabled'][$key] ); + unset( $themes['disabled'][$key] ); } } @@ -131,7 +131,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { 'per_page' => $themes_per_page, ) ); } - + function _search_callback( $theme ) { static $term; if ( is_null( $term ) ) @@ -211,9 +211,9 @@ class WP_MS_Themes_List_Table extends WP_List_Table { break; } - if ( $this->is_site_themes ) - $url = 'site-themes.php?id=' . $this->site_id; - else + if ( $this->is_site_themes ) + $url = 'site-themes.php?id=' . $this->site_id; + else $url = 'themes.php'; $status_links[$type] = sprintf( "%s", @@ -236,7 +236,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { $actions['disable-selected'] = __( 'Disable' ); if ( current_user_can( 'update_themes' ) ) $actions['update-selected'] = __( 'Update' ); - + return $actions; } @@ -332,7 +332,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { echo implode( ' | ', $theme_meta ); echo ""; - break; + break; break; default: echo ""; diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php index 1f2959082..8e764d3d9 100644 --- a/wp-admin/includes/class-wp-plugins-list-table.php +++ b/wp-admin/includes/class-wp-plugins-list-table.php @@ -257,7 +257,7 @@ class WP_Plugins_List_Table extends WP_List_Table { $screen = get_current_screen(); if ( 'active' != $status ) { - $action = $screen->is_network ? 'network-activate-selected' : 'activate-selected'; + $action = $screen->is_network ? 'network-activate-selected' : 'activate-selected'; $actions[ $action ] = __( 'Activate' ); } @@ -432,7 +432,7 @@ class WP_Plugins_List_Table extends WP_List_Table { } if ( ! empty( $plugin_data['PluginURI'] ) ) $plugin_meta[] = '' . __( 'Visit plugin site' ) . ''; - + $plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status ); echo implode( ' | ', $plugin_meta ); diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index 331e44d85..18b7aa2c7 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -666,7 +666,7 @@ class WP_Posts_List_Table extends WP_List_Table { default: ?> - >>post_type ) do_action( 'manage_pages_custom_column', $column_name, $post->ID ); else diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 2d129a1a6..f5fa23ca8 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -149,7 +149,7 @@ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_ list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 ); $widget_name .= ' ' . __( 'Configure' ) . ''; } - + if ( is_blog_admin () ) $side_widgets = array('dashboard_quick_press', 'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary'); else if (is_network_admin() ) @@ -421,7 +421,7 @@ function wp_network_dashboard_right_now() { $user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) ); $blog_text = sprintf( _n( '%s site', '%s sites', $c_blogs ), number_format_i18n( $c_blogs ) ); - + $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text ); if ( $actions ) { diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 721143094..0a0847902 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -96,7 +96,7 @@ function get_home_path() { * * @since 1.5.0 * - * @uses get_home_path + * @uses get_home_path * @uses WP_CONTENT_DIR full filesystem path to the wp-content directory * @param string $file filesystem path relative to the WordPress install directory or to the wp-content directory * @return string full file system path to edit @@ -254,7 +254,7 @@ function validate_file_to_edit( $file, $allowed_files = '' ) { * @uses current_user_can * @uses wp_upload_dir * @uses wp_unique_filename - * @uses delete_transient + * @uses delete_transient * @param array $file Reference to a single element of $_FILES. Call the function once for each uploaded file. * @param array $overrides Optional. An associative array of names=>values to override default variables with extract( $overrides, EXTR_OVERWRITE ). * @return array On success, returns an associative array of file attributes. On failure, returns $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ). diff --git a/wp-admin/includes/list-table.php b/wp-admin/includes/list-table.php index bde883c30..c55eae615 100644 --- a/wp-admin/includes/list-table.php +++ b/wp-admin/includes/list-table.php @@ -17,7 +17,7 @@ */ function get_list_table( $class ) { $class = apply_filters( "get_list_table_$class", $class ); - + require_list_table( $class ); if ( class_exists( $class ) ) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 8aecf4af1..5328c52ef 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -1119,7 +1119,7 @@ function get_media_item( $attachment_id, $args = null ) { $thumb_url = false; $post = get_post( $attachment_id ); - + $default_args = array( 'errors' => null, 'send' => $post->post_parent ? post_type_supports( get_post_type( $post->post_parent ), 'editor' ) : true, 'delete' => true, 'toggle' => true, 'show_title' => true ); $args = wp_parse_args( $args, $default_args ); extract( $args, EXTR_SKIP ); diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 81bff8728..95401e3a1 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -155,7 +155,7 @@ echo esc_html( $visibility_trans ); ?> if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) ) : $post_formats = get_theme_support( 'post-formats' ); -if ( is_array( $post_formats[0] ) ) : +if ( is_array( $post_formats[0] ) ) : $post_format = get_post_format( $post->ID ); if ( !$post_format ) $post_format = '0'; diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index 2e75fb5c2..8851fa72b 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -485,7 +485,7 @@ function is_network_only_plugin( $plugin ) { * * @param string $plugin Plugin path to main plugin file with plugin data. * @param string $redirect Optional. URL to redirect to. - * @param bool $network_wide Whether to enable the plugin for all sites in the + * @param bool $network_wide Whether to enable the plugin for all sites in the * network or just the current site. Multisite only. Default is false. * @param bool $silent Prevent calling activation hooks. Optional, default is false. * @return WP_Error|null WP_Error on invalid file or null on success. diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 4ea76bf7b..b4008241c 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -2119,7 +2119,7 @@ function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit', $ $class = $type; // Custom cases can just pass in the classes they want to be used endswitch; $text = ( NULL == $text ) ? __( 'Save Changes' ) : $text; - + $attributes = ''; if ( is_array( $other_attributes ) ) { foreach ( $other_attributes as $attribute => $value ) { @@ -2128,19 +2128,19 @@ function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit', $ } else if ( !empty( $other_attributes ) ) { // Attributes provided as a string $attributes = $other_attributes; } - + // Default the id attribute to $name unless an id was specifically provided in $other_attributes $id = $name; if ( is_array( $other_attributes ) && isset( $other_attributes['id'] ) ) $id = $other_attributes['id']; - + $button = ''; - + if ( $wrap ) { $button = '

' . $button . '

'; } - + return $button; } diff --git a/wp-admin/js/list-table.dev.js b/wp-admin/js/list-table.dev.js index 76b4977e7..ec07525f5 100644 --- a/wp-admin/js/list-table.dev.js +++ b/wp-admin/js/list-table.dev.js @@ -69,7 +69,7 @@ window.listTable = { if ( true === value ) data[key] = ''; else - data[key] = value; + data[key] = value; }); this._callback = callback; diff --git a/wp-admin/media.php b/wp-admin/media.php index da75371de..b26851282 100644 --- a/wp-admin/media.php +++ b/wp-admin/media.php @@ -66,7 +66,7 @@ case 'edit' : wp_enqueue_script( 'wp-ajax-response' ); wp_enqueue_script('image-edit'); wp_enqueue_style('imgareaselect'); - + add_contextual_help( $current_screen, '

' . __('This screen allows you to edit five fields for metadata in a file within the media library.') . '

' . '

' . __('For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.') . '

' . diff --git a/wp-admin/widgets.php b/wp-admin/widgets.php index 62a296bed..4ae5478f1 100644 --- a/wp-admin/widgets.php +++ b/wp-admin/widgets.php @@ -311,7 +311,7 @@ if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) { diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index 096b0bb2d..4ac368de8 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -4,7 +4,7 @@ * * This code handles the building and rendering of the press bar. */ - + /** * Instantiate the admin bar object and set it up as a global for access elsewhere. * @@ -22,11 +22,11 @@ function wp_admin_bar_init() { /* Instantiate the admin bar */ $admin_bar_class = apply_filters( 'wp_admin_bar_class', 'WP_Admin_Bar' ); - if ( class_exists( $admin_bar_class ) ) + if ( class_exists( $admin_bar_class ) ) $wp_admin_bar = new $admin_bar_class; else return false; - + $wp_admin_bar->initialize(); $wp_admin_bar->add_menus(); @@ -60,7 +60,7 @@ function wp_admin_bar_render() { $wp_admin_bar->render(); do_action( 'wp_after_admin_bar_render' ); - + $wp_admin_bar->unload_user_locale_translations(); } add_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); @@ -87,11 +87,11 @@ function wp_admin_bar_my_account_menu() { global $wp_admin_bar, $user_identity; $user_id = get_current_user_id(); - + if ( 0 != $user_id ) { /* Add the 'My Account' menu */ $wp_admin_bar->add_menu( array( 'id' => 'my-account', 'title' => $user_identity, 'href' => get_edit_profile_url( $user_id ) ) ); - + /* Add the "My Account" sub menus */ $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Edit My Profile' ), 'href' => get_edit_profile_url( $user_id ) ) ); if ( is_multisite() ) @@ -157,7 +157,7 @@ function wp_admin_bar_blog_separator() { /** * Provide a shortlink. - * + * * @since 3.1.0 */ function wp_admin_bar_shortlink_menu() { @@ -171,7 +171,7 @@ function wp_admin_bar_shortlink_menu() { /** * Provide an edit link for posts and terms. - * + * * @since 3.1.0 */ function wp_admin_bar_edit_menu () { @@ -197,7 +197,7 @@ function wp_admin_bar_new_content_menu() { $ptype_obj = get_post_type_object( $ptype ); if ( $ptype_obj->show_in_menu !== true || ! current_user_can( $ptype_obj->cap->edit_posts ) ) continue; - + $actions["post-new.php?post_type=$ptype"] = array( $ptype_obj->labels->singular_name, $ptype_obj->cap->edit_posts, "new-$ptype" ); } @@ -259,7 +259,7 @@ function wp_admin_bar_updates_menu() { if ( !empty($update_wordpress) && !in_array( $update_wordpress[0]->response, array('development', 'latest') ) ) $wordpress_update_count = 1; */ - + $update_count = $plugin_update_count + $theme_update_count + $wordpress_update_count; if ( !$update_count ) @@ -297,16 +297,16 @@ function wp_admin_bar_header() { function wp_admin_body_style() { ?>