diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index e43cf06717..01592c5513 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -1395,24 +1395,24 @@ case 'set-post-thumbnail': } } die( '0' ); -case 'save-custom-link': +case 'save-custom-link': if ( ! current_user_can('manage_links') ) die('-1'); - + $link_name = isset( $_POST['link_name'] ) ? esc_html($_POST['link_name']) : null; $link_url = isset( $_POST['link_url'] ) ? esc_url_raw($_POST['link_url']) : null; - + if ( !$link_name || !$link_url ) die('-1'); - + $post = array( 'post_status' => 'draft', 'post_type' => 'nav_menu_item', 'ping_status' => 0, 'post_author' => $user_ID, 'post_title' => $link_name, 'post_excerpt' => '', 'post_parent' => 0, 'menu_order' => 0, 'post_content' => '', ); - + $link_id = wp_insert_post( $post ); - + update_post_meta( $link_id, '_menu_item_type', 'custom' ); update_post_meta( $link_id, '_menu_item_object_id', (int) $link_id ); update_post_meta( $link_id, '_menu_item_object', 'custom' ); @@ -1420,7 +1420,7 @@ case 'save-custom-link': update_post_meta( $link_id, '_menu_item_classes', '' ); update_post_meta( $link_id, '_menu_item_xfn', '' ); update_post_meta( $link_id, '_menu_item_url', $link_url ); - + die( json_encode($link_id) ); default : do_action( 'wp_ajax_' . $_POST['action'] ); diff --git a/wp-admin/custom-background.php b/wp-admin/custom-background.php index 8ae4967b78..323190c2ad 100644 --- a/wp-admin/custom-background.php +++ b/wp-admin/custom-background.php @@ -153,7 +153,7 @@ class Custom_Background { $bgcolor = 'background-color: #' . $bgcolor . ';'; if ( $align = get_theme_mod('background_position', 'left') ) - $align = "text-align: $align;"; + $align = "text-align: $align;"; ?>
diff --git a/wp-admin/import/wordpress.php b/wp-admin/import/wordpress.php index 0cd576295b..251feca2e3 100644 --- a/wp-admin/import/wordpress.php +++ b/wp-admin/import/wordpress.php @@ -563,7 +563,7 @@ class WP_Import { $comments = $comments[1]; $num_comments = 0; $inserted_comments = array(); - if ( $comments) { + if ( $comments) { foreach ($comments as $comment) { $comment_id = $this->get_tag( $comment, 'wp:comment_id'); $newcomments[$comment_id]['comment_post_ID'] = $comment_post_ID; @@ -674,7 +674,7 @@ class WP_Import { } } - function fetch_remote_file( $post, $url ) { + function fetch_remote_file( $post, $url ) { add_filter( 'http_request_timeout', array( &$this, 'bump_request_timeout' ) ); $upload = wp_upload_dir($post['post_date']); diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index ad34eca7ab..c660a9421f 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -405,18 +405,18 @@ function post_comment_status_meta_box($post) { - + @@ -452,7 +452,7 @@ function post_comment_meta_box($post) { ID, 'meta-box-hidden_nav-menus', $hidden_meta_boxes ); - + // returns all the hidden metaboxes to the js function: wpNavMenu.initial_meta_boxes() return join( ',', $hidden_meta_boxes ); } @@ -151,7 +151,7 @@ function wp_nav_menu_item_link_metabox() { - + @@ -205,7 +205,7 @@ function wp_nav_menu_item_post_type_metabox( $object, $post_type ) { - + @@ -272,7 +272,7 @@ function wp_nav_menu_item_taxonomy_metabox( $object, $taxonomy ) { - + @@ -327,13 +327,13 @@ function wp_nav_menu_get_items( $menu_items, $object_type, $object = null, $cont if ( 0 == $menu_item->post_parent ) { // Set up the menu item $menu_item = wp_setup_nav_menu_item( $menu_item, $object_type, $object ); - + // No blank titles if ( empty($menu_item->title) ) continue; - + $attributes = ( 'backend' == $context ) ? ' id="menu-item-'. $i .'" value="'. $i .'"' : ''; - + $output .= ''; $output .= wp_get_nav_menu_item( $menu_item, $object_type, $object ); $output .= wp_get_nav_menu_sub_items( $menu_item->ID, $object_type, $object, $context ); diff --git a/wp-admin/nav-menus.php b/wp-admin/nav-menus.php index c322badc8d..fd4e653cbf 100644 --- a/wp-admin/nav-menus.php +++ b/wp-admin/nav-menus.php @@ -58,7 +58,7 @@ switch ( $action ) { if ( is_nav_menu($nav_menu_selected_id) ) { $delete_nav_menu = wp_delete_nav_menu( $nav_menu_selected_id ); - + if ( is_wp_error($delete_nav_menu) ) { $messages_div = '

' . $delete_nav_menu->get_error_message() . '

'; } else { @@ -93,30 +93,30 @@ switch ( $action ) { unset( $add_nav_menu ); } } else { - + // @todo wrap this into wp_update_nav_menu_object(); if ( isset($_POST['menu-name']) ) { $old_nav_menu = get_term( $nav_menu_selected_id, 'nav_menu', ARRAY_A ); $args = array( 'name' => $_POST['menu-name'], 'slug' => null, 'description' => $old_nav_menu['description'], 'parent' => $old_nav_menu['parent'], ); $new_nav_menu = wp_update_term( $nav_menu_selected_id, 'nav_menu', $args ); } - + // Update menu items - + // @todo: wrap update logic into wp_update_nav_menu(); $update_count = isset( $_POST['li-count'] ) ? (int) $_POST['li-count'] : 0; $update_nav_menu = is_nav_menu( $nav_menu_selected_id ); if ( !is_wp_error($update_nav_menu) ) { $menu_items = wp_get_nav_menu_items( $nav_menu_selected_id, array('orderby' => 'ID', 'output' => ARRAY_A, 'output_key' => 'ID') ); - + // Loop through all POST variables for ( $k = 0; $k < $update_count; $k++ ) { - + // Menu item title can't be blank if ( '' == $_POST['menu-item-title'][$k] ) continue; - + $menu_item_db_id = isset( $_POST['menu-item-db-id'][$k] ) ? $_POST['menu-item-db-id'][$k] : 0; $menu_item_object_id = isset( $_POST['menu-item-object-id'][$k] ) ? $_POST['menu-item-object-id'][$k] : 0; $menu_item_object = isset( $_POST['menu-item-object'][$k] ) ? $_POST['menu-item-object'][$k] : ''; @@ -140,11 +140,11 @@ switch ( $action ) { 'post_parent' => $menu_item_parent_id, 'menu_order' => $menu_item_position, 'post_content' => $menu_item_description, ); - + // New menu item if ( $menu_item_db_id == 0 ) { $menu_item_db_id = wp_insert_post( $post ); - + // Update existing menu item } elseif ( isset($menu_items[$menu_item_db_id]) || ( 'custom' == $menu_item_type && 0 != $menu_item_db_id ) ) { $post['ID'] = $menu_item_db_id; @@ -170,9 +170,9 @@ switch ( $action ) { wp_delete_post( $menu_item_id ); } } - + do_action( 'wp_update_nav_menu', $nav_menu_selected_id ); - + $messages_div = '

' . sprintf( __('The %s menu has been updated.'), $update_nav_menu->name ) . '

'; unset( $update_nav_menu, $update_count, $menu_items ); } diff --git a/wp-content/themes/default/functions.php b/wp-content/themes/default/functions.php index f8d2b1cc5a..13143c2755 100644 --- a/wp-content/themes/default/functions.php +++ b/wp-content/themes/default/functions.php @@ -313,7 +313,7 @@ function kubrick_theme_page_head() { width: 100%; display: ; } - + .description { margin-top: 16px; color: #fff; diff --git a/wp-content/themes/default/page.php b/wp-content/themes/default/page.php index 87b3dd5256..608d4ee4b4 100644 --- a/wp-content/themes/default/page.php +++ b/wp-content/themes/default/page.php @@ -20,9 +20,9 @@ get_header(); ?>
', '

'); ?> - + - + diff --git a/wp-content/themes/twentyten/attachment.php b/wp-content/themes/twentyten/attachment.php index b8f411dfa5..bfae80154f 100644 --- a/wp-content/themes/twentyten/attachment.php +++ b/wp-content/themes/twentyten/attachment.php @@ -58,14 +58,14 @@ } else { $utility_text = __( 'This entry was posted in %1$s. Bookmark the permalink. Follow any comments here with the RSS feed for this post.', 'twentyten' ); } - printf( + printf( $utility_text, get_the_category_list( ', ' ), $tag_list, get_permalink(), the_title_attribute( 'echo=0' ), - get_post_comments_feed_link() - ); + get_post_comments_feed_link() + ); ?> diff --git a/wp-content/themes/twentyten/category.php b/wp-content/themes/twentyten/category.php index 33e80a0c4f..39e1bf88eb 100644 --- a/wp-content/themes/twentyten/category.php +++ b/wp-content/themes/twentyten/category.php @@ -3,7 +3,7 @@
-

' . single_cat_title( '', false ) . '' ); ?>

' . $categorydesc . '
' ); ?> diff --git a/wp-content/themes/twentyten/comments.php b/wp-content/themes/twentyten/comments.php index 121076f1b0..9e442428c6 100644 --- a/wp-content/themes/twentyten/comments.php +++ b/wp-content/themes/twentyten/comments.php @@ -12,7 +12,7 @@ ?> -

' . get_the_title() . '' ), sprintf( __( 'One Response to %s', 'twentyten' ), '' . get_the_title() . '' ), sprintf( __( '%% Responses to %s', 'twentyten' ), '' . get_the_title() . '' ) diff --git a/wp-content/themes/twentyten/functions.php b/wp-content/themes/twentyten/functions.php index 592c1cd866..112d8b7562 100644 --- a/wp-content/themes/twentyten/functions.php +++ b/wp-content/themes/twentyten/functions.php @@ -196,7 +196,7 @@ function twentyten_term_list( $taxonomy, $glue = ', ', $text = '', $also_text = global $wp_query, $post; $current_term = $wp_query->get_queried_object(); $terms = wp_get_object_terms( $post->ID, $taxonomy ); - // If we're viewing a Taxonomy page.. + // If we're viewing a Taxonomy page.. if ( isset( $current_term->taxonomy ) && $taxonomy == $current_term->taxonomy ) { // Remove the term from display. foreach ( (array) $terms as $key => $term ) { diff --git a/wp-content/themes/twentyten/header.php b/wp-content/themes/twentyten/header.php index 0d8e9d9e69..854841c792 100644 --- a/wp-content/themes/twentyten/header.php +++ b/wp-content/themes/twentyten/header.php @@ -10,7 +10,7 @@ } elseif ( is_page() ) { single_post_title( '' ); echo ' | '; bloginfo( 'name' ); } elseif ( is_search() ) { - printf( __( 'Search results for "%s"', 'twentyten' ), esc_html( $s ) ); twentyten_the_page_number(); echo ' | '; bloginfo( 'name' ); + printf( __( 'Search results for "%s"', 'twentyten' ), esc_html( $s ) ); twentyten_the_page_number(); echo ' | '; bloginfo( 'name' ); } elseif ( is_404() ) { _e( 'Not Found', 'twentyten' ); echo ' | '; bloginfo( 'name' ); } else { diff --git a/wp-content/themes/twentyten/loop.php b/wp-content/themes/twentyten/loop.php index b098b1f142..717a10dcda 100644 --- a/wp-content/themes/twentyten/loop.php +++ b/wp-content/themes/twentyten/loop.php @@ -42,9 +42,9 @@ echo wp_get_attachment_image( $image->ID, 'thumbnail' ); ?>

-

%2$s photos.', 'twentyten' ), - 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', - $total_images +

%2$s photos.', 'twentyten' ), + 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', + $total_images ); ?>

diff --git a/wp-content/themes/twentyten/sidebar-footer.php b/wp-content/themes/twentyten/sidebar-footer.php index 2934da93b5..cdd8b13474 100644 --- a/wp-content/themes/twentyten/sidebar-footer.php +++ b/wp-content/themes/twentyten/sidebar-footer.php @@ -1,9 +1,9 @@