diff --git a/wp-admin/css/colors-fresh.dev.css b/wp-admin/css/colors-fresh.dev.css index 4d36834748..0c988c21e5 100644 --- a/wp-admin/css/colors-fresh.dev.css +++ b/wp-admin/css/colors-fresh.dev.css @@ -1071,7 +1071,7 @@ table.widefat .spam a:hover, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, #adminmenu li.current a.menu-top { - background: #aaa url(../images/menu-bits.gif) top left repeat-x; + background: #aaa url(../images/menu-bits.gif) top left repeat-x; border: #aaa 1px solid; color: #000; } diff --git a/wp-admin/css/install.dev.css b/wp-admin/css/install.dev.css index 37d34688d4..672c011b55 100644 --- a/wp-admin/css/install.dev.css +++ b/wp-admin/css/install.dev.css @@ -207,6 +207,6 @@ textarea { .message { border: 1px solid #e6db55; padding: 0.3em 0.6em; - margin: 5px 0 15px; + margin: 5px 0 15px; background-color: #ffffe0; } diff --git a/wp-admin/css/nav-menu-rtl.dev.css b/wp-admin/css/nav-menu-rtl.dev.css index b5a9e181d5..3768454228 100644 --- a/wp-admin/css/nav-menu-rtl.dev.css +++ b/wp-admin/css/nav-menu-rtl.dev.css @@ -88,7 +88,7 @@ } #side-sortables .potential-menu-item ul { margin-right: 0; - + } /* Button Primary Actions */ diff --git a/wp-admin/css/nav-menu.dev.css b/wp-admin/css/nav-menu.dev.css index 00e611f20e..78b5097a03 100644 --- a/wp-admin/css/nav-menu.dev.css +++ b/wp-admin/css/nav-menu.dev.css @@ -213,7 +213,7 @@ body { #menu-container .submit { margin: 0px 0px 10px; padding: 0px; } .meta-sep, -.submitdelete, +.submitdelete, .submitcancel { display:block; float:left; @@ -239,7 +239,7 @@ body { vertical-align: middle; } -.button-controls { +.button-controls { clear:both; margin: 10px 0; } @@ -280,7 +280,7 @@ body { padding: 1em 0; } -.menu ul { +.menu ul { width: 100%; } .menu ul.sub-menu { @@ -525,18 +525,18 @@ clear:both; /* Clearfix */ #menu-item-name-wrap:after, -#menu-item-url-wrap:after, +#menu-item-url-wrap:after, #menu-name-label:after, #menu-settings-column .inside:after, -#nav-menus-frame:after, +#nav-menus-frame:after, #post-body-content:after, -.button-controls:after, +.button-controls:after, .major-publishing-actions:after, .menu-item-settings:after { - clear: both; + clear: both; content: "."; display: block; - height: 0; + height: 0; visibility: hidden; } #nav-menus-frame, .button-controls, #menu-item-url-wrap, #menu-item-name-wrap { display: block; } diff --git a/wp-admin/css/wp-admin.dev.css b/wp-admin/css/wp-admin.dev.css index ac90c6f712..2547732919 100644 --- a/wp-admin/css/wp-admin.dev.css +++ b/wp-admin/css/wp-admin.dev.css @@ -1175,14 +1175,14 @@ div.comment-item:hover .row-actions { #sidemenu li a span.update-plugins { position: absolute; font-family: Helvetica, Arial, sans-serif; - font-size: 9px; + font-size: 9px; line-height: 17px; font-weight: bold; - margin-top: 1px; - margin-left: 7px; - -moz-border-radius: 10px; - -khtml-border-radius: 10px; - -webkit-border-radius: 10px; + margin-top: 1px; + margin-left: 7px; + -moz-border-radius: 10px; + -khtml-border-radius: 10px; + -webkit-border-radius: 10px; border-radius: 10px; } diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index 05e4666628..6da3d191e2 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -118,7 +118,7 @@ class Custom_Image_Header { elseif ( 2 == $step ) wp_enqueue_style('imgareaselect'); } - + /** * Check if header text is allowed * @@ -272,7 +272,7 @@ class Custom_Image_Header { jQuery('#text-color').val(old_color); jQuery('#name').css('color', old_color); jQuery('#desc').css('color', old_color); - pickColor(old_color); + pickColor(old_color); } else { //Hide text jQuery( text_objects.toString() ).hide(); @@ -371,7 +371,7 @@ class Custom_Image_Header { y2: yinit, maxHeight: , maxWidth: , - onInit: function () { + onInit: function () { jQuery('#width').val(xinit); jQuery('#height').val(yinit); }, diff --git a/wp-admin/export.php b/wp-admin/export.php index 13f721cd3c..152d6ac66b 100644 --- a/wp-admin/export.php +++ b/wp-admin/export.php @@ -48,7 +48,7 @@ $stati = "'" . implode("', '", get_post_stati( array( 'internal' => false ), 'na if ( $monthyears = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, YEAR(DATE_ADD(post_date, INTERVAL 1 MONTH)) AS `eyear`, MONTH(DATE_ADD(post_date, INTERVAL 1 MONTH)) AS `emonth` FROM $wpdb->posts WHERE post_type IN ($types) AND post_status IN ($stati) ORDER BY post_date ASC ") ) { foreach ( $monthyears as $k => $monthyear ) $monthyears[$k]->lmonth = $wp_locale->get_month( $monthyear->month, 2 ); - for( $s = 0, $e = count( $monthyears ) - 1; $e >= 0; $s++, $e-- ) { + for( $s = 0, $e = count( $monthyears ) - 1; $e >= 0; $s++, $e-- ) { $dateoptions .= "\t\n"; $edateoptions .= "\t\n"; } diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 2f36bfece1..37e5456c6d 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -1266,7 +1266,7 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin { ); if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) - $install_actions['network_activate'] = '' . __('Network Activate') . ''; + $install_actions['network_activate'] = '' . __('Network Activate') . ''; if ( $this->type == 'web' ) $install_actions['plugins_page'] = '' . __('Return to Plugin Installer') . ''; diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index e289858595..8cf406459f 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -25,65 +25,65 @@ define('WXR_VERSION', '1.0'); */ function export_wp( $args = array() ) { global $wpdb, $post_ids, $post, $wp_taxonomies; - + if ( ! is_array( $args ) ) $args = array( 'author' => $args ); - + $defaults = array( 'author' => null, 'taxonomy' => null, 'post_type' => null, 'post_status' => null, 'start_date' => null, 'end_date' => null ); $args = wp_parse_args( $args, $defaults ); - + extract($args); - + do_action('export_wp'); - + if( strlen( $start_date ) > 4 && strlen( $end_date ) > 4 ) $filename = 'wordpress.' . $start_date . '.' . $end_date . '.xml'; else $filename = 'wordpress.' . date( 'Y-m-d' ) . '.xml'; - + header( 'Content-Description: File Transfer' ); header( 'Content-Disposition: attachment; filename=' . $filename ); header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true ); - + if ( $post_type && $post_type != 'all' ) $where = $wpdb->prepare("WHERE post_type = %s ", $post_type); else $where = "WHERE post_type != 'revision' "; - + if ( $author && $author != 'all' ) { $author_id = (int) $author; $where .= $wpdb->prepare( "AND post_author = %d ", $author_id ); } - + if ( $start_date && $start_date != 'all' ) $where .= $wpdb->prepare( "AND post_date >= %s ", $start_date ); - + if ( $end_date && $end_date != 'all' ) $where .= $wpdb->prepare( "AND post_date < %s ", $end_date ); - + if ( $taxonomy && is_array( $taxonomy ) ) { foreach ( $taxonomy as $term_id ) { if ( $term_id != 'all' ) $where .= $wpdb->prepare( "AND ID IN (SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d) ", $term_id ); } } - + if ( $post_status && $post_status != 'all' ) $where .= $wpdb->prepare( "AND post_status = %s", $status ); - + // grab a snapshot of post IDs, just in case it changes during the export $post_ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts $where ORDER BY post_date_gmt ASC" ); - + $categories = (array) get_categories( array( 'get' => 'all' ) ); $tags = (array) get_tags( array( 'get' => 'all' ) ); - + $custom_taxonomies = $wp_taxonomies; unset( $custom_taxonomies['category'] ); unset( $custom_taxonomies['post_tag'] ); unset( $custom_taxonomies['link_category'] ); $custom_taxonomies = array_keys( $custom_taxonomies ); $terms = (array) get_terms( $custom_taxonomies, array( 'get' => 'all' ) ); - + /** * {@internal Missing Short Description}} * @@ -94,19 +94,19 @@ function export_wp( $args = array() ) { function wxr_missing_parents( $categories ) { if ( ! is_array( $categories ) || empty( $categories ) ) return array(); - + foreach ( $categories as $category ){ $parents[$category->term_id] = $category->parent; } - + $parents = array_unique( array_diff( $parents, array_keys( $parents ) ) ); - + if ( $zero = array_search( '0', $parents ) ) unset( $parents[$zero] ); - + return $parents; } - + while ( $parents = wxr_missing_parents( $categories ) ) { $found_parents = get_categories( array( 'include' => join( ', ', $parents) ) ); if ( is_array( $found_parents ) && count( $found_parents ) ) @@ -114,7 +114,7 @@ function export_wp( $args = array() ) { else break; } - + // Put them in order to be inserted with no child going before its parent $pass = 0; $passes = 1000 + count( $categories ); @@ -125,7 +125,7 @@ function export_wp( $args = array() ) { $categories[] = $cat; } unset( $categories ); - + /** * Place string in CDATA tag. * @@ -136,13 +136,13 @@ function export_wp( $args = array() ) { function wxr_cdata( $str ) { if ( seems_utf8( $str ) == false ) $str = utf8_encode( $str ); - + // $str = ent2ncr(esc_html($str)); $str = ""; - + return $str; } - + /** * {@internal Missing Short Description}} * @@ -152,7 +152,7 @@ function export_wp( $args = array() ) { */ function wxr_site_url() { global $current_site; - + // mu: the base url if ( isset( $current_site->domain ) ) return network_home_url(); @@ -160,7 +160,7 @@ function export_wp( $args = array() ) { else return get_bloginfo_rss( 'url' ); } - + /** * {@internal Missing Short Description}} * @@ -171,10 +171,10 @@ function export_wp( $args = array() ) { function wxr_cat_name( $c ) { if ( empty( $c->name ) ) return; - + echo '' . wxr_cdata( $c->name ) . ''; } - + /** * {@internal Missing Short Description}} * @@ -185,10 +185,10 @@ function export_wp( $args = array() ) { function wxr_category_description( $c ) { if ( empty( $c->description ) ) return; - + echo '' . wxr_cdata($c->description) . ''; } - + /** * {@internal Missing Short Description}} * @@ -199,10 +199,10 @@ function export_wp( $args = array() ) { function wxr_tag_name( $t ) { if ( empty( $t->name ) ) return; - + echo '' . wxr_cdata($t->name) . ''; } - + /** * {@internal Missing Short Description}} * @@ -213,10 +213,10 @@ function export_wp( $args = array() ) { function wxr_tag_description( $t ) { if ( empty( $t->description ) ) return; - + echo '' . wxr_cdata($t->description) . ''; } - + /** * {@internal Missing Short Description}} * @@ -227,10 +227,10 @@ function export_wp( $args = array() ) { function wxr_term_name( $t ) { if ( empty( $t->name ) ) return; - + echo '' . wxr_cdata($t->name) . ''; } - + /** * {@internal Missing Short Description}} * @@ -241,10 +241,10 @@ function export_wp( $args = array() ) { function wxr_term_description( $t ) { if ( empty( $t->description ) ) return; - + echo '' . wxr_cdata($t->description) . ''; } - + /** * {@internal Missing Short Description}} * @@ -252,10 +252,10 @@ function export_wp( $args = array() ) { */ function wxr_post_taxonomy() { global $post; - + $the_list = ''; $filter = 'rss'; - + $taxonomies = get_object_taxonomies( 'post' ); $terms = wp_get_post_terms( $post->ID, $taxonomies ); foreach ( (array) $terms as $term ) { @@ -271,9 +271,9 @@ function export_wp( $args = array() ) { } echo $the_list; } - + echo '\n"; - + ?> @@ -319,18 +319,18 @@ function export_wp( $args = array() ) { taxonomy; ?>slug; ?>parent ? $custom_taxonomies[$t->parent]->name : ''; ?> - + in_the_loop = true; // Fake being in the loop. - + // fetch 20 posts at a time rather than loading the entire table into memory while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) { $where = "WHERE ID IN (" . join( ',', $next_posts ) . ")"; $posts = $wpdb->get_results( "SELECT * FROM $wpdb->posts $where ORDER BY post_date_gmt ASC" ); - + // Begin Loop foreach ($posts as $post) { setup_postdata( $post ); @@ -346,7 +346,7 @@ function export_wp( $args = array() ) { - + post_content ) ); ?> @@ -397,8 +397,8 @@ function export_wp( $args = array() ) { - diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index b6654a51ff..8c7baf0370 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -603,7 +603,7 @@ function _unzip_file_ziparchive($file, $to, $needed_dirs = array() ) { $needed_dirs = array_unique($needed_dirs); foreach ( $needed_dirs as $dir ) { - // Check the parent folders of the folders all exist within the creation array. + // Check the parent folders of the folders all exist within the creation array. if ( untrailingslashit($to) == $dir ) // Skip over the working directory, We know this exists (or will exist) continue; @@ -682,7 +682,7 @@ function _unzip_file_pclzip($file, $to, $needed_dirs = array()) { $needed_dirs = array_unique($needed_dirs); foreach ( $needed_dirs as $dir ) { - // Check the parent folders of the folders all exist within the creation array. + // Check the parent folders of the folders all exist within the creation array. if ( untrailingslashit($to) == $dir ) // Skip over the working directory, We know this exists (or will exist) continue; diff --git a/wp-admin/includes/nav-menu.php b/wp-admin/includes/nav-menu.php index 082ced1070..2988951c2d 100644 --- a/wp-admin/includes/nav-menu.php +++ b/wp-admin/includes/nav-menu.php @@ -680,7 +680,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) { */ function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) { $taxonomy_name = $taxonomy['args']->name; - + // paginate browsing for large numbers of objects $per_page = 50; $pagenum = isset( $_REQUEST[$taxonomy_name . '-tab'] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1; @@ -966,7 +966,7 @@ function wp_get_nav_menu_to_edit( $menu_id = 0 ) { $result .= ( ! empty($menu_items) ) ? ' menu-instructions-inactive">' : '">'; $result .= __('Select menu items (pages, categories, links) from the boxes at left to begin building your custom menu.'); $result .= ''; - + if( empty($menu_items) ) return $result; diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index d99ce2bd23..9b84df03d5 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -315,9 +315,9 @@ function bulk_edit_posts( $post_data = null ) { $taxonomy_obj = get_taxonomy($tax_name); if ( isset( $tax_input[$tax_name]) && current_user_can( $taxonomy_obj->cap->assign_terms ) ) $new_terms = $tax_input[$tax_name]; - else + else $new_terms = array(); - + if ( $taxonomy_obj->hierarchical ) $current_terms = (array) wp_get_object_terms( $post_ID, $tax_name, array('fields' => 'ids') ); else @@ -325,7 +325,7 @@ function bulk_edit_posts( $post_data = null ) { $post_data['tax_input'][$tax_name] = array_merge( $current_terms, $new_terms ); } - + if ( isset($new_cats) && in_array( 'category', $tax_names ) ) { $cats = (array) wp_get_post_categories($post_ID); $post_data['post_category'] = array_unique( array_merge($cats, $new_cats) ); diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 5a0ed31208..a129f63bbc 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -709,7 +709,7 @@ Thanks! 'subdomain_install' => intval( $subdomain_install ), 'global_terms_enabled' => global_terms_enabled() ? '1' : '0' ); - if ( !intval( $subdomain_install ) ) + if ( !intval( $subdomain_install ) ) $sitemeta['illegal_names'][] = 'blog'; $insert = ''; diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 3e0228a76d..a27c0a0a07 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -2837,7 +2837,7 @@ function do_meta_boxes($page, $context, $object) { $hidden = get_hidden_meta_boxes($page); - printf('
', htmlspecialchars($context)); + printf('
', htmlspecialchars($context)); $i = 0; do { @@ -3233,7 +3233,7 @@ function settings_errors ( $setting = '', $sanitize = FALSE, $hide_on_update = F */ function manage_columns_prefs( $page ) { $columns = get_column_headers( $page ); - $hidden = get_hidden_columns( $page ); + $hidden = get_hidden_columns( $page ); $special = array('_title', 'cb', 'comment', 'media', 'name', 'title', 'username'); foreach ( $columns as $column => $title ) { @@ -3545,9 +3545,9 @@ function _post_states($post) { /** * Convert a screen string to a screen object - * + * * @since 3.0.0 - * + * * @param string $screen The name of the screen * @return object An object containing the safe screen name and id */ @@ -3615,11 +3615,11 @@ function screen_meta($screen) { echo screen_layout($screen); if ( !empty( $screen_options ) ) { - ?> + ?>
diff --git a/wp-admin/index-extra.php b/wp-admin/index-extra.php index 07260efc17..22df0d67dc 100644 --- a/wp-admin/index-extra.php +++ b/wp-admin/index-extra.php @@ -32,7 +32,7 @@ case 'dashboard_secondary' : case 'dashboard_plugins' : wp_dashboard_plugins_output(); break; - + case 'dashboard_quick_press' : wp_dashboard_quick_press_output(); break; diff --git a/wp-admin/js/nav-menu.dev.js b/wp-admin/js/nav-menu.dev.js index 33361d9cad..1c4da0898f 100644 --- a/wp-admin/js/nav-menu.dev.js +++ b/wp-admin/js/nav-menu.dev.js @@ -147,7 +147,7 @@ var wpNavMenu; }, getItemData : function( itemType, id ) { itemType = itemType || 'menu-item'; - + var itemData = {}, i, fields = [ 'menu-item-db-id', @@ -164,13 +164,13 @@ var wpNavMenu; 'menu-item-classes', 'menu-item-xfn' ]; - + if( !id && itemType == 'menu-item' ) { id = this.find('.menu-item-data-db-id').val(); } - + if( !id ) return itemData; - + this.find('input').each(function() { var field; i = fields.length; @@ -179,7 +179,7 @@ var wpNavMenu; field = fields[i] + '[' + id + ']'; else if( itemType == 'add-menu-item' ) field = 'menu-item[' + id + '][' + fields[i] + ']'; - + if ( this.name && field == this.name @@ -188,18 +188,18 @@ var wpNavMenu; } } }); - + return itemData; }, setItemData : function( itemData, itemType, id ) { // Can take a type, such as 'menu-item', or an id. itemType = itemType || 'menu-item'; - + if( !id && itemType == 'menu-item' ) { id = $('.menu-item-data-db-id', this).val(); } - + if( !id ) return this; - + this.find('input').each(function() { var t = $(this), field; $.each( itemData, function( attr, val ) { @@ -207,7 +207,7 @@ var wpNavMenu; field = attr + '[' + id + ']'; else if( itemType == 'add-menu-item' ) field = 'menu-item[' + id + '][' + attr + ']'; - + if ( field == t.attr('name') ) { t.val( val ); } diff --git a/wp-admin/nav-menus.php b/wp-admin/nav-menus.php index fbdef24634..d41d6c5a2e 100644 --- a/wp-admin/nav-menus.php +++ b/wp-admin/nav-menus.php @@ -83,14 +83,14 @@ switch ( $action ) { } // get next in order - if ( + if ( isset( $orders_to_dbids[$dbids_to_orders[$menu_item_id] + 1] ) ) { $next_item_id = $orders_to_dbids[$dbids_to_orders[$menu_item_id] + 1]; $next_item_data = (array) wp_setup_nav_menu_item( get_post( $next_item_id ) ); // if not siblings of same parent, bubble menu item up but keep order - if ( + if ( ! empty( $menu_item_data['menu_item_parent'] ) && ( empty( $next_item_data['menu_item_parent'] ) || @@ -99,12 +99,12 @@ switch ( $action ) { ) { $parent_db_id = in_array( $menu_item_data['menu_item_parent'], $orders_to_dbids ) ? (int) $menu_item_data['menu_item_parent'] : 0; - + $parent_object = wp_setup_nav_menu_item( get_post( $parent_db_id ) ); if ( ! is_wp_error( $parent_object ) ) { $parent_data = (array) $parent_object; - $menu_item_data['menu_item_parent'] = $parent_data['menu_item_parent']; + $menu_item_data['menu_item_parent'] = $parent_data['menu_item_parent']; update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] ); } @@ -114,16 +114,16 @@ switch ( $action ) { $next_item_data['menu_order'] = $next_item_data['menu_order'] - 1; $menu_item_data['menu_order'] = $menu_item_data['menu_order'] + 1; - $menu_item_data['menu_item_parent'] = $next_item_data['ID']; + $menu_item_data['menu_item_parent'] = $next_item_data['ID']; update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] ); - + wp_update_post($menu_item_data); wp_update_post($next_item_data); } - + // the item is last but still has a parent, so bubble up - } elseif ( + } elseif ( ! empty( $menu_item_data['menu_item_parent'] ) && in_array( $menu_item_data['menu_item_parent'], $orders_to_dbids ) ) { @@ -174,16 +174,16 @@ switch ( $action ) { $parent_data = (array) $parent_object; // if there is something before the parent and parent a child of it, make menu item a child also of it - if ( - ! empty( $dbids_to_orders[$parent_db_id] ) && + if ( + ! empty( $dbids_to_orders[$parent_db_id] ) && ! empty( $orders_to_dbids[$dbids_to_orders[$parent_db_id] - 1] ) && ! empty( $parent_data['menu_item_parent'] ) ) { $menu_item_data['menu_item_parent'] = $parent_data['menu_item_parent']; // else if there is something before parent and parent not a child of it, make menu item a child of that something's parent - } elseif ( - ! empty( $dbids_to_orders[$parent_db_id] ) && + } elseif ( + ! empty( $dbids_to_orders[$parent_db_id] ) && ! empty( $orders_to_dbids[$dbids_to_orders[$parent_db_id] - 1] ) ) { $_possible_parent_id = (int) get_post_meta( $orders_to_dbids[$dbids_to_orders[$parent_db_id] - 1], '_menu_item_menu_item_parent', true); @@ -210,12 +210,12 @@ switch ( $action ) { } // else this menu item is not a child of the previous - } elseif ( + } elseif ( empty( $menu_item_data['menu_order'] ) || empty( $menu_item_data['menu_item_parent'] ) || ! in_array( $menu_item_data['menu_item_parent'], array_keys( $dbids_to_orders ) ) || empty( $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] ) || - $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] != $menu_item_data['menu_item_parent'] + $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] != $menu_item_data['menu_item_parent'] ) { // just make it a child of the previous; keep the order $menu_item_data['menu_item_parent'] = (int) $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1]; @@ -533,7 +533,7 @@ require_once( 'admin-header.php' ); $auto_add = true; else $auto_add = false; - } + } ?>
diff --git a/wp-admin/network.php b/wp-admin/network.php index 73366e0d18..58070ba947 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -225,7 +225,7 @@ function network_step1( $errors = false ) { _e( 'Because your install is in a directory, the sites in your WordPress network must use sub-directories.' ); // Uh oh: if ( !allow_subdirectory_install() ) - echo ' ' . __( 'Warning!' ) . ' ' . __( 'The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.' ) . ''; + echo ' ' . __( 'Warning!' ) . ' ' . __( 'The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.' ) . ''; ?> @@ -348,9 +348,9 @@ define( 'BLOG_ID_CURRENT_SITE', 1 ); ?> @@ -381,7 +381,7 @@ define( 'BLOG_ID_CURRENT_SITE', 1 ); '; } else { - $web_config_file = + $web_config_file = ' @@ -438,24 +438,24 @@ RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^' . ( $subdomain_install ? '' : '([_0-9a-zA-Z-]+/)?' ) . 'files/(.+) wp-includes/ms-files.php?file=$' . ( $subdomain_install ? 1 : 2 ) . ' [L]' . "\n"; - + if ( ! $subdomain_install ) $htaccess_file .= "\n# add a trailing slash to /wp-admin\n" . 'RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]' . "\n"; - + $htaccess_file .= "\n" . 'RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L]'; - + // @todo custom content dir. if ( ! $subdomain_install ) $htaccess_file .= "\nRewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]\nRewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]"; - + $htaccess_file .= "\nRewriteRule . index.php [L]"; - + ?>
  • .htaccess file in %s, replacing other WordPress rules:' ), ABSPATH ); ?>

    -
  • diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 1a93472700..5f1321edc9 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -21,7 +21,7 @@ if ( isset($_GET['find_detached']) ) { wp_die( __('You are not allowed to scan for lost attachments.') ); $lost = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent > '0' and post_parent NOT IN ( SELECT ID FROM $wpdb->posts WHERE post_type NOT IN ('attachment', '" . join("', '", get_post_types( array( 'public' => false ) ) ) . "') )"); - + $_GET['detached'] = 1; } elseif ( isset($_GET['found_post_id']) && isset($_GET['media']) ) { @@ -168,7 +168,7 @@ add_contextual_help( $current_screen, '

    ' . __('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.') . '

    ' . '

    ' . __('Hovering over a row reveals action links: Edit, Delete Permanently, and View. Clicking Edit or on the media file’s name displays a simple screen to edit that individual file’s metadata. Clicking Delete Permanently will delete the file from the media library (as well as from any posts to which it is currently attached). View will take you to the display page for that file. ') . '

    ' . '

    ' . __('If a media file has not been attached to any post, you will see that in the Attached To column, and can click on Attach File to launch a small popup that will allow you to search for a post and attach the file.') . '

    ' . - '

    ' . __('For more information:
    + '

    ' . __('For more information:
    Media Library Documentation
    Support Forums') . '

    ' ); diff --git a/wp-includes/default-constants.php b/wp-includes/default-constants.php index 222eb3df5e..47b9cd76ea 100644 --- a/wp-includes/default-constants.php +++ b/wp-includes/default-constants.php @@ -286,7 +286,7 @@ function wp_templating_constants( ) { /** * Slug of the default theme for this install. * Used as the default theme when installing new sites. - * Will be used as the fallback if the current theme doesn't exist. + * Will be used as the fallback if the current theme doesn't exist. * @since 3.0.0 */ if ( !defined('WP_DEFAULT_THEME') ) diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index 25fb458982..92d0426f97 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -624,12 +624,12 @@ class WP_Widget_Recent_Comments extends WP_Widget { function widget( $args, $instance ) { global $comments, $comment; - + $cache = wp_cache_get('widget_recent_comments', 'widget'); - + if ( ! is_array( $cache ) ) $cache = array(); - + if ( isset( $cache[$args['widget_id']] ) ) { echo $cache[$args['widget_id']]; return; @@ -646,11 +646,11 @@ class WP_Widget_Recent_Comments extends WP_Widget { $comments = get_comments( array( 'number' => $number, 'status' => 'approve' ) ); $output .= $before_widget; - if ( $title ) + if ( $title ) $output .= $before_title . $title . $after_title; $output .= '
      '; - if ( $comments ) { + if ( $comments ) { foreach ( (array) $comments as $comment) { $output .= '
    • ' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '' . get_the_title($comment->comment_post_ID) . '') . '
    • '; } diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index ac8fe4855b..6f2a9aa9a8 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -192,7 +192,7 @@ function _x( $single, $context, $domain = 'default' ) { /** * Displays translated string with gettext context - * + * * @see _x * @since 3.0.0 * @@ -506,13 +506,13 @@ function translate_user_role( $name ) { * @return array Array of language codes or an empty array if no languages are present. Language codes are formed by stripping the .mo extension from the language file names. */ function get_available_languages( $dir = null ) { - $languages = array(); - + $languages = array(); + foreach( (array)glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) { if ( false === strpos( $lang_file, 'continents-cities' ) ) { $languages[] = basename($lang_file, '.mo'); } } - + return $languages; } \ No newline at end of file diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index ce366536ad..5554028c59 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -586,11 +586,11 @@ function get_category_feed_link($cat_id, $feed = '') { */ function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) { global $wp_rewrite; - + $term_id = ( int ) $term_id; $term = get_term( $term_id, $taxonomy ); - + if ( empty( $term ) || is_wp_error( $term ) ) return false; @@ -601,10 +601,10 @@ function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) { if ( '' == $permalink_structure ) { if ( 'category' == $taxonomy ) { - $link = home_url("?feed=$feed&cat=$term_id"); + $link = home_url("?feed=$feed&cat=$term_id"); } elseif ( 'post_tag' == $taxonomy ) { - $link = home_url("?feed=$feed&tag=$term->slug"); + $link = home_url("?feed=$feed&tag=$term->slug"); } else { $t = get_taxonomy( $taxonomy ); $link = home_url("?feed=$feed&$t->query_var=$term->slug"); @@ -625,7 +625,7 @@ function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) { $link = apply_filters( 'category_feed_link', $link, $feed ); else $link = apply_filters( 'taxonomy_feed_link', $link, $feed, $taxonomy ); - + return $link; } @@ -2185,7 +2185,7 @@ function wp_get_shortlink($id = 0, $context = 'post', $allow_slugs = true) { $post_id = $wp_query->get_queried_object_id(); } elseif ( 'post' == $context ) { $post = get_post($id); - $post_id = $post->ID; + $post_id = $post->ID; } $shortlink = ''; diff --git a/wp-includes/ms-default-constants.php b/wp-includes/ms-default-constants.php index 38dce50fb8..12dc661a37 100644 --- a/wp-includes/ms-default-constants.php +++ b/wp-includes/ms-default-constants.php @@ -105,7 +105,7 @@ function ms_file_constants( ) { function ms_subdomain_constants() { static $error = null; static $error_warn = false; - + if ( false === $error ) return; @@ -130,7 +130,7 @@ function ms_subdomain_constants() { } elseif ( defined( 'VHOST' ) ) { $error = true; define( 'SUBDOMAIN_INSTALL', 'yes' == VHOST ); - } else { + } else { define( 'SUBDOMAIN_INSTALL', false ); define( 'VHOST', 'no' ); } diff --git a/wp-includes/nav-menu-template.php b/wp-includes/nav-menu-template.php index 527291f2b1..995b30454a 100644 --- a/wp-includes/nav-menu-template.php +++ b/wp-includes/nav-menu-template.php @@ -257,7 +257,7 @@ function wp_nav_menu( $args = array() ) { $sorted_menu_items = array(); foreach ( (array) $menu_items as $key => $menu_item ) $sorted_menu_items[$menu_item->menu_order] = $menu_item; - + unset($menu_items); $items .= walk_nav_menu_tree( $sorted_menu_items, $args->depth, $args ); @@ -307,7 +307,7 @@ function _wp_menu_item_classes_by_context( &$menu_items = array() ) { $active_parent_object_ids = array(); $possible_object_parents = array(); $home_page_id = (int) get_option( 'page_for_posts' ); - + if ( $wp_query->is_singular && ! empty( $queried_object->post_type ) && ! is_post_type_hierarchical( $queried_object->post_type ) ) { foreach ( (array) get_object_taxonomies( $queried_object->post_type ) as $taxonomy ) { if ( is_taxonomy_hierarchical( $taxonomy ) ) { @@ -328,15 +328,15 @@ function _wp_menu_item_classes_by_context( &$menu_items = array() ) { $active_parent_object_ids[] = (int) $menu_item->object_id; $active_parent_item_ids[] = (int) $menu_item->db_id; $active_object = $queried_object->post_type; - + // if the menu item corresponds to the currently-queried post or taxonomy object } elseif ( $menu_item->object_id == $queried_object_id && - ( + ( ( ! empty( $home_page_id ) && 'post_type' == $menu_item->type && $wp_query->is_home && $home_page_id = $menu_item->object_id ) || ( 'post_type' == $menu_item->type && $wp_query->is_singular ) || - ( 'taxonomy' == $menu_item->type && ( $wp_query->is_category || $wp_query->is_tag || $wp_query->is_tax ) ) - ) + ( 'taxonomy' == $menu_item->type && ( $wp_query->is_category || $wp_query->is_tag || $wp_query->is_tax ) ) + ) ) { $menu_items[$key]->classes = trim( $menu_item->classes . ' ' . 'current-menu-item' ); $active_parent_item_ids[] = (int) $menu_item->menu_item_parent; @@ -363,11 +363,11 @@ function _wp_menu_item_classes_by_context( &$menu_items = array() ) { // set parent's class foreach ( (array) $menu_items as $key => $parent_item ) { - if ( - isset( $parent_item->type ) && - 'post_type' == $parent_item->type && + if ( + isset( $parent_item->type ) && + 'post_type' == $parent_item->type && ! empty( $queried_object->post_type ) && - is_post_type_hierarchical( $queried_object->post_type ) && + is_post_type_hierarchical( $queried_object->post_type ) && in_array( $parent_item->object_id, $queried_object->ancestors ) ) $menu_items[$key]->classes = trim( $parent_item->classes . ' ' . 'current-' . $queried_object->post_type . '-ancestor current-menu-ancestor' ); diff --git a/wp-includes/nav-menu.php b/wp-includes/nav-menu.php index db68855ba5..05a8cc8fb5 100644 --- a/wp-includes/nav-menu.php +++ b/wp-includes/nav-menu.php @@ -763,7 +763,7 @@ function _wp_auto_add_pages_to_menu( $new_status, $old_status, $post ) { 'menu-item-object' => $post->post_type, 'menu-item-type' => 'post_type', ); - + foreach ( $auto_add as $menu_id ) { $items = (array) wp_get_nav_menu_items( $menu_id ); foreach ( $items as $item ) { diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index c84913da35..5f7a35e2af 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -105,11 +105,11 @@ function get_userdata( $user_id ) { if ( ! is_numeric( $user_id ) ) return false; - + $user_id = absint( $user_id ); if ( ! $user_id ) return false; - + $user = wp_cache_get( $user_id, 'users' ); if ( $user ) diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index c910c851e8..c87e417226 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -743,7 +743,7 @@ function _wp_filter_build_unique_id($tag, $function, $priority) { } else { $function = (array) $function; } - + if (is_object($function[0]) ) { // Object Class Calling if ( function_exists('spl_object_hash') ) { diff --git a/wp-includes/post.php b/wp-includes/post.php index 72a7371261..6183967634 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -783,13 +783,13 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' ) * - register_meta_box_cb - Provide a callback function that will be called when setting up the meta boxes for the edit form. Do remove_meta_box() and add_meta_box() calls in the callback. * - taxonomies - An array of taxonomy identifiers that will be registered for the post type. Default is no taxonomies. Taxonomies can be registered later with register_taxonomy() or register_taxonomy_for_object_type(). * - labels - An array of labels for this post type. You can see accepted values in {@link get_post_type_labels()}. By default post labels are used for non-hierarchical types and page labels for hierarchical ones. - * - permalink_epmask - The default rewrite endpoint bitmasks. + * - permalink_epmask - The default rewrite endpoint bitmasks. * - rewrite - false to prevent rewrite, or array('slug'=>$slug) to customize permastruct; default will use $taxonomy as slug. * - query_var - false to prevent queries, or string to value of the query var to use for this post type * - can_export - true allows this post type to be exported. - * - show_in_nav_menus - true makes this post type available for selection in navigation menus. + * - show_in_nav_menus - true makes this post type available for selection in navigation menus. * - _builtin - true if this post type is a native or "built-in" post_type. THIS IS FOR INTERNAL USE ONLY! - * - _edit_link - URL segement to use for edit link of this post type. Set to 'post.php?post=%d'. THIS IS FOR INTERNAL USE ONLY! + * - _edit_link - URL segement to use for edit link of this post type. Set to 'post.php?post=%d'. THIS IS FOR INTERNAL USE ONLY! * * @since 2.9.0 * @uses $wp_post_types Inserts new post type object into the list @@ -888,7 +888,7 @@ function register_post_type($post_type, $args = array()) { /** * Builds an object with all post type capabilities out of a post type object - * + * * Accepted keys of the capabilities array in the post type object: * - edit_post - The meta capability that controls editing a particular object of this post type. Defaults to "edit_$capability_type" (edit_post). * - edit_posts - The capability that controls editing objects of this post type as a class. Defaults to "edit_ . $capability_type . s" (edit_posts). @@ -897,7 +897,7 @@ function register_post_type($post_type, $args = array()) { * - read_post - The meta capability that controls reading a particular object of this post type. Defaults to "read_$capability_type" (read_post). * - read_private_posts - The capability that controls reading private posts. Defaults to "read_ . $capability_type . s" (read_private_posts). * - delete_post - The meta capability that controls deleting a particular object of this post type. Defaults to "delete_$capability_type" (delete_post). - * + * * @since 3.0.0 * @param object $args * @return object object with all the capabilities as member variables @@ -918,7 +918,7 @@ function get_post_type_capabilities( $args ) { /** * Builds an object with all post type labels out of a post type object - * + * * Accepted keys of the label array in the post type object: * - name - general name for the post type, usually plural. The same and overriden by $post_type_object->label. Default is Posts/Pages * - singular_name - name for one object of this post type. Default is Post/Page @@ -932,9 +932,9 @@ function get_post_type_capabilities( $args ) { * - not_found - Default is No posts found/No pages found * - not_found_in_trash - Default is No posts found in Trash/No pages found in Trash * - parent_item_colon - This string isn't used on non-hierarchical types. In hierarchical ones the default is Parent Page: - * + * * Above, the first default value is for non-hierarchical post types (like posts) and the second one is for hierarchical post types (like pages.) - * + * * @since 3.0.0 * @param object $post_type_object * @return object object with all the labels as member variables @@ -958,22 +958,22 @@ function get_post_type_labels( $post_type_object ) { /** * Builds an object with custom-something object (post type, taxonomy) labels out of a custom-something object - * + * * @access private */ function _get_custom_object_labels( $object, $nohier_vs_hier_defaults ) { - + if ( isset( $object->label ) ) { $object->labels['name'] = $object->label; } - + if ( !isset( $object->labels['singular_name'] ) && isset( $object->labels['name'] ) ) { $object->labels['singular_name'] = $object->labels['name']; } - + $defaults = array_map( create_function( '$x', $object->hierarchical? 'return $x[1];' : 'return $x[0];' ), $nohier_vs_hier_defaults ); $labels = array_merge( $defaults, $object->labels ); - return (object)$labels; + return (object)$labels; } /** diff --git a/wp-includes/query.php b/wp-includes/query.php index 74d4b66eb2..3c7d555a79 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1864,7 +1864,7 @@ class WP_Query { $search .= " AND ($wpdb->posts.post_password = '') "; } } - + // Allow plugins to contextually add/remove/modify the search section of the database query $search = apply_filters_ref_array('posts_search', array( $search, &$this ) ); diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 292d29986e..c7f72d495a 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -1775,7 +1775,7 @@ class WP_Rewrite { '; } - + $rules .= ' diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 023c1f40b0..ceda0d8b58 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -211,7 +211,7 @@ function is_taxonomy_hierarchical($taxonomy) { * whether taxonomy exists. * * Optional $args contents: - * + * * label - Name of the taxonomy shown in the menu. Usually plural. If not set, labels['name'] will be used. * * hierarchical - has some defined purpose at other parts of the API and is a @@ -234,7 +234,7 @@ function is_taxonomy_hierarchical($taxonomy) { * * show_tagcloud - false to prevent the taxonomy being listed in the Tag Cloud Widget; * defaults to show_ui which defalts to public. - * + * * labels - An array of labels for this taxonomy. You can see accepted values in {@link get_taxonomy_labels()}. By default tag labels are used for non-hierarchical types and category labels for hierarchical ones. * * @package WordPress @@ -303,7 +303,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) { $args['labels'] = get_taxonomy_labels( (object) $args ); $args['label'] = $args['labels']->name; - + $wp_taxonomies[$taxonomy] = (object) $args; // register callback handling for metabox @@ -312,7 +312,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) { /** * Builds an object with all taxonomy labels out of a taxonomy object - * + * * Accepted keys of the label array in the taxonomy object: * - name - general name for the taxonomy, usually plural. The same as and overriden by $tax->label. Default is Post Tags/Categories * - singular_name - name for one object of this taxonomy. Default is Post Tag/Category @@ -325,9 +325,9 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) { * - update_item - Default is Update Tag/Update Category * - add_new_item - Default is Add New Tag/Add New Category * - new_item_name - Default is New Tag Name/New Category Name - * + * * Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories.) - * + * * @since 3.0.0 * @param object $tax Taxonomy object * @return object object with all the labels as member variables diff --git a/wp-includes/theme.php b/wp-includes/theme.php index b4ccfde8fa..fa3ef0939a 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1716,7 +1716,7 @@ function require_if_theme_supports( $feature, $include) { /** * Checks an attachment being deleted to see if it's a header or background image. - * + * * If true it removes the theme modification which would be pointing at the deleted * attachment * @@ -1728,7 +1728,7 @@ function _delete_attachment_theme_mod( $id ) { $attachment_image = wp_get_attachment_url( $id ); $header_image = get_header_image(); $background_image = get_background_image(); - + if ( $header_image && $header_image == $attachment_image ) remove_theme_mod( 'header_image' ); diff --git a/wp-mail.php b/wp-mail.php index 8e30dbfb2d..69b54156eb 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -36,14 +36,14 @@ $phone_delim = '::'; $pop3 = new POP3(); -if ( !$pop3->connect( get_option('mailserver_url'), get_option('mailserver_port') ) || !$pop3->user( get_option('mailserver_login') ) ) +if ( !$pop3->connect( get_option('mailserver_url'), get_option('mailserver_port') ) || !$pop3->user( get_option('mailserver_login') ) ) wp_die( esc_html( $pop3->ERROR ) ); $count = $pop3->pass( get_option('mailserver_pass') ); -if( false === $count ) +if( false === $count ) wp_die( esc_html( $pop3->ERROR ) ); - + if( 0 === $count ) { $pop3->quit(); wp_die( __('There doesn’t seem to be any new mail.') );