Remove trailing whites and double semicolons.

git-svn-id: http://svn.automattic.com/wordpress/trunk@13830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-03-26 19:36:49 +00:00
parent 3918b75cbe
commit 40773a776b
25 changed files with 111 additions and 111 deletions

View File

@ -1395,24 +1395,24 @@ case 'set-post-thumbnail':
} }
} }
die( '0' ); die( '0' );
case 'save-custom-link': case 'save-custom-link':
if ( ! current_user_can('manage_links') ) if ( ! current_user_can('manage_links') )
die('-1'); die('-1');
$link_name = isset( $_POST['link_name'] ) ? esc_html($_POST['link_name']) : null; $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; $link_url = isset( $_POST['link_url'] ) ? esc_url_raw($_POST['link_url']) : null;
if ( !$link_name || !$link_url ) if ( !$link_name || !$link_url )
die('-1'); die('-1');
$post = array( $post = array(
'post_status' => 'draft', 'post_type' => 'nav_menu_item', 'ping_status' => 0, 'post_status' => 'draft', 'post_type' => 'nav_menu_item', 'ping_status' => 0,
'post_author' => $user_ID, 'post_title' => $link_name, 'post_excerpt' => '', 'post_author' => $user_ID, 'post_title' => $link_name, 'post_excerpt' => '',
'post_parent' => 0, 'menu_order' => 0, 'post_content' => '', 'post_parent' => 0, 'menu_order' => 0, 'post_content' => '',
); );
$link_id = wp_insert_post( $post ); $link_id = wp_insert_post( $post );
update_post_meta( $link_id, '_menu_item_type', 'custom' ); 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_id', (int) $link_id );
update_post_meta( $link_id, '_menu_item_object', 'custom' ); 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_classes', '' );
update_post_meta( $link_id, '_menu_item_xfn', '' ); update_post_meta( $link_id, '_menu_item_xfn', '' );
update_post_meta( $link_id, '_menu_item_url', $link_url ); update_post_meta( $link_id, '_menu_item_url', $link_url );
die( json_encode($link_id) ); die( json_encode($link_id) );
default : default :
do_action( 'wp_ajax_' . $_POST['action'] ); do_action( 'wp_ajax_' . $_POST['action'] );

View File

@ -153,7 +153,7 @@ class Custom_Background {
$bgcolor = 'background-color: #' . $bgcolor . ';'; $bgcolor = 'background-color: #' . $bgcolor . ';';
if ( $align = get_theme_mod('background_position', 'left') ) if ( $align = get_theme_mod('background_position', 'left') )
$align = "text-align: $align;"; $align = "text-align: $align;";
?> ?>
<div id="custom-background-image" style="<?php echo $bgcolor, $align ?>"> <div id="custom-background-image" style="<?php echo $bgcolor, $align ?>">
<?php if ( get_background_image() ) { ?> <?php if ( get_background_image() ) { ?>

View File

@ -563,7 +563,7 @@ class WP_Import {
$comments = $comments[1]; $comments = $comments[1];
$num_comments = 0; $num_comments = 0;
$inserted_comments = array(); $inserted_comments = array();
if ( $comments) { if ( $comments) {
foreach ($comments as $comment) { foreach ($comments as $comment) {
$comment_id = $this->get_tag( $comment, 'wp:comment_id'); $comment_id = $this->get_tag( $comment, 'wp:comment_id');
$newcomments[$comment_id]['comment_post_ID'] = $comment_post_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' ) ); add_filter( 'http_request_timeout', array( &$this, 'bump_request_timeout' ) );
$upload = wp_upload_dir($post['post_date']); $upload = wp_upload_dir($post['post_date']);

View File

@ -405,18 +405,18 @@ function post_comment_status_meta_box($post) {
<?php <?php
} }
/** /**
* Display comments for post table header * Display comments for post table header
* *
* @since 3.0.0 * @since 3.0.0
* *
* @param $result table header rows * @param $result table header rows
* @return * @return
*/ */
function post_comment_meta_box_thead($result) { function post_comment_meta_box_thead($result) {
unset($result['cb'], $result['response']); unset($result['cb'], $result['response']);
return $result; return $result;
} }
/** /**
* Display comments for post. * Display comments for post.
@ -441,7 +441,7 @@ function post_comment_meta_box($post) {
<table class="widefat comments-box fixed" cellspacing="0" style="display:none;"> <table class="widefat comments-box fixed" cellspacing="0" style="display:none;">
<thead><tr> <thead><tr>
<?php print_column_headers('edit-comments'); ?> <?php print_column_headers('edit-comments'); ?>
</tr></thead> </tr></thead>
<tbody id="the-comment-list" class="list:comment"></tbody> <tbody id="the-comment-list" class="list:comment"></tbody>
</table> </table>
@ -452,7 +452,7 @@ function post_comment_meta_box($post) {
<script type="text/javascript">jQuery(document).ready(function(){commentsBox.get(<?php echo $total; ?>, 10);});</script> <script type="text/javascript">jQuery(document).ready(function(){commentsBox.get(<?php echo $total; ?>, 10);});</script>
<?php <?php
} }
remove_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead'); remove_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead');
wp_comment_trashnotice(); wp_comment_trashnotice();
} }

View File

@ -17,12 +17,12 @@ function wp_nav_menu_metaboxes_setup() {
**/ **/
function wp_initial_nav_menu_meta_boxes() { function wp_initial_nav_menu_meta_boxes() {
global $wp_meta_boxes; global $wp_meta_boxes;
if ( !get_user_option( 'meta-box-hidden_nav-menus' ) && is_array($wp_meta_boxes) ) { if ( !get_user_option( 'meta-box-hidden_nav-menus' ) && is_array($wp_meta_boxes) ) {
$initial_meta_boxes = array( 'manage-menu', 'create-menu', 'add-custom-links', 'add-page', 'add-category' ); $initial_meta_boxes = array( 'manage-menu', 'create-menu', 'add-custom-links', 'add-page', 'add-category' );
$hidden_meta_boxes = array(); $hidden_meta_boxes = array();
foreach ( array_keys($wp_meta_boxes['nav-menus']) as $context ) { foreach ( array_keys($wp_meta_boxes['nav-menus']) as $context ) {
foreach ( array_keys($wp_meta_boxes['nav-menus'][$context]) as $priority ) { foreach ( array_keys($wp_meta_boxes['nav-menus'][$context]) as $priority ) {
foreach ( $wp_meta_boxes['nav-menus'][$context][$priority] as $box ) { foreach ( $wp_meta_boxes['nav-menus'][$context][$priority] as $box ) {
@ -36,7 +36,7 @@ function wp_initial_nav_menu_meta_boxes() {
} }
$user = wp_get_current_user(); $user = wp_get_current_user();
update_user_meta( $user->ID, 'meta-box-hidden_nav-menus', $hidden_meta_boxes ); update_user_meta( $user->ID, 'meta-box-hidden_nav-menus', $hidden_meta_boxes );
// returns all the hidden metaboxes to the js function: wpNavMenu.initial_meta_boxes() // returns all the hidden metaboxes to the js function: wpNavMenu.initial_meta_boxes()
return join( ',', $hidden_meta_boxes ); return join( ',', $hidden_meta_boxes );
} }
@ -151,7 +151,7 @@ function wp_nav_menu_item_link_metabox() {
<a class="show-all"><?php _e('View All'); ?></a> <a class="show-all"><?php _e('View All'); ?></a>
<a class="hide-all"><?php _e('Hide All'); ?></a> <a class="hide-all"><?php _e('Hide All'); ?></a>
</span> </span>
<span class="add-to-menu"> <span class="add-to-menu">
<a class="button"><?php _e('Add to Menu'); ?></a> <a class="button"><?php _e('Add to Menu'); ?></a>
</span> </span>
@ -205,7 +205,7 @@ function wp_nav_menu_item_post_type_metabox( $object, $post_type ) {
<a class="show-all"><?php _e('View All'); ?></a> <a class="show-all"><?php _e('View All'); ?></a>
<a class="hide-all"><?php _e('Hide All'); ?></a> <a class="hide-all"><?php _e('Hide All'); ?></a>
</span> </span>
<span class="add-to-menu"> <span class="add-to-menu">
<a class="button"><?php _e('Add to Menu'); ?></a> <a class="button"><?php _e('Add to Menu'); ?></a>
</span> </span>
@ -272,7 +272,7 @@ function wp_nav_menu_item_taxonomy_metabox( $object, $taxonomy ) {
<a class="show-all"><?php _e('View All'); ?></a> <a class="show-all"><?php _e('View All'); ?></a>
<a class="hide-all"><?php _e('Hide All'); ?></a> <a class="hide-all"><?php _e('Hide All'); ?></a>
</span> </span>
<span class="add-to-menu"> <span class="add-to-menu">
<a class="button"><?php _e('Add to Menu'); ?></a> <a class="button"><?php _e('Add to Menu'); ?></a>
</span> </span>
@ -327,13 +327,13 @@ function wp_nav_menu_get_items( $menu_items, $object_type, $object = null, $cont
if ( 0 == $menu_item->post_parent ) { if ( 0 == $menu_item->post_parent ) {
// Set up the menu item // Set up the menu item
$menu_item = wp_setup_nav_menu_item( $menu_item, $object_type, $object ); $menu_item = wp_setup_nav_menu_item( $menu_item, $object_type, $object );
// No blank titles // No blank titles
if ( empty($menu_item->title) ) if ( empty($menu_item->title) )
continue; continue;
$attributes = ( 'backend' == $context ) ? ' id="menu-item-'. $i .'" value="'. $i .'"' : ''; $attributes = ( 'backend' == $context ) ? ' id="menu-item-'. $i .'" value="'. $i .'"' : '';
$output .= '<li'. $attributes .'>'; $output .= '<li'. $attributes .'>';
$output .= wp_get_nav_menu_item( $menu_item, $object_type, $object ); $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 ); $output .= wp_get_nav_menu_sub_items( $menu_item->ID, $object_type, $object, $context );

View File

@ -58,7 +58,7 @@ switch ( $action ) {
if ( is_nav_menu($nav_menu_selected_id) ) { if ( is_nav_menu($nav_menu_selected_id) ) {
$delete_nav_menu = wp_delete_nav_menu( $nav_menu_selected_id ); $delete_nav_menu = wp_delete_nav_menu( $nav_menu_selected_id );
if ( is_wp_error($delete_nav_menu) ) { if ( is_wp_error($delete_nav_menu) ) {
$messages_div = '<div id="message" class="error"><p>' . $delete_nav_menu->get_error_message() . '</p></div>'; $messages_div = '<div id="message" class="error"><p>' . $delete_nav_menu->get_error_message() . '</p></div>';
} else { } else {
@ -93,30 +93,30 @@ switch ( $action ) {
unset( $add_nav_menu ); unset( $add_nav_menu );
} }
} else { } else {
// @todo wrap this into wp_update_nav_menu_object(); // @todo wrap this into wp_update_nav_menu_object();
if ( isset($_POST['menu-name']) ) { if ( isset($_POST['menu-name']) ) {
$old_nav_menu = get_term( $nav_menu_selected_id, 'nav_menu', ARRAY_A ); $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'], ); $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 ); $new_nav_menu = wp_update_term( $nav_menu_selected_id, 'nav_menu', $args );
} }
// Update menu items // Update menu items
// @todo: wrap update logic into wp_update_nav_menu(); // @todo: wrap update logic into wp_update_nav_menu();
$update_count = isset( $_POST['li-count'] ) ? (int) $_POST['li-count'] : 0; $update_count = isset( $_POST['li-count'] ) ? (int) $_POST['li-count'] : 0;
$update_nav_menu = is_nav_menu( $nav_menu_selected_id ); $update_nav_menu = is_nav_menu( $nav_menu_selected_id );
if ( !is_wp_error($update_nav_menu) ) { 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') ); $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 // Loop through all POST variables
for ( $k = 0; $k < $update_count; $k++ ) { for ( $k = 0; $k < $update_count; $k++ ) {
// Menu item title can't be blank // Menu item title can't be blank
if ( '' == $_POST['menu-item-title'][$k] ) if ( '' == $_POST['menu-item-title'][$k] )
continue; continue;
$menu_item_db_id = isset( $_POST['menu-item-db-id'][$k] ) ? $_POST['menu-item-db-id'][$k] : 0; $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_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] : ''; $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_parent' => $menu_item_parent_id, 'menu_order' => $menu_item_position,
'post_content' => $menu_item_description, 'post_content' => $menu_item_description,
); );
// New menu item // New menu item
if ( $menu_item_db_id == 0 ) { if ( $menu_item_db_id == 0 ) {
$menu_item_db_id = wp_insert_post( $post ); $menu_item_db_id = wp_insert_post( $post );
// Update existing menu item // Update existing menu item
} elseif ( isset($menu_items[$menu_item_db_id]) || ( 'custom' == $menu_item_type && 0 != $menu_item_db_id ) ) { } elseif ( isset($menu_items[$menu_item_db_id]) || ( 'custom' == $menu_item_type && 0 != $menu_item_db_id ) ) {
$post['ID'] = $menu_item_db_id; $post['ID'] = $menu_item_db_id;
@ -170,9 +170,9 @@ switch ( $action ) {
wp_delete_post( $menu_item_id ); wp_delete_post( $menu_item_id );
} }
} }
do_action( 'wp_update_nav_menu', $nav_menu_selected_id ); do_action( 'wp_update_nav_menu', $nav_menu_selected_id );
$messages_div = '<div id="message" class="updated"><p>' . sprintf( __('The <strong>%s</strong> menu has been updated.'), $update_nav_menu->name ) . '</p></div>'; $messages_div = '<div id="message" class="updated"><p>' . sprintf( __('The <strong>%s</strong> menu has been updated.'), $update_nav_menu->name ) . '</p></div>';
unset( $update_nav_menu, $update_count, $menu_items ); unset( $update_nav_menu, $update_count, $menu_items );
} }

View File

@ -313,7 +313,7 @@ function kubrick_theme_page_head() {
width: 100%; width: 100%;
display: <?php echo kubrick_header_display_string(); ?>; display: <?php echo kubrick_header_display_string(); ?>;
} }
.description { .description {
margin-top: 16px; margin-top: 16px;
color: #fff; color: #fff;

View File

@ -20,9 +20,9 @@ get_header(); ?>
</div> </div>
<?php endwhile; endif; ?> <?php endwhile; endif; ?>
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?> <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
<?php comments_template(); ?> <?php comments_template(); ?>
</div> </div>
<?php get_sidebar(); ?> <?php get_sidebar(); ?>

View File

@ -58,14 +58,14 @@
} else { } else {
$utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%5$s" title="Comments RSS to %4$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'twentyten' ); $utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%5$s" title="Comments RSS to %4$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'twentyten' );
} }
printf( printf(
$utility_text, $utility_text,
get_the_category_list( ', ' ), get_the_category_list( ', ' ),
$tag_list, $tag_list,
get_permalink(), get_permalink(),
the_title_attribute( 'echo=0' ), the_title_attribute( 'echo=0' ),
get_post_comments_feed_link() get_post_comments_feed_link()
); );
?> ?>
<?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?> <?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?>

View File

@ -3,7 +3,7 @@
<div id="container"> <div id="container">
<div id="content"> <div id="content">
<h1 class="page-title"><?php <h1 class="page-title"><?php
printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' ); printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' );
?></h1> ?></h1>
<?php $categorydesc = category_description(); if ( ! empty( $categorydesc ) ) echo apply_filters( 'archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>' ); ?> <?php $categorydesc = category_description(); if ( ! empty( $categorydesc ) ) echo apply_filters( 'archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>' ); ?>

View File

@ -12,7 +12,7 @@
?> ?>
<?php if ( have_comments() ) : ?> <?php if ( have_comments() ) : ?>
<h3 id="comments-title"><?php comments_number( <h3 id="comments-title"><?php comments_number(
sprintf( __( 'No Responses to %s', 'twentyten' ), '<em>' . get_the_title() . '</em>' ), sprintf( __( 'No Responses to %s', 'twentyten' ), '<em>' . get_the_title() . '</em>' ),
sprintf( __( 'One Response to %s', 'twentyten' ), '<em>' . get_the_title() . '</em>' ), sprintf( __( 'One Response to %s', 'twentyten' ), '<em>' . get_the_title() . '</em>' ),
sprintf( __( '%% Responses to %s', 'twentyten' ), '<em>' . get_the_title() . '</em>' ) sprintf( __( '%% Responses to %s', 'twentyten' ), '<em>' . get_the_title() . '</em>' )

View File

@ -196,7 +196,7 @@ function twentyten_term_list( $taxonomy, $glue = ', ', $text = '', $also_text =
global $wp_query, $post; global $wp_query, $post;
$current_term = $wp_query->get_queried_object(); $current_term = $wp_query->get_queried_object();
$terms = wp_get_object_terms( $post->ID, $taxonomy ); $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 ) { if ( isset( $current_term->taxonomy ) && $taxonomy == $current_term->taxonomy ) {
// Remove the term from display. // Remove the term from display.
foreach ( (array) $terms as $key => $term ) { foreach ( (array) $terms as $key => $term ) {

View File

@ -10,7 +10,7 @@
} elseif ( is_page() ) { } elseif ( is_page() ) {
single_post_title( '' ); echo ' | '; bloginfo( 'name' ); single_post_title( '' ); echo ' | '; bloginfo( 'name' );
} elseif ( is_search() ) { } 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() ) { } elseif ( is_404() ) {
_e( 'Not Found', 'twentyten' ); echo ' | '; bloginfo( 'name' ); _e( 'Not Found', 'twentyten' ); echo ' | '; bloginfo( 'name' );
} else { } else {

View File

@ -42,9 +42,9 @@
echo wp_get_attachment_image( $image->ID, 'thumbnail' ); echo wp_get_attachment_image( $image->ID, 'thumbnail' );
?></a> ?></a>
</div> </div>
<p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ), <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ),
'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
$total_images $total_images
); ?></em></p> ); ?></em></p>
<?php the_excerpt( '' ); ?> <?php the_excerpt( '' ); ?>

View File

@ -1,9 +1,9 @@
<?php <?php
if ( if (
is_active_sidebar( 'first-footer-widget-area' ) || is_active_sidebar( 'first-footer-widget-area' ) ||
is_active_sidebar( 'second-footer-widget-area' ) || is_active_sidebar( 'second-footer-widget-area' ) ||
is_active_sidebar( 'third-footer-widget-area' ) || is_active_sidebar( 'third-footer-widget-area' ) ||
is_active_sidebar( 'fourth-footer-widget-area' ) is_active_sidebar( 'fourth-footer-widget-area' )
) : ) :
?> ?>
<div id="footer-widget-area"> <div id="footer-widget-area">

View File

@ -49,14 +49,14 @@
} else { } else {
$utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%5$s" title="Comments RSS to %4$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'twentyten' ); $utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%5$s" title="Comments RSS to %4$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'twentyten' );
} }
printf( printf(
$utility_text, $utility_text,
get_the_category_list( ', ' ), get_the_category_list( ', ' ),
$tag_list, $tag_list,
get_permalink(), get_permalink(),
the_title_attribute( 'echo=0' ), the_title_attribute( 'echo=0' ),
get_post_comments_feed_link() get_post_comments_feed_link()
); );
?> ?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), "\n\t\t\t\t\t<span class=\"edit-link\">", "</span>" ); ?> <?php edit_post_link( __( 'Edit', 'twentyten' ), "\n\t\t\t\t\t<span class=\"edit-link\">", "</span>" ); ?>

View File

@ -5,7 +5,7 @@
<?php the_post(); ?> <?php the_post(); ?>
<h1 class="page-title"><?php <h1 class="page-title"><?php
printf( __( 'Tag Archives: %s', 'twentyten' ), '<span>' . single_tag_title( '', false ) . '</span>' ); printf( __( 'Tag Archives: %s', 'twentyten' ), '<span>' . single_tag_title( '', false ) . '</span>' );
?></h1> ?></h1>

View File

@ -934,7 +934,7 @@ class Walker {
else else
$children_elements[ $e->$parent_field ][] = $e; $children_elements[ $e->$parent_field ][] = $e;
} }
/* /*
* when none of the elements is top level * when none of the elements is top level
* assume the first one must be root of the sub elements * assume the first one must be root of the sub elements
@ -1182,26 +1182,26 @@ class Walker_Nav_Menu extends Walker {
*/ */
function start_el(&$output, $item, $depth, $args) { function start_el(&$output, $item, $depth, $args) {
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; $indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
if ( 'frontend' == $args->context ) { if ( 'frontend' == $args->context ) {
global $wp_query; global $wp_query;
$css_class = array( 'menu-item', 'menu-item-type-'. $item->type, $item->classes ); $css_class = array( 'menu-item', 'menu-item-type-'. $item->type, $item->classes );
if ( 'custom' != $item->object ) if ( 'custom' != $item->object )
$css_class[] = 'menu-item-object-'. $item->object; $css_class[] = 'menu-item-object-'. $item->object;
if ( $item->object_id == $wp_query->get_queried_object_id() ) if ( $item->object_id == $wp_query->get_queried_object_id() )
$css_class[] = 'current-menu-item'; $css_class[] = 'current-menu-item';
// @todo add classes for parent/child relationships // @todo add classes for parent/child relationships
$css_class = join( ' ', apply_filters('nav_menu_css_class', $css_class, $item) ); $css_class = join( ' ', apply_filters('nav_menu_css_class', $css_class, $item) );
} }
$maybe_value = ( 'backend' == $args->context ) ? ' value="'. $item->ID .'"' : ''; $maybe_value = ( 'backend' == $args->context ) ? ' value="'. $item->ID .'"' : '';
$maybe_classes = ( 'frontend' == $args->context ) ? ' class="'. $css_class .'"' : ''; $maybe_classes = ( 'frontend' == $args->context ) ? ' class="'. $css_class .'"' : '';
$output .= $indent . '<li id="menu-item-'. $item->ID .'"'. $maybe_value . $maybe_classes .'>' . wp_get_nav_menu_item( $item, $args->context, $args ); $output .= $indent . '<li id="menu-item-'. $item->ID .'"'. $maybe_value . $maybe_classes .'>' . wp_get_nav_menu_item( $item, $args->context, $args );
} }

View File

@ -38,14 +38,14 @@ function wp_unregister_GLOBALS() {
*/ */
function wp_fix_server_vars() { function wp_fix_server_vars() {
global $PHP_SELF; global $PHP_SELF;
$default_server_values = array( $default_server_values = array(
'SERVER_SOFTWARE' => '', 'SERVER_SOFTWARE' => '',
'REQUEST_URI' => '', 'REQUEST_URI' => '',
); );
$_SERVER = array_merge( $default_server_values, $_SERVER ); $_SERVER = array_merge( $default_server_values, $_SERVER );
// Fix for IIS when running with PHP ISAPI // Fix for IIS when running with PHP ISAPI
if ( empty( $_SERVER['REQUEST_URI'] ) || ( php_sapi_name() != 'cgi-fcgi' && preg_match( '/^Microsoft-IIS\//', $_SERVER['SERVER_SOFTWARE'] ) ) ) { if ( empty( $_SERVER['REQUEST_URI'] ) || ( php_sapi_name() != 'cgi-fcgi' && preg_match( '/^Microsoft-IIS\//', $_SERVER['SERVER_SOFTWARE'] ) ) ) {

View File

@ -50,7 +50,7 @@ function wp_nav_menu( $args = array() ) {
if ( 'div' == $args->container ) { if ( 'div' == $args->container ) {
$class = $args->container_class ? ' class="' . esc_attr($args->container_class) . '"' : ''; $class = $args->container_class ? ' class="' . esc_attr($args->container_class) . '"' : '';
if ( is_nav_menu($menu) ) { if ( is_nav_menu($menu) ) {
$nav_menu .= '<div id="menu-' . $menu->slug . '"'. $class .'>'; $nav_menu .= '<div id="menu-' . $menu->slug . '"'. $class .'>';
} else { } else {
@ -62,7 +62,7 @@ function wp_nav_menu( $args = array() ) {
if ( 'div' == $args->container ) if ( 'div' == $args->container )
$nav_menu .= '</div>'; $nav_menu .= '</div>';
$nav_menu = apply_filters( 'wp_nav_menu', $nav_menu, $args ); $nav_menu = apply_filters( 'wp_nav_menu', $nav_menu, $args );
if ( $args->echo ) if ( $args->echo )
@ -84,22 +84,22 @@ function wp_nav_menu( $args = array() ) {
function wp_get_nav_menu( $args = array() ) { function wp_get_nav_menu( $args = array() ) {
$defaults = array( 'menu' => '', 'menu_class' => 'menu', 'context' => 'frontend', 'depth' => 0, $defaults = array( 'menu' => '', 'menu_class' => 'menu', 'context' => 'frontend', 'depth' => 0,
'fallback_cb' => '', 'walker' => '', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', ); 'fallback_cb' => '', 'walker' => '', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', );
$args = wp_parse_args( $args, $defaults ); $args = wp_parse_args( $args, $defaults );
$args = apply_filters( 'wp_get_nav_menu_args', $args ); $args = apply_filters( 'wp_get_nav_menu_args', $args );
$args = (object) $args; $args = (object) $args;
// Variable setup // Variable setup
$nav_menu = ''; $nav_menu = '';
$items = ''; $items = '';
// Get the menu object // Get the menu object
$menu = wp_get_nav_menu_object( $args->menu ); $menu = wp_get_nav_menu_object( $args->menu );
// If the menu exists, get it's items. // If the menu exists, get it's items.
if ( $menu && !is_wp_error($menu) ) if ( $menu && !is_wp_error($menu) )
$menu_items = wp_get_nav_menu_items( $menu->term_id, $args->context ); $menu_items = wp_get_nav_menu_items( $menu->term_id, $args->context );
// If no menu was found or if the menu has no items, call the fallback_cb // If no menu was found or if the menu has no items, call the fallback_cb
if ( !$menu || is_wp_error($menu) || ( isset($menu_items) && empty($menu_items) ) ) { if ( !$menu || is_wp_error($menu) || ( isset($menu_items) && empty($menu_items) ) ) {
if ( function_exists($args->fallback_cb) || is_callable( $args->fallback_cb ) ) { if ( function_exists($args->fallback_cb) || is_callable( $args->fallback_cb ) ) {
@ -107,17 +107,17 @@ function wp_get_nav_menu( $args = array() ) {
return call_user_func( $args->fallback_cb, $_args ); return call_user_func( $args->fallback_cb, $_args );
} }
} }
// Set up the $menu_item variables // Set up the $menu_item variables
foreach ( (array) $menu_items as $key => $menu_item ) foreach ( (array) $menu_items as $key => $menu_item )
$menu_items[$menu_item->menu_order] = wp_setup_nav_menu_item( $menu_item, 'frontend' ); $menu_items[$menu_item->menu_order] = wp_setup_nav_menu_item( $menu_item, 'frontend' );
$items .= walk_nav_menu_tree( $menu_items, $args->depth, $args ); $items .= walk_nav_menu_tree( $menu_items, $args->depth, $args );
// CSS class // CSS class
$ul_class = $args->menu_class ? ' class="'. $args->menu_class .'"' : ''; $ul_class = $args->menu_class ? ' class="'. $args->menu_class .'"' : '';
$nav_menu .= '<ul'. $ul_class .'>'; $nav_menu .= '<ul'. $ul_class .'>';
// Allow plugins to hook into the menu to add their own <li>'s // Allow plugins to hook into the menu to add their own <li>'s
if ( 'frontend' == $args->context ) { if ( 'frontend' == $args->context ) {
$items = apply_filters( 'wp_nav_menu_items', $items, $args ); $items = apply_filters( 'wp_nav_menu_items', $items, $args );
@ -126,9 +126,9 @@ function wp_get_nav_menu( $args = array() ) {
} else { } else {
$nav_menu .= $items; $nav_menu .= $items;
} }
$nav_menu .= '</ul>'; $nav_menu .= '</ul>';
return apply_filters( 'wp_get_nav_menu', $nav_menu ); return apply_filters( 'wp_get_nav_menu', $nav_menu );
} }
@ -150,27 +150,27 @@ function wp_get_nav_menu_item( $menu_item, $context = 'frontend', $args = array(
$attributes .= ( isset($menu_item->target) && '' != $menu_item->target ) ? ' target="'. esc_attr($menu_item->target) .'"' : ''; $attributes .= ( isset($menu_item->target) && '' != $menu_item->target ) ? ' target="'. esc_attr($menu_item->target) .'"' : '';
$attributes .= ( isset($menu_item->xfn) && '' != $menu_item->xfn ) ? ' rel="'. esc_attr($menu_item->xfn) .'"' : ''; $attributes .= ( isset($menu_item->xfn) && '' != $menu_item->xfn ) ? ' rel="'. esc_attr($menu_item->xfn) .'"' : '';
$attributes .= ( isset($menu_item->url) && '' != $menu_item->url ) ? ' href="'. esc_attr($menu_item->url) .'"' : ''; $attributes .= ( isset($menu_item->url) && '' != $menu_item->url ) ? ' href="'. esc_attr($menu_item->url) .'"' : '';
$output .= esc_html( $args->before ); $output .= esc_html( $args->before );
$output .= '<a'. $attributes .'>'; $output .= '<a'. $attributes .'>';
$output .= esc_html( $args->link_before . apply_filters('the_title', $menu_item->title) . $args->link_after ); $output .= esc_html( $args->link_before . apply_filters('the_title', $menu_item->title) . $args->link_after );
$output .= '</a>'; $output .= '</a>';
$output .= esc_html( $args->after ); $output .= esc_html( $args->after );
break; break;
case 'backend': case 'backend':
$output .= '<dl><dt>'; $output .= '<dl><dt>';
$output .= '<span class="item-title">'. esc_html( $menu_item->title ) .'</span>'; $output .= '<span class="item-title">'. esc_html( $menu_item->title ) .'</span>';
$output .= '<span class="item-controls">'; $output .= '<span class="item-controls">';
$output .= '<span class="item-type">'. esc_html( $menu_item->append ) .'</span>'; $output .= '<span class="item-type">'. esc_html( $menu_item->append ) .'</span>';
// Actions // Actions
$output .= '<a class="item-edit thickbox" id="edit-'. esc_attr( $menu_item->ID ) .'" value="'. esc_attr( $menu_item->ID ) .'" title="'. __('Edit Menu Item') .'" href="#TB_inline?height=540&width=300&inlineId=menu-item-settings">'. __('Edit') .'</a> | '; $output .= '<a class="item-edit thickbox" id="edit-'. esc_attr( $menu_item->ID ) .'" value="'. esc_attr( $menu_item->ID ) .'" title="'. __('Edit Menu Item') .'" href="#TB_inline?height=540&width=300&inlineId=menu-item-settings">'. __('Edit') .'</a> | ';
$output .= '<a class="item-delete" id="delete-'. esc_attr( $menu_item->ID ) .'" value="'. esc_attr( $menu_item->ID ) .'">'. __('Delete') .'</a>'; $output .= '<a class="item-delete" id="delete-'. esc_attr( $menu_item->ID ) .'" value="'. esc_attr( $menu_item->ID ) .'">'. __('Delete') .'</a>';
$output .= '</span></dt></dl>'; $output .= '</span></dt></dl>';
// Menu Item Settings // Menu Item Settings
$output .= '<input type="hidden" name="menu-item-db-id[]" value="'. esc_attr( $menu_item->ID ) .'" />'; $output .= '<input type="hidden" name="menu-item-db-id[]" value="'. esc_attr( $menu_item->ID ) .'" />';
$output .= '<input type="hidden" name="menu-item-object-id[]" value="'. esc_attr( $menu_item->object_id ) .'" />'; $output .= '<input type="hidden" name="menu-item-object-id[]" value="'. esc_attr( $menu_item->object_id ) .'" />';
@ -186,12 +186,12 @@ function wp_get_nav_menu_item( $menu_item, $context = 'frontend', $args = array(
$output .= '<input type="hidden" name="menu-item-attr-title[]" value="'.esc_attr( $menu_item->post_excerpt ) .'" />'; $output .= '<input type="hidden" name="menu-item-attr-title[]" value="'.esc_attr( $menu_item->post_excerpt ) .'" />';
$output .= '<input type="hidden" name="menu-item-target[]" value="'. esc_attr( $menu_item->target ) .'" />'; $output .= '<input type="hidden" name="menu-item-target[]" value="'. esc_attr( $menu_item->target ) .'" />';
break; break;
case 'custom': case 'custom':
case 'taxonomy': case 'taxonomy':
case 'post_type': case 'post_type':
$output .= '<label class="menu-item-title"><input type="checkbox" id="'. esc_attr( 'menu-item-' . $menu_item->object_id ) .'" value="'. esc_attr( $menu_item->url ) .'" />'. $menu_item->title .'</label>'; $output .= '<label class="menu-item-title"><input type="checkbox" id="'. esc_attr( 'menu-item-' . $menu_item->object_id ) .'" value="'. esc_attr( $menu_item->url ) .'" />'. $menu_item->title .'</label>';
// Menu item hidden fields // Menu item hidden fields
$output .= '<input type="hidden" class="menu-item-db-id" value="0" />'; $output .= '<input type="hidden" class="menu-item-db-id" value="0" />';
$output .= '<input type="hidden" class="menu-item-object-id" value="'. esc_attr( $menu_item->object_id ) .'" />'; $output .= '<input type="hidden" class="menu-item-object-id" value="'. esc_attr( $menu_item->object_id ) .'" />';
@ -209,7 +209,7 @@ function wp_get_nav_menu_item( $menu_item, $context = 'frontend', $args = array(
$output .= '<input type="hidden" class="menu-item-xfn" value="'. esc_attr( $menu_item->xfn ) .'" />'; $output .= '<input type="hidden" class="menu-item-xfn" value="'. esc_attr( $menu_item->xfn ) .'" />';
break; break;
} }
return $output; return $output;
} }
?> ?>

View File

@ -77,7 +77,7 @@ function wp_create_nav_menu( $menu_name, $args = array() ) {
return $menu; return $menu;
$result = get_term( $menu['term_id'], 'nav_menu' ); $result = get_term( $menu['term_id'], 'nav_menu' );
if ( $result && !is_wp_error($result) ) { if ( $result && !is_wp_error($result) ) {
do_action( 'wp_create_nav_menu', $menu['term_id'] ); do_action( 'wp_create_nav_menu', $menu['term_id'] );
return $result; return $result;
@ -105,9 +105,9 @@ function wp_delete_nav_menu( $menu ) {
wp_delete_post( $item ); wp_delete_post( $item );
} }
} }
$result = wp_delete_term( $menu->term_id, 'nav_menu' ); $result = wp_delete_term( $menu->term_id, 'nav_menu' );
if ( $result && !is_wp_error($result) ) { if ( $result && !is_wp_error($result) ) {
do_action( 'wp_delete_nav_menu', $menu->term_id ); do_action( 'wp_delete_nav_menu', $menu->term_id );
return $result; return $result;
@ -177,7 +177,7 @@ function wp_get_nav_menu_items( $menu, $args = array() ) {
function walk_nav_menu_tree( $items, $depth, $r ) { function walk_nav_menu_tree( $items, $depth, $r ) {
$walker = ( empty($r->walker) ) ? new Walker_Nav_Menu : $r->walker; $walker = ( empty($r->walker) ) ? new Walker_Nav_Menu : $r->walker;
$args = array( $items, $depth, $r ); $args = array( $items, $depth, $r );
return call_user_func_array(array(&$walker, 'walk'), $args); return call_user_func_array(array(&$walker, 'walk'), $args);
} }
@ -198,19 +198,19 @@ function wp_setup_nav_menu_item( $menu_item, $menu_item_type = null, $menu_item_
$menu_item->object_id = get_post_meta( $menu_item->ID, '_menu_item_object_id', true ); $menu_item->object_id = get_post_meta( $menu_item->ID, '_menu_item_object_id', true );
$menu_item->object = get_post_meta( $menu_item->ID, '_menu_item_object', true ); $menu_item->object = get_post_meta( $menu_item->ID, '_menu_item_object', true );
$menu_item->type = get_post_meta( $menu_item->ID, '_menu_item_type', true ); $menu_item->type = get_post_meta( $menu_item->ID, '_menu_item_type', true );
if ( 'post_type' == $menu_item->type ) { if ( 'post_type' == $menu_item->type ) {
$object = get_post_type_object( $menu_item->object ); $object = get_post_type_object( $menu_item->object );
$menu_item->append = $object->singular_label; $menu_item->append = $object->singular_label;
} elseif ( 'taxonomy' == $menu_item->type ) { } elseif ( 'taxonomy' == $menu_item->type ) {
$object = get_taxonomy( $menu_item->object ); $object = get_taxonomy( $menu_item->object );
$menu_item->append = $object->singular_label; $menu_item->append = $object->singular_label;
} else { } else {
$menu_item->append = __('Custom'); $menu_item->append = __('Custom');
} }
$menu_item->title = $menu_item->post_title; $menu_item->title = $menu_item->post_title;
$menu_item->url = get_post_meta( $menu_item->ID, '_menu_item_url', true ); $menu_item->url = get_post_meta( $menu_item->ID, '_menu_item_url', true );
$menu_item->target = get_post_meta( $menu_item->ID, '_menu_item_target', true ); $menu_item->target = get_post_meta( $menu_item->ID, '_menu_item_target', true );
@ -218,7 +218,7 @@ function wp_setup_nav_menu_item( $menu_item, $menu_item_type = null, $menu_item_
$menu_item->attr_title = strip_tags( $menu_item->post_excerpt ); $menu_item->attr_title = strip_tags( $menu_item->post_excerpt );
$menu_item->description = strip_tags( $menu_item->post_content ); $menu_item->description = strip_tags( $menu_item->post_content );
$menu_item->classes = get_post_meta( $menu_item->ID, '_menu_item_classes', true );; $menu_item->classes = get_post_meta( $menu_item->ID, '_menu_item_classes', true );
$menu_item->xfn = get_post_meta( $menu_item->ID, '_menu_item_xfn', true ); $menu_item->xfn = get_post_meta( $menu_item->ID, '_menu_item_xfn', true );
break; break;
@ -277,7 +277,7 @@ function wp_setup_nav_menu_item( $menu_item, $menu_item_type = null, $menu_item_
$menu_item->classes = ''; $menu_item->classes = '';
$menu_item->xfn = ''; $menu_item->xfn = '';
break; break;
} }
return $menu_item; return $menu_item;
} }
?> ?>

View File

@ -193,7 +193,7 @@ class MO extends Gettext_Translations {
/** /**
* Build a Translation_Entry from original string and translation strings, * Build a Translation_Entry from original string and translation strings,
* found in a MO file * found in a MO file
* *
* @static * @static
* @param string $original original string to translate from MO file. Might contain * @param string $original original string to translate from MO file. Might contain
* 0x04 as context separator or 0x00 as singular/plural separator * 0x04 as context separator or 0x00 as singular/plural separator

View File

@ -109,7 +109,7 @@ class PO extends Gettext_Translations {
/** /**
* Gives back the original string from a PO-formatted string * Gives back the original string from a PO-formatted string
* *
* @static * @static
* @param string $string PO-formatted string * @param string $string PO-formatted string
* @return string enascaped string * @return string enascaped string
@ -139,7 +139,7 @@ class PO extends Gettext_Translations {
} }
/** /**
* Inserts $with in the beginning of every new line of $string and * Inserts $with in the beginning of every new line of $string and
* returns the modified string * returns the modified string
* *
* @static * @static
@ -254,7 +254,7 @@ class PO extends Gettext_Translations {
return false; return false;
} }
// add comment // add comment
$this->add_comment_to_entry($entry, $line);; $this->add_comment_to_entry($entry, $line);
} elseif (preg_match('/^msgctxt\s+(".*")/', $line, $m)) { } elseif (preg_match('/^msgctxt\s+(".*")/', $line, $m)) {
if ($is_final($context)) { if ($is_final($context)) {
PO::read_line($f, 'put-back'); PO::read_line($f, 'put-back');
@ -360,4 +360,4 @@ class PO extends Gettext_Translations {
return $s; return $s;
} }
} }
endif; endif;

View File

@ -152,7 +152,7 @@ class Gettext_Translations extends Translations {
/** /**
* Adds parantheses to the inner parts of ternary operators in * Adds parantheses to the inner parts of ternary operators in
* plural expressions, because PHP evaluates ternary oerators from left to right * plural expressions, because PHP evaluates ternary oerators from left to right
* *
* @param string $expression the expression without parentheses * @param string $expression the expression without parentheses
* @return string the expression with parentheses added * @return string the expression with parentheses added
*/ */

View File

@ -1715,9 +1715,9 @@ class WP_Query {
if ( !empty($q['post_type']) && !empty($q[ $q['post_type'] ]) ) { if ( !empty($q['post_type']) && !empty($q[ $q['post_type'] ]) ) {
$q[ $q['post_type'] ] = str_replace('%2F', '/', urlencode(urldecode($q[ $q['post_type'] ]))); $q[ $q['post_type'] ] = str_replace('%2F', '/', urlencode(urldecode($q[ $q['post_type'] ])));
$post_type_object = get_post_type_object($q['post_type']); $post_type_object = get_post_type_object($q['post_type']);
if ( ! $post_type_object->hierarchical || strpos($q[ $q['post_type'] ], '/') === false) { if ( ! $post_type_object->hierarchical || strpos($q[ $q['post_type'] ], '/') === false) {
$q['name'] = $q[ $q['post_type'] ] = sanitize_title($q[ $q['post_type'] ]); $q['name'] = $q[ $q['post_type'] ] = sanitize_title($q[ $q['post_type'] ]);
$where .= " AND $wpdb->posts.post_name = '" . $q[ $q['post_type'] ] . "'"; $where .= " AND $wpdb->posts.post_name = '" . $q[ $q['post_type'] ] . "'";
} else { } else {
// Hierarchical post type, need to look deeper to see if its an attachment or this post_type // Hierarchical post type, need to look deeper to see if its an attachment or this post_type
if ( isset($this->queried_object_id) ) { if ( isset($this->queried_object_id) ) {