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' );
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'] );

View File

@ -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;";
?>
<div id="custom-background-image" style="<?php echo $bgcolor, $align ?>">
<?php if ( get_background_image() ) { ?>

View File

@ -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']);

View File

@ -405,18 +405,18 @@ function post_comment_status_meta_box($post) {
<?php
}
/**
/**
* Display comments for post table header
*
*
* @since 3.0.0
*
*
* @param $result table header rows
* @return
*/
function post_comment_meta_box_thead($result) {
* @return
*/
function post_comment_meta_box_thead($result) {
unset($result['cb'], $result['response']);
return $result;
}
return $result;
}
/**
* 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;">
<thead><tr>
<?php print_column_headers('edit-comments'); ?>
<?php print_column_headers('edit-comments'); ?>
</tr></thead>
<tbody id="the-comment-list" class="list:comment"></tbody>
</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>
<?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();
}

View File

@ -17,12 +17,12 @@ function wp_nav_menu_metaboxes_setup() {
**/
function wp_initial_nav_menu_meta_boxes() {
global $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' );
$hidden_meta_boxes = array();
foreach ( array_keys($wp_meta_boxes['nav-menus']) as $context ) {
foreach ( array_keys($wp_meta_boxes['nav-menus'][$context]) as $priority ) {
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();
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()
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="hide-all"><?php _e('Hide All'); ?></a>
</span>
<span class="add-to-menu">
<a class="button"><?php _e('Add to Menu'); ?></a>
</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="hide-all"><?php _e('Hide All'); ?></a>
</span>
<span class="add-to-menu">
<a class="button"><?php _e('Add to Menu'); ?></a>
</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="hide-all"><?php _e('Hide All'); ?></a>
</span>
<span class="add-to-menu">
<a class="button"><?php _e('Add to Menu'); ?></a>
</span>
@ -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 .= '<li'. $attributes .'>';
$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 );

View File

@ -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 = '<div id="message" class="error"><p>' . $delete_nav_menu->get_error_message() . '</p></div>';
} 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 = '<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 );
}

View File

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

View File

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

View File

@ -58,14 +58,14 @@
} 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' );
}
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()
);
?>
<?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?>

View File

@ -3,7 +3,7 @@
<div id="container">
<div id="content">
<h1 class="page-title"><?php
<h1 class="page-title"><?php
printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' );
?></h1>
<?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() ) : ?>
<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( __( 'One Response 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;
$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 ) {

View File

@ -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 {

View File

@ -42,9 +42,9 @@
echo wp_get_attachment_image( $image->ID, 'thumbnail' );
?></a>
</div>
<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"',
$total_images
<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"',
$total_images
); ?></em></p>
<?php the_excerpt( '' ); ?>

View File

@ -1,9 +1,9 @@
<?php
if (
if (
is_active_sidebar( 'first-footer-widget-area' ) ||
is_active_sidebar( 'second-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">

View File

@ -49,14 +49,14 @@
} 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' );
}
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()
);
?>
<?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(); ?>
<h1 class="page-title"><?php
<h1 class="page-title"><?php
printf( __( 'Tag Archives: %s', 'twentyten' ), '<span>' . single_tag_title( '', false ) . '</span>' );
?></h1>

View File

@ -934,7 +934,7 @@ class Walker {
else
$children_elements[ $e->$parent_field ][] = $e;
}
/*
* when none of the elements is top level
* 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) {
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
if ( 'frontend' == $args->context ) {
global $wp_query;
$css_class = array( 'menu-item', 'menu-item-type-'. $item->type, $item->classes );
if ( 'custom' != $item->object )
$css_class[] = 'menu-item-object-'. $item->object;
if ( $item->object_id == $wp_query->get_queried_object_id() )
$css_class[] = 'current-menu-item';
// @todo add classes for parent/child relationships
$css_class = join( ' ', apply_filters('nav_menu_css_class', $css_class, $item) );
}
$maybe_value = ( 'backend' == $args->context ) ? ' value="'. $item->ID .'"' : '';
$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 );
}

View File

@ -38,14 +38,14 @@ function wp_unregister_GLOBALS() {
*/
function wp_fix_server_vars() {
global $PHP_SELF;
$default_server_values = array(
'SERVER_SOFTWARE' => '',
'REQUEST_URI' => '',
);
$_SERVER = array_merge( $default_server_values, $_SERVER );
// 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'] ) ) ) {

View File

@ -50,7 +50,7 @@ function wp_nav_menu( $args = array() ) {
if ( 'div' == $args->container ) {
$class = $args->container_class ? ' class="' . esc_attr($args->container_class) . '"' : '';
if ( is_nav_menu($menu) ) {
$nav_menu .= '<div id="menu-' . $menu->slug . '"'. $class .'>';
} else {
@ -62,7 +62,7 @@ function wp_nav_menu( $args = array() ) {
if ( 'div' == $args->container )
$nav_menu .= '</div>';
$nav_menu = apply_filters( 'wp_nav_menu', $nav_menu, $args );
if ( $args->echo )
@ -84,22 +84,22 @@ function wp_nav_menu( $args = array() ) {
function wp_get_nav_menu( $args = array() ) {
$defaults = array( 'menu' => '', 'menu_class' => 'menu', 'context' => 'frontend', 'depth' => 0,
'fallback_cb' => '', 'walker' => '', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', );
$args = wp_parse_args( $args, $defaults );
$args = apply_filters( 'wp_get_nav_menu_args', $args );
$args = (object) $args;
// Variable setup
$nav_menu = '';
$items = '';
// Get the menu object
$menu = wp_get_nav_menu_object( $args->menu );
// If the menu exists, get it's items.
if ( $menu && !is_wp_error($menu) )
$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 ( !$menu || is_wp_error($menu) || ( isset($menu_items) && empty($menu_items) ) ) {
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 );
}
}
// Set up the $menu_item variables
foreach ( (array) $menu_items as $key => $menu_item )
$menu_items[$menu_item->menu_order] = wp_setup_nav_menu_item( $menu_item, 'frontend' );
$items .= walk_nav_menu_tree( $menu_items, $args->depth, $args );
// CSS class
$ul_class = $args->menu_class ? ' class="'. $args->menu_class .'"' : '';
$nav_menu .= '<ul'. $ul_class .'>';
// Allow plugins to hook into the menu to add their own <li>'s
if ( 'frontend' == $args->context ) {
$items = apply_filters( 'wp_nav_menu_items', $items, $args );
@ -126,9 +126,9 @@ function wp_get_nav_menu( $args = array() ) {
} else {
$nav_menu .= $items;
}
$nav_menu .= '</ul>';
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->xfn) && '' != $menu_item->xfn ) ? ' rel="'. esc_attr($menu_item->xfn) .'"' : '';
$attributes .= ( isset($menu_item->url) && '' != $menu_item->url ) ? ' href="'. esc_attr($menu_item->url) .'"' : '';
$output .= esc_html( $args->before );
$output .= '<a'. $attributes .'>';
$output .= esc_html( $args->link_before . apply_filters('the_title', $menu_item->title) . $args->link_after );
$output .= '</a>';
$output .= esc_html( $args->after );
break;
case 'backend':
$output .= '<dl><dt>';
$output .= '<span class="item-title">'. esc_html( $menu_item->title ) .'</span>';
$output .= '<span class="item-controls">';
$output .= '<span class="item-type">'. esc_html( $menu_item->append ) .'</span>';
// 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-delete" id="delete-'. esc_attr( $menu_item->ID ) .'" value="'. esc_attr( $menu_item->ID ) .'">'. __('Delete') .'</a>';
$output .= '</span></dt></dl>';
// 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-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-target[]" value="'. esc_attr( $menu_item->target ) .'" />';
break;
case 'custom':
case 'taxonomy':
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>';
// Menu item hidden fields
$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 ) .'" />';
@ -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 ) .'" />';
break;
}
return $output;
}
?>

View File

@ -77,7 +77,7 @@ function wp_create_nav_menu( $menu_name, $args = array() ) {
return $menu;
$result = get_term( $menu['term_id'], 'nav_menu' );
if ( $result && !is_wp_error($result) ) {
do_action( 'wp_create_nav_menu', $menu['term_id'] );
return $result;
@ -105,9 +105,9 @@ function wp_delete_nav_menu( $menu ) {
wp_delete_post( $item );
}
}
$result = wp_delete_term( $menu->term_id, 'nav_menu' );
if ( $result && !is_wp_error($result) ) {
do_action( 'wp_delete_nav_menu', $menu->term_id );
return $result;
@ -177,7 +177,7 @@ function wp_get_nav_menu_items( $menu, $args = array() ) {
function walk_nav_menu_tree( $items, $depth, $r ) {
$walker = ( empty($r->walker) ) ? new Walker_Nav_Menu : $r->walker;
$args = array( $items, $depth, $r );
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 = get_post_meta( $menu_item->ID, '_menu_item_object', true );
$menu_item->type = get_post_meta( $menu_item->ID, '_menu_item_type', true );
if ( 'post_type' == $menu_item->type ) {
$object = get_post_type_object( $menu_item->object );
$menu_item->append = $object->singular_label;
} elseif ( 'taxonomy' == $menu_item->type ) {
$object = get_taxonomy( $menu_item->object );
$menu_item->append = $object->singular_label;
} else {
$menu_item->append = __('Custom');
}
$menu_item->title = $menu_item->post_title;
$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 );
@ -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->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 );
break;
@ -277,7 +277,7 @@ function wp_setup_nav_menu_item( $menu_item, $menu_item_type = null, $menu_item_
$menu_item->classes = '';
$menu_item->xfn = '';
break;
}
}
return $menu_item;
}
?>
?>

View File

@ -193,7 +193,7 @@ class MO extends Gettext_Translations {
/**
* Build a Translation_Entry from original string and translation strings,
* found in a MO file
*
*
* @static
* @param string $original original string to translate from MO file. Might contain
* 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
*
*
* @static
* @param string $string PO-formatted 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
*
* @static
@ -254,7 +254,7 @@ class PO extends Gettext_Translations {
return false;
}
// add comment
$this->add_comment_to_entry($entry, $line);;
$this->add_comment_to_entry($entry, $line);
} elseif (preg_match('/^msgctxt\s+(".*")/', $line, $m)) {
if ($is_final($context)) {
PO::read_line($f, 'put-back');
@ -360,4 +360,4 @@ class PO extends Gettext_Translations {
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
* plural expressions, because PHP evaluates ternary oerators from left to right
*
*
* @param string $expression the expression without parentheses
* @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'] ]) ) {
$q[ $q['post_type'] ] = str_replace('%2F', '/', urlencode(urldecode($q[ $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'] ]);
$where .= " AND $wpdb->posts.post_name = '" . $q[ $q['post_type'] ] . "'";
$where .= " AND $wpdb->posts.post_name = '" . $q[ $q['post_type'] ] . "'";
} else {
// Hierarchical post type, need to look deeper to see if its an attachment or this post_type
if ( isset($this->queried_object_id) ) {