Changeset 13830
- Timestamp:
- 03/26/2010 07:36:49 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r13802 r13830 1396 1396 } 1397 1397 die( '0' ); 1398 case 'save-custom-link': 1398 case 'save-custom-link': 1399 1399 if ( ! current_user_can('manage_links') ) 1400 1400 die('-1'); 1401 1401 1402 1402 $link_name = isset( $_POST['link_name'] ) ? esc_html($_POST['link_name']) : null; 1403 1403 $link_url = isset( $_POST['link_url'] ) ? esc_url_raw($_POST['link_url']) : null; 1404 1404 1405 1405 if ( !$link_name || !$link_url ) 1406 1406 die('-1'); 1407 1407 1408 1408 $post = array( 1409 1409 'post_status' => 'draft', 'post_type' => 'nav_menu_item', 'ping_status' => 0, … … 1411 1411 'post_parent' => 0, 'menu_order' => 0, 'post_content' => '', 1412 1412 ); 1413 1413 1414 1414 $link_id = wp_insert_post( $post ); 1415 1415 1416 1416 update_post_meta( $link_id, '_menu_item_type', 'custom' ); 1417 1417 update_post_meta( $link_id, '_menu_item_object_id', (int) $link_id ); … … 1421 1421 update_post_meta( $link_id, '_menu_item_xfn', '' ); 1422 1422 update_post_meta( $link_id, '_menu_item_url', $link_url ); 1423 1423 1424 1424 die( json_encode($link_id) ); 1425 1425 default : -
trunk/wp-admin/custom-background.php
r13827 r13830 154 154 155 155 if ( $align = get_theme_mod('background_position', 'left') ) 156 $align = "text-align: $align;"; 156 $align = "text-align: $align;"; 157 157 ?> 158 158 <div id="custom-background-image" style="<?php echo $bgcolor, $align ?>"> -
trunk/wp-admin/import/wordpress.php
r13769 r13830 564 564 $num_comments = 0; 565 565 $inserted_comments = array(); 566 if ( $comments) { 566 if ( $comments) { 567 567 foreach ($comments as $comment) { 568 568 $comment_id = $this->get_tag( $comment, 'wp:comment_id'); … … 675 675 } 676 676 677 function fetch_remote_file( $post, $url ) { 677 function fetch_remote_file( $post, $url ) { 678 678 add_filter( 'http_request_timeout', array( &$this, 'bump_request_timeout' ) ); 679 679 -
trunk/wp-admin/includes/meta-boxes.php
r13827 r13830 406 406 } 407 407 408 /** 408 /** 409 409 * Display comments for post table header 410 * 410 * 411 411 * @since 3.0.0 412 * 412 * 413 413 * @param $result table header rows 414 * @return 415 */ 416 function post_comment_meta_box_thead($result) { 414 * @return 415 */ 416 function post_comment_meta_box_thead($result) { 417 417 unset($result['cb'], $result['response']); 418 return $result; 419 } 418 return $result; 419 } 420 420 421 421 /** … … 442 442 <table class="widefat comments-box fixed" cellspacing="0" style="display:none;"> 443 443 <thead><tr> 444 <?php print_column_headers('edit-comments'); ?> 444 <?php print_column_headers('edit-comments'); ?> 445 445 </tr></thead> 446 446 <tbody id="the-comment-list" class="list:comment"></tbody> … … 453 453 <?php 454 454 } 455 remove_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead'); 455 remove_filter('manage_edit-comments_columns', 'post_comment_meta_box_thead'); 456 456 wp_comment_trashnotice(); 457 457 } -
trunk/wp-admin/includes/nav-menu.php
r13802 r13830 18 18 function wp_initial_nav_menu_meta_boxes() { 19 19 global $wp_meta_boxes; 20 20 21 21 if ( !get_user_option( 'meta-box-hidden_nav-menus' ) && is_array($wp_meta_boxes) ) { 22 22 23 23 $initial_meta_boxes = array( 'manage-menu', 'create-menu', 'add-custom-links', 'add-page', 'add-category' ); 24 24 $hidden_meta_boxes = array(); 25 25 26 26 foreach ( array_keys($wp_meta_boxes['nav-menus']) as $context ) { 27 27 foreach ( array_keys($wp_meta_boxes['nav-menus'][$context]) as $priority ) { … … 37 37 $user = wp_get_current_user(); 38 38 update_user_meta( $user->ID, 'meta-box-hidden_nav-menus', $hidden_meta_boxes ); 39 39 40 40 // returns all the hidden metaboxes to the js function: wpNavMenu.initial_meta_boxes() 41 41 return join( ',', $hidden_meta_boxes ); … … 152 152 <a class="hide-all"><?php _e('Hide All'); ?></a> 153 153 </span> 154 154 155 155 <span class="add-to-menu"> 156 156 <a class="button"><?php _e('Add to Menu'); ?></a> … … 206 206 <a class="hide-all"><?php _e('Hide All'); ?></a> 207 207 </span> 208 208 209 209 <span class="add-to-menu"> 210 210 <a class="button"><?php _e('Add to Menu'); ?></a> … … 273 273 <a class="hide-all"><?php _e('Hide All'); ?></a> 274 274 </span> 275 275 276 276 <span class="add-to-menu"> 277 277 <a class="button"><?php _e('Add to Menu'); ?></a> … … 328 328 // Set up the menu item 329 329 $menu_item = wp_setup_nav_menu_item( $menu_item, $object_type, $object ); 330 330 331 331 // No blank titles 332 332 if ( empty($menu_item->title) ) 333 333 continue; 334 334 335 335 $attributes = ( 'backend' == $context ) ? ' id="menu-item-'. $i .'" value="'. $i .'"' : ''; 336 336 337 337 $output .= '<li'. $attributes .'>'; 338 338 $output .= wp_get_nav_menu_item( $menu_item, $object_type, $object ); -
trunk/wp-admin/nav-menus.php
r13810 r13830 59 59 if ( is_nav_menu($nav_menu_selected_id) ) { 60 60 $delete_nav_menu = wp_delete_nav_menu( $nav_menu_selected_id ); 61 61 62 62 if ( is_wp_error($delete_nav_menu) ) { 63 63 $messages_div = '<div id="message" class="error"><p>' . $delete_nav_menu->get_error_message() . '</p></div>'; … … 94 94 } 95 95 } else { 96 96 97 97 // @todo wrap this into wp_update_nav_menu_object(); 98 98 if ( isset($_POST['menu-name']) ) { … … 101 101 $new_nav_menu = wp_update_term( $nav_menu_selected_id, 'nav_menu', $args ); 102 102 } 103 103 104 104 // Update menu items 105 105 106 106 // @todo: wrap update logic into wp_update_nav_menu(); 107 107 $update_count = isset( $_POST['li-count'] ) ? (int) $_POST['li-count'] : 0; … … 110 110 if ( !is_wp_error($update_nav_menu) ) { 111 111 $menu_items = wp_get_nav_menu_items( $nav_menu_selected_id, array('orderby' => 'ID', 'output' => ARRAY_A, 'output_key' => 'ID') ); 112 112 113 113 // Loop through all POST variables 114 114 for ( $k = 0; $k < $update_count; $k++ ) { 115 115 116 116 // Menu item title can't be blank 117 117 if ( '' == $_POST['menu-item-title'][$k] ) 118 118 continue; 119 119 120 120 $menu_item_db_id = isset( $_POST['menu-item-db-id'][$k] ) ? $_POST['menu-item-db-id'][$k] : 0; 121 121 $menu_item_object_id = isset( $_POST['menu-item-object-id'][$k] ) ? $_POST['menu-item-object-id'][$k] : 0; … … 141 141 'post_content' => $menu_item_description, 142 142 ); 143 143 144 144 // New menu item 145 145 if ( $menu_item_db_id == 0 ) { 146 146 $menu_item_db_id = wp_insert_post( $post ); 147 147 148 148 // Update existing menu item 149 149 } elseif ( isset($menu_items[$menu_item_db_id]) || ( 'custom' == $menu_item_type && 0 != $menu_item_db_id ) ) { … … 171 171 } 172 172 } 173 173 174 174 do_action( 'wp_update_nav_menu', $nav_menu_selected_id ); 175 175 176 176 $messages_div = '<div id="message" class="updated"><p>' . sprintf( __('The <strong>%s</strong> menu has been updated.'), $update_nav_menu->name ) . '</p></div>'; 177 177 unset( $update_nav_menu, $update_count, $menu_items ); -
trunk/wp-content/themes/default/functions.php
r13398 r13830 314 314 display: <?php echo kubrick_header_display_string(); ?>; 315 315 } 316 316 317 317 .description { 318 318 margin-top: 16px; -
trunk/wp-content/themes/default/page.php
r11885 r13830 21 21 <?php endwhile; endif; ?> 22 22 <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?> 23 23 24 24 <?php comments_template(); ?> 25 25 26 26 </div> 27 27 -
trunk/wp-content/themes/twentyten/attachment.php
r13818 r13830 59 59 $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' ); 60 60 } 61 printf( 61 printf( 62 62 $utility_text, 63 63 get_the_category_list( ', ' ), … … 65 65 get_permalink(), 66 66 the_title_attribute( 'echo=0' ), 67 get_post_comments_feed_link() 68 ); 67 get_post_comments_feed_link() 68 ); 69 69 ?> 70 70 -
trunk/wp-content/themes/twentyten/category.php
r13816 r13830 4 4 <div id="content"> 5 5 6 <h1 class="page-title"><?php 6 <h1 class="page-title"><?php 7 7 printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' ); 8 8 ?></h1> -
trunk/wp-content/themes/twentyten/comments.php
r13720 r13830 13 13 14 14 <?php if ( have_comments() ) : ?> 15 <h3 id="comments-title"><?php comments_number( 15 <h3 id="comments-title"><?php comments_number( 16 16 sprintf( __( 'No Responses to %s', 'twentyten' ), '<em>' . get_the_title() . '</em>' ), 17 17 sprintf( __( 'One Response to %s', 'twentyten' ), '<em>' . get_the_title() . '</em>' ), -
trunk/wp-content/themes/twentyten/functions.php
r13724 r13830 197 197 $current_term = $wp_query->get_queried_object(); 198 198 $terms = wp_get_object_terms( $post->ID, $taxonomy ); 199 // If we're viewing a Taxonomy page.. 199 // If we're viewing a Taxonomy page.. 200 200 if ( isset( $current_term->taxonomy ) && $taxonomy == $current_term->taxonomy ) { 201 201 // Remove the term from display. -
trunk/wp-content/themes/twentyten/header.php
r13818 r13830 11 11 single_post_title( '' ); echo ' | '; bloginfo( 'name' ); 12 12 } elseif ( is_search() ) { 13 printf( __( 'Search results for "%s"', 'twentyten' ), esc_html( $s ) ); twentyten_the_page_number(); echo ' | '; bloginfo( 'name' ); 13 printf( __( 'Search results for "%s"', 'twentyten' ), esc_html( $s ) ); twentyten_the_page_number(); echo ' | '; bloginfo( 'name' ); 14 14 } elseif ( is_404() ) { 15 15 _e( 'Not Found', 'twentyten' ); echo ' | '; bloginfo( 'name' ); -
trunk/wp-content/themes/twentyten/loop.php
r13818 r13830 43 43 ?></a> 44 44 </div> 45 <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ), 46 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', 47 $total_images 45 <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ), 46 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', 47 $total_images 48 48 ); ?></em></p> 49 49 -
trunk/wp-content/themes/twentyten/sidebar-footer.php
r13720 r13830 1 1 <?php 2 if ( 2 if ( 3 3 is_active_sidebar( 'first-footer-widget-area' ) || 4 4 is_active_sidebar( 'second-footer-widget-area' ) || 5 5 is_active_sidebar( 'third-footer-widget-area' ) || 6 is_active_sidebar( 'fourth-footer-widget-area' ) 6 is_active_sidebar( 'fourth-footer-widget-area' ) 7 7 ) : 8 8 ?> -
trunk/wp-content/themes/twentyten/single.php
r13818 r13830 50 50 $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' ); 51 51 } 52 printf( 52 printf( 53 53 $utility_text, 54 54 get_the_category_list( ', ' ), … … 56 56 get_permalink(), 57 57 the_title_attribute( 'echo=0' ), 58 get_post_comments_feed_link() 59 ); 58 get_post_comments_feed_link() 59 ); 60 60 ?> 61 61 -
trunk/wp-content/themes/twentyten/tag.php
r13816 r13830 6 6 <?php the_post(); ?> 7 7 8 <h1 class="page-title"><?php 8 <h1 class="page-title"><?php 9 9 printf( __( 'Tag Archives: %s', 'twentyten' ), '<span>' . single_tag_title( '', false ) . '</span>' ); 10 10 ?></h1> -
trunk/wp-includes/classes.php
r13802 r13830 935 935 $children_elements[ $e->$parent_field ][] = $e; 936 936 } 937 937 938 938 /* 939 939 * when none of the elements is top level … … 1183 1183 function start_el(&$output, $item, $depth, $args) { 1184 1184 $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; 1185 1185 1186 1186 if ( 'frontend' == $args->context ) { 1187 1187 global $wp_query; 1188 1188 1189 1189 $css_class = array( 'menu-item', 'menu-item-type-'. $item->type, $item->classes ); 1190 1190 1191 1191 if ( 'custom' != $item->object ) 1192 1192 $css_class[] = 'menu-item-object-'. $item->object; 1193 1193 1194 1194 if ( $item->object_id == $wp_query->get_queried_object_id() ) 1195 1195 $css_class[] = 'current-menu-item'; 1196 1196 1197 1197 // @todo add classes for parent/child relationships 1198 1198 1199 1199 $css_class = join( ' ', apply_filters('nav_menu_css_class', $css_class, $item) ); 1200 1200 } 1201 1201 1202 1202 $maybe_value = ( 'backend' == $args->context ) ? ' value="'. $item->ID .'"' : ''; 1203 1203 $maybe_classes = ( 'frontend' == $args->context ) ? ' class="'. $css_class .'"' : ''; 1204 1204 1205 1205 $output .= $indent . '<li id="menu-item-'. $item->ID .'"'. $maybe_value . $maybe_classes .'>' . wp_get_nav_menu_item( $item, $args->context, $args ); 1206 1206 } -
trunk/wp-includes/load.php
r13822 r13830 39 39 function wp_fix_server_vars() { 40 40 global $PHP_SELF; 41 41 42 42 $default_server_values = array( 43 43 'SERVER_SOFTWARE' => '', … … 46 46 47 47 $_SERVER = array_merge( $default_server_values, $_SERVER ); 48 48 49 49 // Fix for IIS when running with PHP ISAPI 50 50 if ( empty( $_SERVER['REQUEST_URI'] ) || ( php_sapi_name() != 'cgi-fcgi' && preg_match( '/^Microsoft-IIS\//', $_SERVER['SERVER_SOFTWARE'] ) ) ) { -
trunk/wp-includes/nav-menu-template.php
r13802 r13830 51 51 if ( 'div' == $args->container ) { 52 52 $class = $args->container_class ? ' class="' . esc_attr($args->container_class) . '"' : ''; 53 53 54 54 if ( is_nav_menu($menu) ) { 55 55 $nav_menu .= '<div id="menu-' . $menu->slug . '"'. $class .'>'; … … 63 63 if ( 'div' == $args->container ) 64 64 $nav_menu .= '</div>'; 65 65 66 66 $nav_menu = apply_filters( 'wp_nav_menu', $nav_menu, $args ); 67 67 … … 85 85 $defaults = array( 'menu' => '', 'menu_class' => 'menu', 'context' => 'frontend', 'depth' => 0, 86 86 'fallback_cb' => '', 'walker' => '', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', ); 87 87 88 88 $args = wp_parse_args( $args, $defaults ); 89 89 $args = apply_filters( 'wp_get_nav_menu_args', $args ); 90 90 $args = (object) $args; 91 91 92 92 // Variable setup 93 93 $nav_menu = ''; 94 94 $items = ''; 95 95 96 96 // Get the menu object 97 97 $menu = wp_get_nav_menu_object( $args->menu ); 98 98 99 99 // If the menu exists, get it's items. 100 100 if ( $menu && !is_wp_error($menu) ) 101 101 $menu_items = wp_get_nav_menu_items( $menu->term_id, $args->context ); 102 102 103 103 // If no menu was found or if the menu has no items, call the fallback_cb 104 104 if ( !$menu || is_wp_error($menu) || ( isset($menu_items) && empty($menu_items) ) ) { … … 108 108 } 109 109 } 110 110 111 111 // Set up the $menu_item variables 112 112 foreach ( (array) $menu_items as $key => $menu_item ) 113 113 $menu_items[$menu_item->menu_order] = wp_setup_nav_menu_item( $menu_item, 'frontend' ); 114 114 115 115 $items .= walk_nav_menu_tree( $menu_items, $args->depth, $args ); 116 116 117 117 // CSS class 118 118 $ul_class = $args->menu_class ? ' class="'. $args->menu_class .'"' : ''; 119 119 $nav_menu .= '<ul'. $ul_class .'>'; 120 120 121 121 // Allow plugins to hook into the menu to add their own <li>'s 122 122 if ( 'frontend' == $args->context ) { … … 127 127 $nav_menu .= $items; 128 128 } 129 129 130 130 $nav_menu .= '</ul>'; 131 131 132 132 return apply_filters( 'wp_get_nav_menu', $nav_menu ); 133 133 } … … 151 151 $attributes .= ( isset($menu_item->xfn) && '' != $menu_item->xfn ) ? ' rel="'. esc_attr($menu_item->xfn) .'"' : ''; 152 152 $attributes .= ( isset($menu_item->url) && '' != $menu_item->url ) ? ' href="'. esc_attr($menu_item->url) .'"' : ''; 153 153 154 154 $output .= esc_html( $args->before ); 155 155 $output .= '<a'. $attributes .'>'; … … 157 157 $output .= '</a>'; 158 158 $output .= esc_html( $args->after ); 159 159 160 160 break; 161 161 162 162 case 'backend': 163 163 $output .= '<dl><dt>'; … … 165 165 $output .= '<span class="item-controls">'; 166 166 $output .= '<span class="item-type">'. esc_html( $menu_item->append ) .'</span>'; 167 167 168 168 // Actions 169 169 $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> | '; 170 170 $output .= '<a class="item-delete" id="delete-'. esc_attr( $menu_item->ID ) .'" value="'. esc_attr( $menu_item->ID ) .'">'. __('Delete') .'</a>'; 171 171 172 172 $output .= '</span></dt></dl>'; 173 173 174 174 // Menu Item Settings 175 175 $output .= '<input type="hidden" name="menu-item-db-id[]" value="'. esc_attr( $menu_item->ID ) .'" />'; … … 187 187 $output .= '<input type="hidden" name="menu-item-target[]" value="'. esc_attr( $menu_item->target ) .'" />'; 188 188 break; 189 189 190 190 case 'custom': 191 191 case 'taxonomy': 192 192 case 'post_type': 193 193 $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>'; 194 194 195 195 // Menu item hidden fields 196 196 $output .= '<input type="hidden" class="menu-item-db-id" value="0" />'; … … 210 210 break; 211 211 } 212 212 213 213 return $output; 214 214 } -
trunk/wp-includes/nav-menu.php
r13802 r13830 78 78 79 79 $result = get_term( $menu['term_id'], 'nav_menu' ); 80 80 81 81 if ( $result && !is_wp_error($result) ) { 82 82 do_action( 'wp_create_nav_menu', $menu['term_id'] ); … … 106 106 } 107 107 } 108 108 109 109 $result = wp_delete_term( $menu->term_id, 'nav_menu' ); 110 110 111 111 if ( $result && !is_wp_error($result) ) { 112 112 do_action( 'wp_delete_nav_menu', $menu->term_id ); … … 178 178 $walker = ( empty($r->walker) ) ? new Walker_Nav_Menu : $r->walker; 179 179 $args = array( $items, $depth, $r ); 180 180 181 181 return call_user_func_array(array(&$walker, 'walk'), $args); 182 182 } … … 199 199 $menu_item->object = get_post_meta( $menu_item->ID, '_menu_item_object', true ); 200 200 $menu_item->type = get_post_meta( $menu_item->ID, '_menu_item_type', true ); 201 201 202 202 if ( 'post_type' == $menu_item->type ) { 203 203 $object = get_post_type_object( $menu_item->object ); 204 204 $menu_item->append = $object->singular_label; 205 205 206 206 } elseif ( 'taxonomy' == $menu_item->type ) { 207 207 $object = get_taxonomy( $menu_item->object ); 208 208 $menu_item->append = $object->singular_label; 209 209 210 210 } else { 211 211 $menu_item->append = __('Custom'); 212 212 } 213 213 214 214 $menu_item->title = $menu_item->post_title; 215 215 $menu_item->url = get_post_meta( $menu_item->ID, '_menu_item_url', true ); … … 219 219 $menu_item->description = strip_tags( $menu_item->post_content ); 220 220 221 $menu_item->classes = get_post_meta( $menu_item->ID, '_menu_item_classes', true ); ;221 $menu_item->classes = get_post_meta( $menu_item->ID, '_menu_item_classes', true ); 222 222 $menu_item->xfn = get_post_meta( $menu_item->ID, '_menu_item_xfn', true ); 223 223 break; … … 278 278 $menu_item->xfn = ''; 279 279 break; 280 } 280 } 281 281 return $menu_item; 282 282 } -
trunk/wp-includes/pomo/mo.php
r13316 r13830 194 194 * Build a Translation_Entry from original string and translation strings, 195 195 * found in a MO file 196 * 196 * 197 197 * @static 198 198 * @param string $original original string to translate from MO file. Might contain -
trunk/wp-includes/pomo/po.php
r13316 r13830 110 110 /** 111 111 * Gives back the original string from a PO-formatted string 112 * 112 * 113 113 * @static 114 114 * @param string $string PO-formatted string … … 140 140 141 141 /** 142 * Inserts $with in the beginning of every new line of $string and 142 * Inserts $with in the beginning of every new line of $string and 143 143 * returns the modified string 144 144 * … … 255 255 } 256 256 // add comment 257 $this->add_comment_to_entry($entry, $line); ;257 $this->add_comment_to_entry($entry, $line); 258 258 } elseif (preg_match('/^msgctxt\s+(".*")/', $line, $m)) { 259 259 if ($is_final($context)) { -
trunk/wp-includes/pomo/translations.php
r13316 r13830 153 153 * Adds parantheses to the inner parts of ternary operators in 154 154 * plural expressions, because PHP evaluates ternary oerators from left to right 155 * 155 * 156 156 * @param string $expression the expression without parentheses 157 157 * @return string the expression with parentheses added -
trunk/wp-includes/query.php
r13787 r13830 1716 1716 $q[ $q['post_type'] ] = str_replace('%2F', '/', urlencode(urldecode($q[ $q['post_type'] ]))); 1717 1717 $post_type_object = get_post_type_object($q['post_type']); 1718 if ( ! $post_type_object->hierarchical || strpos($q[ $q['post_type'] ], '/') === false) { 1718 if ( ! $post_type_object->hierarchical || strpos($q[ $q['post_type'] ], '/') === false) { 1719 1719 $q['name'] = $q[ $q['post_type'] ] = sanitize_title($q[ $q['post_type'] ]); 1720 $where .= " AND $wpdb->posts.post_name = '" . $q[ $q['post_type'] ] . "'"; 1720 $where .= " AND $wpdb->posts.post_name = '" . $q[ $q['post_type'] ] . "'"; 1721 1721 } else { 1722 1722 // Hierarchical post type, need to look deeper to see if its an attachment or this post_type
Note: See TracChangeset
for help on using the changeset viewer.