Changeset 14924
- Timestamp:
- 05/26/2010 02:42:15 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/colors-fresh.dev.css
r14918 r14924 1072 1072 #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, 1073 1073 #adminmenu li.current a.menu-top { 1074 background: #aaa url(../images/menu-bits.gif) top left repeat-x; 1074 background: #aaa url(../images/menu-bits.gif) top left repeat-x; 1075 1075 border: #aaa 1px solid; 1076 1076 color: #000; -
trunk/wp-admin/css/install.dev.css
r14847 r14924 208 208 border: 1px solid #e6db55; 209 209 padding: 0.3em 0.6em; 210 margin: 5px 0 15px; 210 margin: 5px 0 15px; 211 211 background-color: #ffffe0; 212 212 } -
trunk/wp-admin/css/nav-menu-rtl.dev.css
r14481 r14924 89 89 #side-sortables .potential-menu-item ul { 90 90 margin-right: 0; 91 91 92 92 } 93 93 -
trunk/wp-admin/css/nav-menu.dev.css
r14917 r14924 214 214 215 215 .meta-sep, 216 .submitdelete, 216 .submitdelete, 217 217 .submitcancel { 218 218 display:block; … … 240 240 } 241 241 242 .button-controls { 242 .button-controls { 243 243 clear:both; 244 244 margin: 10px 0; … … 281 281 } 282 282 283 .menu ul { 283 .menu ul { 284 284 width: 100%; 285 285 } … … 526 526 /* Clearfix */ 527 527 #menu-item-name-wrap:after, 528 #menu-item-url-wrap:after, 528 #menu-item-url-wrap:after, 529 529 #menu-name-label:after, 530 530 #menu-settings-column .inside:after, 531 #nav-menus-frame:after, 531 #nav-menus-frame:after, 532 532 #post-body-content:after, 533 .button-controls:after, 533 .button-controls:after, 534 534 .major-publishing-actions:after, 535 535 .menu-item-settings:after { 536 clear: both; 536 clear: both; 537 537 content: "."; 538 538 display: block; 539 height: 0; 539 height: 0; 540 540 visibility: hidden; 541 541 } -
trunk/wp-admin/css/wp-admin.dev.css
r14907 r14924 1176 1176 position: absolute; 1177 1177 font-family: Helvetica, Arial, sans-serif; 1178 font-size: 9px; 1178 font-size: 9px; 1179 1179 line-height: 17px; 1180 1180 font-weight: bold; 1181 margin-top: 1px; 1182 margin-left: 7px; 1183 -moz-border-radius: 10px; 1184 -khtml-border-radius: 10px; 1185 -webkit-border-radius: 10px; 1181 margin-top: 1px; 1182 margin-left: 7px; 1183 -moz-border-radius: 10px; 1184 -khtml-border-radius: 10px; 1185 -webkit-border-radius: 10px; 1186 1186 border-radius: 10px; 1187 1187 } -
trunk/wp-admin/custom-header.php
r14907 r14924 119 119 wp_enqueue_style('imgareaselect'); 120 120 } 121 121 122 122 /** 123 123 * Check if header text is allowed … … 273 273 jQuery('#name').css('color', old_color); 274 274 jQuery('#desc').css('color', old_color); 275 pickColor(old_color); 275 pickColor(old_color); 276 276 } else { 277 277 //Hide text … … 372 372 maxHeight: <?php echo HEADER_IMAGE_HEIGHT; ?>, 373 373 maxWidth: <?php echo HEADER_IMAGE_WIDTH; ?>, 374 onInit: function () { 374 onInit: function () { 375 375 jQuery('#width').val(xinit); 376 376 jQuery('#height').val(yinit); -
trunk/wp-admin/export.php
r14794 r14924 49 49 foreach ( $monthyears as $k => $monthyear ) 50 50 $monthyears[$k]->lmonth = $wp_locale->get_month( $monthyear->month, 2 ); 51 for( $s = 0, $e = count( $monthyears ) - 1; $e >= 0; $s++, $e-- ) { 51 for( $s = 0, $e = count( $monthyears ) - 1; $e >= 0; $s++, $e-- ) { 52 52 $dateoptions .= "\t<option value=\"" . $monthyears[$s]->year . '-' . zeroise( $monthyears[$s]->month, 2 ) . '">' . $monthyears[$s]->lmonth . ' ' . $monthyears[$s]->year . "</option>\n"; 53 53 $edateoptions .= "\t<option value=\"" . $monthyears[$e]->eyear . '-' . zeroise( $monthyears[$e]->emonth, 2 ) . '">' . $monthyears[$e]->lmonth . ' ' . $monthyears[$e]->year . "</option>\n"; -
trunk/wp-admin/includes/class-wp-upgrader.php
r14920 r14924 1267 1267 1268 1268 if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) 1269 $install_actions['network_activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&networkwide=1&plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin for all sites in this network') . '" target="_parent">' . __('Network Activate') . '</a>'; 1269 $install_actions['network_activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&networkwide=1&plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin for all sites in this network') . '" target="_parent">' . __('Network Activate') . '</a>'; 1270 1270 1271 1271 if ( $this->type == 'web' ) -
trunk/wp-admin/includes/export.php
r14705 r14924 26 26 function export_wp( $args = array() ) { 27 27 global $wpdb, $post_ids, $post, $wp_taxonomies; 28 28 29 29 if ( ! is_array( $args ) ) 30 30 $args = array( 'author' => $args ); 31 31 32 32 $defaults = array( 'author' => null, 'taxonomy' => null, 'post_type' => null, 'post_status' => null, 'start_date' => null, 'end_date' => null ); 33 33 $args = wp_parse_args( $args, $defaults ); 34 34 35 35 extract($args); 36 36 37 37 do_action('export_wp'); 38 38 39 39 if( strlen( $start_date ) > 4 && strlen( $end_date ) > 4 ) 40 40 $filename = 'wordpress.' . $start_date . '.' . $end_date . '.xml'; 41 41 else 42 42 $filename = 'wordpress.' . date( 'Y-m-d' ) . '.xml'; 43 43 44 44 header( 'Content-Description: File Transfer' ); 45 45 header( 'Content-Disposition: attachment; filename=' . $filename ); 46 46 header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true ); 47 47 48 48 if ( $post_type && $post_type != 'all' ) 49 49 $where = $wpdb->prepare("WHERE post_type = %s ", $post_type); 50 50 else 51 51 $where = "WHERE post_type != 'revision' "; 52 52 53 53 if ( $author && $author != 'all' ) { 54 54 $author_id = (int) $author; 55 55 $where .= $wpdb->prepare( "AND post_author = %d ", $author_id ); 56 56 } 57 57 58 58 if ( $start_date && $start_date != 'all' ) 59 59 $where .= $wpdb->prepare( "AND post_date >= %s ", $start_date ); 60 60 61 61 if ( $end_date && $end_date != 'all' ) 62 62 $where .= $wpdb->prepare( "AND post_date < %s ", $end_date ); 63 63 64 64 if ( $taxonomy && is_array( $taxonomy ) ) { 65 65 foreach ( $taxonomy as $term_id ) { … … 68 68 } 69 69 } 70 70 71 71 if ( $post_status && $post_status != 'all' ) 72 72 $where .= $wpdb->prepare( "AND post_status = %s", $status ); 73 73 74 74 // grab a snapshot of post IDs, just in case it changes during the export 75 75 $post_ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts $where ORDER BY post_date_gmt ASC" ); 76 76 77 77 $categories = (array) get_categories( array( 'get' => 'all' ) ); 78 78 $tags = (array) get_tags( array( 'get' => 'all' ) ); 79 79 80 80 $custom_taxonomies = $wp_taxonomies; 81 81 unset( $custom_taxonomies['category'] ); … … 84 84 $custom_taxonomies = array_keys( $custom_taxonomies ); 85 85 $terms = (array) get_terms( $custom_taxonomies, array( 'get' => 'all' ) ); 86 86 87 87 /** 88 88 * {@internal Missing Short Description}} … … 95 95 if ( ! is_array( $categories ) || empty( $categories ) ) 96 96 return array(); 97 97 98 98 foreach ( $categories as $category ){ 99 99 $parents[$category->term_id] = $category->parent; 100 100 } 101 101 102 102 $parents = array_unique( array_diff( $parents, array_keys( $parents ) ) ); 103 103 104 104 if ( $zero = array_search( '0', $parents ) ) 105 105 unset( $parents[$zero] ); 106 106 107 107 return $parents; 108 108 } 109 109 110 110 while ( $parents = wxr_missing_parents( $categories ) ) { 111 111 $found_parents = get_categories( array( 'include' => join( ', ', $parents) ) ); … … 115 115 break; 116 116 } 117 117 118 118 // Put them in order to be inserted with no child going before its parent 119 119 $pass = 0; … … 126 126 } 127 127 unset( $categories ); 128 128 129 129 /** 130 130 * Place string in CDATA tag. … … 137 137 if ( seems_utf8( $str ) == false ) 138 138 $str = utf8_encode( $str ); 139 139 140 140 // $str = ent2ncr(esc_html($str)); 141 141 $str = "<![CDATA[$str" . ( ( substr( $str, -1 ) == ']' ) ? ' ' : '') . "]]>"; 142 142 143 143 return $str; 144 144 } 145 145 146 146 /** 147 147 * {@internal Missing Short Description}} … … 153 153 function wxr_site_url() { 154 154 global $current_site; 155 155 156 156 // mu: the base url 157 157 if ( isset( $current_site->domain ) ) … … 161 161 return get_bloginfo_rss( 'url' ); 162 162 } 163 163 164 164 /** 165 165 * {@internal Missing Short Description}} … … 172 172 if ( empty( $c->name ) ) 173 173 return; 174 174 175 175 echo '<wp:cat_name>' . wxr_cdata( $c->name ) . '</wp:cat_name>'; 176 176 } 177 177 178 178 /** 179 179 * {@internal Missing Short Description}} … … 186 186 if ( empty( $c->description ) ) 187 187 return; 188 188 189 189 echo '<wp:category_description>' . wxr_cdata($c->description) . '</wp:category_description>'; 190 190 } 191 191 192 192 /** 193 193 * {@internal Missing Short Description}} … … 200 200 if ( empty( $t->name ) ) 201 201 return; 202 202 203 203 echo '<wp:tag_name>' . wxr_cdata($t->name) . '</wp:tag_name>'; 204 204 } 205 205 206 206 /** 207 207 * {@internal Missing Short Description}} … … 214 214 if ( empty( $t->description ) ) 215 215 return; 216 216 217 217 echo '<wp:tag_description>' . wxr_cdata($t->description) . '</wp:tag_description>'; 218 218 } 219 219 220 220 /** 221 221 * {@internal Missing Short Description}} … … 228 228 if ( empty( $t->name ) ) 229 229 return; 230 230 231 231 echo '<wp:term_name>' . wxr_cdata($t->name) . '</wp:term_name>'; 232 232 } 233 233 234 234 /** 235 235 * {@internal Missing Short Description}} … … 242 242 if ( empty( $t->description ) ) 243 243 return; 244 244 245 245 echo '<wp:term_description>' . wxr_cdata($t->description) . '</wp:term_description>'; 246 246 } 247 247 248 248 /** 249 249 * {@internal Missing Short Description}} … … 253 253 function wxr_post_taxonomy() { 254 254 global $post; 255 255 256 256 $the_list = ''; 257 257 $filter = 'rss'; 258 258 259 259 $taxonomies = get_object_taxonomies( 'post' ); 260 260 $terms = wp_get_post_terms( $post->ID, $taxonomies ); … … 272 272 echo $the_list; 273 273 } 274 274 275 275 echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?' . ">\n"; 276 276 277 277 ?> 278 278 <!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your blog. --> … … 320 320 <wp:term><wp:term_taxonomy><?php echo $t->taxonomy; ?></wp:term_taxonomy><wp:term_slug><?php echo $t->slug; ?></wp:term_slug><wp:term_parent><?php echo $t->parent ? $custom_taxonomies[$t->parent]->name : ''; ?></wp:term_parent><?php wxr_term_name( $t ); ?><?php wxr_term_description( $t ); ?></wp:term> 321 321 <?php endforeach; endif; ?> 322 322 323 323 <?php do_action( 'rss2_head' ); ?> 324 324 … … 326 326 global $wp_query; 327 327 $wp_query->in_the_loop = true; // Fake being in the loop. 328 328 329 329 // fetch 20 posts at a time rather than loading the entire table into memory 330 330 while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) { 331 331 $where = "WHERE ID IN (" . join( ',', $next_posts ) . ")"; 332 332 $posts = $wpdb->get_results( "SELECT * FROM $wpdb->posts $where ORDER BY post_date_gmt ASC" ); 333 333 334 334 // Begin Loop 335 335 foreach ($posts as $post) { … … 347 347 <dc:creator><?php echo wxr_cdata( get_the_author() ); ?></dc:creator> 348 348 <?php wxr_post_taxonomy() ?> 349 349 350 350 <guid isPermaLink="false"><?php the_guid(); ?></guid> 351 351 <description></description> … … 398 398 <?php } } ?> 399 399 </item> 400 <?php 401 } 400 <?php 401 } 402 402 } 403 403 } ?> -
trunk/wp-admin/includes/file.php
r14811 r14924 604 604 $needed_dirs = array_unique($needed_dirs); 605 605 foreach ( $needed_dirs as $dir ) { 606 // Check the parent folders of the folders all exist within the creation array. 606 // Check the parent folders of the folders all exist within the creation array. 607 607 if ( untrailingslashit($to) == $dir ) // Skip over the working directory, We know this exists (or will exist) 608 608 continue; … … 683 683 $needed_dirs = array_unique($needed_dirs); 684 684 foreach ( $needed_dirs as $dir ) { 685 // Check the parent folders of the folders all exist within the creation array. 685 // Check the parent folders of the folders all exist within the creation array. 686 686 if ( untrailingslashit($to) == $dir ) // Skip over the working directory, We know this exists (or will exist) 687 687 continue; -
trunk/wp-admin/includes/nav-menu.php
r14917 r14924 681 681 function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) { 682 682 $taxonomy_name = $taxonomy['args']->name; 683 683 684 684 // paginate browsing for large numbers of objects 685 685 $per_page = 50; … … 967 967 $result .= __('Select menu items (pages, categories, links) from the boxes at left to begin building your custom menu.'); 968 968 $result .= '</div>'; 969 969 970 970 if( empty($menu_items) ) 971 971 return $result; -
trunk/wp-admin/includes/post.php
r14765 r14924 316 316 if ( isset( $tax_input[$tax_name]) && current_user_can( $taxonomy_obj->cap->assign_terms ) ) 317 317 $new_terms = $tax_input[$tax_name]; 318 else 318 else 319 319 $new_terms = array(); 320 320 321 321 if ( $taxonomy_obj->hierarchical ) 322 322 $current_terms = (array) wp_get_object_terms( $post_ID, $tax_name, array('fields' => 'ids') ); … … 326 326 $post_data['tax_input'][$tax_name] = array_merge( $current_terms, $new_terms ); 327 327 } 328 328 329 329 if ( isset($new_cats) && in_array( 'category', $tax_names ) ) { 330 330 $cats = (array) wp_get_post_categories($post_ID); -
trunk/wp-admin/includes/schema.php
r14845 r14924 710 710 'global_terms_enabled' => global_terms_enabled() ? '1' : '0' 711 711 ); 712 if ( !intval( $subdomain_install ) ) 712 if ( !intval( $subdomain_install ) ) 713 713 $sitemeta['illegal_names'][] = 'blog'; 714 714 -
trunk/wp-admin/includes/template.php
r14904 r14924 2838 2838 $hidden = get_hidden_meta_boxes($page); 2839 2839 2840 printf('<div id="%s-sortables" class="meta-box-sortables">', htmlspecialchars($context)); 2840 printf('<div id="%s-sortables" class="meta-box-sortables">', htmlspecialchars($context)); 2841 2841 2842 2842 $i = 0; … … 3234 3234 function manage_columns_prefs( $page ) { 3235 3235 $columns = get_column_headers( $page ); 3236 $hidden = get_hidden_columns( $page ); 3236 $hidden = get_hidden_columns( $page ); 3237 3237 $special = array('_title', 'cb', 'comment', 'media', 'name', 'title', 'username'); 3238 3238 … … 3546 3546 /** 3547 3547 * Convert a screen string to a screen object 3548 * 3548 * 3549 3549 * @since 3.0.0 3550 * 3550 * 3551 3551 * @param string $screen The name of the screen 3552 3552 * @return object An object containing the safe screen name and id … … 3616 3616 3617 3617 if ( !empty( $screen_options ) ) { 3618 ?> 3618 ?> 3619 3619 <h5><?php _ex('Show on screen', 'Screen Options') ?></h5> 3620 3620 <?php 3621 3621 } 3622 3622 3623 3623 echo $screen_options; 3624 3624 echo $settings; ?> -
trunk/wp-admin/index-extra.php
r14815 r14924 33 33 wp_dashboard_plugins_output(); 34 34 break; 35 35 36 36 case 'dashboard_quick_press' : 37 37 wp_dashboard_quick_press_output(); -
trunk/wp-admin/js/nav-menu.dev.js
r14917 r14924 148 148 getItemData : function( itemType, id ) { 149 149 itemType = itemType || 'menu-item'; 150 150 151 151 var itemData = {}, i, 152 152 fields = [ … … 165 165 'menu-item-xfn' 166 166 ]; 167 167 168 168 if( !id && itemType == 'menu-item' ) { 169 169 id = this.find('.menu-item-data-db-id').val(); 170 170 } 171 171 172 172 if( !id ) return itemData; 173 173 174 174 this.find('input').each(function() { 175 175 var field; … … 180 180 else if( itemType == 'add-menu-item' ) 181 181 field = 'menu-item[' + id + '][' + fields[i] + ']'; 182 182 183 183 if ( 184 184 this.name && … … 189 189 } 190 190 }); 191 191 192 192 return itemData; 193 193 }, 194 194 setItemData : function( itemData, itemType, id ) { // Can take a type, such as 'menu-item', or an id. 195 195 itemType = itemType || 'menu-item'; 196 196 197 197 if( !id && itemType == 'menu-item' ) { 198 198 id = $('.menu-item-data-db-id', this).val(); 199 199 } 200 200 201 201 if( !id ) return this; 202 202 203 203 this.find('input').each(function() { 204 204 var t = $(this), field; … … 208 208 else if( itemType == 'add-menu-item' ) 209 209 field = 'menu-item[' + id + '][' + attr + ']'; 210 210 211 211 if ( field == t.attr('name') ) { 212 212 t.val( val ); -
trunk/wp-admin/nav-menus.php
r14888 r14924 84 84 85 85 // get next in order 86 if ( 86 if ( 87 87 isset( $orders_to_dbids[$dbids_to_orders[$menu_item_id] + 1] ) 88 88 ) { … … 91 91 92 92 // if not siblings of same parent, bubble menu item up but keep order 93 if ( 93 if ( 94 94 ! empty( $menu_item_data['menu_item_parent'] ) && 95 95 ( … … 100 100 101 101 $parent_db_id = in_array( $menu_item_data['menu_item_parent'], $orders_to_dbids ) ? (int) $menu_item_data['menu_item_parent'] : 0; 102 102 103 103 $parent_object = wp_setup_nav_menu_item( get_post( $parent_db_id ) ); 104 104 105 105 if ( ! is_wp_error( $parent_object ) ) { 106 106 $parent_data = (array) $parent_object; 107 $menu_item_data['menu_item_parent'] = $parent_data['menu_item_parent']; 107 $menu_item_data['menu_item_parent'] = $parent_data['menu_item_parent']; 108 108 update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] ); 109 109 … … 115 115 $menu_item_data['menu_order'] = $menu_item_data['menu_order'] + 1; 116 116 117 $menu_item_data['menu_item_parent'] = $next_item_data['ID']; 117 $menu_item_data['menu_item_parent'] = $next_item_data['ID']; 118 118 update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] ); 119 119 120 120 wp_update_post($menu_item_data); 121 121 wp_update_post($next_item_data); 122 122 } 123 123 124 124 125 125 // the item is last but still has a parent, so bubble up 126 } elseif ( 126 } elseif ( 127 127 ! empty( $menu_item_data['menu_item_parent'] ) && 128 128 in_array( $menu_item_data['menu_item_parent'], $orders_to_dbids ) … … 175 175 176 176 // if there is something before the parent and parent a child of it, make menu item a child also of it 177 if ( 178 ! empty( $dbids_to_orders[$parent_db_id] ) && 177 if ( 178 ! empty( $dbids_to_orders[$parent_db_id] ) && 179 179 ! empty( $orders_to_dbids[$dbids_to_orders[$parent_db_id] - 1] ) && 180 180 ! empty( $parent_data['menu_item_parent'] ) … … 183 183 184 184 // else if there is something before parent and parent not a child of it, make menu item a child of that something's parent 185 } elseif ( 186 ! empty( $dbids_to_orders[$parent_db_id] ) && 185 } elseif ( 186 ! empty( $dbids_to_orders[$parent_db_id] ) && 187 187 ! empty( $orders_to_dbids[$dbids_to_orders[$parent_db_id] - 1] ) 188 188 ) { … … 211 211 212 212 // else this menu item is not a child of the previous 213 } elseif ( 213 } elseif ( 214 214 empty( $menu_item_data['menu_order'] ) || 215 215 empty( $menu_item_data['menu_item_parent'] ) || 216 216 ! in_array( $menu_item_data['menu_item_parent'], array_keys( $dbids_to_orders ) ) || 217 217 empty( $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] ) || 218 $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] != $menu_item_data['menu_item_parent'] 218 $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] != $menu_item_data['menu_item_parent'] 219 219 ) { 220 220 // just make it a child of the previous; keep the order … … 534 534 else 535 535 $auto_add = false; 536 } 536 } 537 537 ?> 538 538 <div class="auto-add-pages"> -
trunk/wp-admin/network.php
r14914 r14924 226 226 // Uh oh: 227 227 if ( !allow_subdirectory_install() ) 228 echo ' <strong>' . __( 'Warning!' ) . ' ' . __( 'The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.' ) . '</strong>'; 228 echo ' <strong>' . __( 'Warning!' ) . ' ' . __( 'The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.' ) . '</strong>'; 229 229 ?></td> 230 230 </tr> … … 349 349 </li> 350 350 <?php 351 if (iis7_supports_permalinks()) { 351 if (iis7_supports_permalinks()) { 352 352 if (is_subdomain_install()) { 353 $web_config_file = 353 $web_config_file = 354 354 '<?xml version="1.0" encoding="UTF-8"?> 355 355 <configuration> … … 382 382 </configuration>'; 383 383 } else { 384 $web_config_file = 384 $web_config_file = 385 385 '<?xml version="1.0" encoding="UTF-8"?> 386 386 <configuration> … … 439 439 # uploaded files 440 440 RewriteRule ^' . ( $subdomain_install ? '' : '([_0-9a-zA-Z-]+/)?' ) . 'files/(.+) wp-includes/ms-files.php?file=$' . ( $subdomain_install ? 1 : 2 ) . ' [L]' . "\n"; 441 441 442 442 if ( ! $subdomain_install ) 443 443 $htaccess_file .= "\n# add a trailing slash to /wp-admin\n" . 'RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]' . "\n"; 444 444 445 445 $htaccess_file .= "\n" . 'RewriteCond %{REQUEST_FILENAME} -f [OR] 446 446 RewriteCond %{REQUEST_FILENAME} -d 447 447 RewriteRule ^ - [L]'; 448 448 449 449 // @todo custom content dir. 450 450 if ( ! $subdomain_install ) 451 451 $htaccess_file .= "\nRewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]\nRewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]"; 452 452 453 453 $htaccess_file .= "\nRewriteRule . index.php [L]"; 454 454 455 455 ?> 456 456 <li><p><?php printf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), ABSPATH ); ?></p> 457 <textarea class="code" readonly="readonly" cols="100" rows="<?php echo $subdomain_install ? 11 : 16; ?>"><?php 458 echo wp_htmledit_pre( $htaccess_file ); 457 <textarea class="code" readonly="readonly" cols="100" rows="<?php echo $subdomain_install ? 11 : 16; ?>"><?php 458 echo wp_htmledit_pre( $htaccess_file ); 459 459 ?> 460 460 </textarea></li> -
trunk/wp-admin/upload.php
r14908 r14924 22 22 23 23 $lost = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent > '0' and post_parent NOT IN ( SELECT ID FROM $wpdb->posts WHERE post_type NOT IN ('attachment', '" . join("', '", get_post_types( array( 'public' => false ) ) ) . "') )"); 24 24 25 25 $_GET['detached'] = 1; 26 26 … … 169 169 '<p>' . __('Hovering over a row reveals action links: <em>Edit</em>, <em>Delete Permanently</em>, and <em>View</em>. Clicking <em>Edit</em> or on the media file’s name displays a simple screen to edit that individual file’s metadata. Clicking <em>Delete Permanently</em> will delete the file from the media library (as well as from any posts to which it is currently attached). <em>View</em> will take you to the display page for that file. ') . '</p>' . 170 170 '<p>' . __('If a media file has not been attached to any post, you will see that in the <em>Attached To</em> column, and can click on <em>Attach File</em> to launch a small popup that will allow you to search for a post and attach the file.') . '</p>' . 171 '<p>' . __('For more information:<br /> 171 '<p>' . __('For more information:<br /> 172 172 <a href="http://codex.wordpress.org/Media_Library_SubPanel">Media Library Documentation</a> <br /> 173 173 <a href="http://wordpress.org/support/">Support Forums</a>') . '</p>' -
trunk/wp-includes/default-constants.php
r14485 r14924 287 287 * Slug of the default theme for this install. 288 288 * Used as the default theme when installing new sites. 289 * Will be used as the fallback if the current theme doesn't exist. 289 * Will be used as the fallback if the current theme doesn't exist. 290 290 * @since 3.0.0 291 291 */ -
trunk/wp-includes/default-widgets.php
r14849 r14924 625 625 function widget( $args, $instance ) { 626 626 global $comments, $comment; 627 627 628 628 $cache = wp_cache_get('widget_recent_comments', 'widget'); 629 629 630 630 if ( ! is_array( $cache ) ) 631 631 $cache = array(); 632 632 633 633 if ( isset( $cache[$args['widget_id']] ) ) { 634 634 echo $cache[$args['widget_id']]; … … 647 647 $comments = get_comments( array( 'number' => $number, 'status' => 'approve' ) ); 648 648 $output .= $before_widget; 649 if ( $title ) 649 if ( $title ) 650 650 $output .= $before_title . $title . $after_title; 651 651 652 652 $output .= '<ul id="recentcomments">'; 653 if ( $comments ) { 653 if ( $comments ) { 654 654 foreach ( (array) $comments as $comment) { 655 655 $output .= '<li class="recentcomments">' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '<a href="' . esc_url( get_comment_link($comment->comment_ID) ) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>'; -
trunk/wp-includes/l10n.php
r14647 r14924 193 193 /** 194 194 * Displays translated string with gettext context 195 * 195 * 196 196 * @see _x 197 197 * @since 3.0.0 … … 507 507 */ 508 508 function get_available_languages( $dir = null ) { 509 $languages = array(); 510 509 $languages = array(); 510 511 511 foreach( (array)glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) { 512 512 if ( false === strpos( $lang_file, 'continents-cities' ) ) { … … 514 514 } 515 515 } 516 516 517 517 return $languages; 518 518 } -
trunk/wp-includes/link-template.php
r14901 r14924 587 587 function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) { 588 588 global $wp_rewrite; 589 589 590 590 $term_id = ( int ) $term_id; 591 591 592 592 $term = get_term( $term_id, $taxonomy ); 593 593 594 594 if ( empty( $term ) || is_wp_error( $term ) ) 595 595 return false; … … 602 602 if ( '' == $permalink_structure ) { 603 603 if ( 'category' == $taxonomy ) { 604 $link = home_url("?feed=$feed&cat=$term_id"); 604 $link = home_url("?feed=$feed&cat=$term_id"); 605 605 } 606 606 elseif ( 'post_tag' == $taxonomy ) { 607 $link = home_url("?feed=$feed&tag=$term->slug"); 607 $link = home_url("?feed=$feed&tag=$term->slug"); 608 608 } else { 609 609 $t = get_taxonomy( $taxonomy ); … … 626 626 else 627 627 $link = apply_filters( 'taxonomy_feed_link', $link, $feed, $taxonomy ); 628 628 629 629 630 630 return $link; … … 2186 2186 } elseif ( 'post' == $context ) { 2187 2187 $post = get_post($id); 2188 $post_id = $post->ID; 2188 $post_id = $post->ID; 2189 2189 } 2190 2190 -
trunk/wp-includes/ms-default-constants.php
r14452 r14924 106 106 static $error = null; 107 107 static $error_warn = false; 108 108 109 109 if ( false === $error ) 110 110 return; … … 131 131 $error = true; 132 132 define( 'SUBDOMAIN_INSTALL', 'yes' == VHOST ); 133 } else { 133 } else { 134 134 define( 'SUBDOMAIN_INSTALL', false ); 135 135 define( 'VHOST', 'no' ); -
trunk/wp-includes/nav-menu-template.php
r14923 r14924 258 258 foreach ( (array) $menu_items as $key => $menu_item ) 259 259 $sorted_menu_items[$menu_item->menu_order] = $menu_item; 260 260 261 261 unset($menu_items); 262 262 … … 308 308 $possible_object_parents = array(); 309 309 $home_page_id = (int) get_option( 'page_for_posts' ); 310 310 311 311 if ( $wp_query->is_singular && ! empty( $queried_object->post_type ) && ! is_post_type_hierarchical( $queried_object->post_type ) ) { 312 312 foreach ( (array) get_object_taxonomies( $queried_object->post_type ) as $taxonomy ) { … … 329 329 $active_parent_item_ids[] = (int) $menu_item->db_id; 330 330 $active_object = $queried_object->post_type; 331 331 332 332 // if the menu item corresponds to the currently-queried post or taxonomy object 333 333 } elseif ( 334 334 $menu_item->object_id == $queried_object_id && 335 ( 335 ( 336 336 ( ! empty( $home_page_id ) && 'post_type' == $menu_item->type && $wp_query->is_home && $home_page_id = $menu_item->object_id ) || 337 337 ( 'post_type' == $menu_item->type && $wp_query->is_singular ) || 338 ( 'taxonomy' == $menu_item->type && ( $wp_query->is_category || $wp_query->is_tag || $wp_query->is_tax ) ) 339 ) 338 ( 'taxonomy' == $menu_item->type && ( $wp_query->is_category || $wp_query->is_tag || $wp_query->is_tax ) ) 339 ) 340 340 ) { 341 341 $menu_items[$key]->classes = trim( $menu_item->classes . ' ' . 'current-menu-item' ); … … 364 364 // set parent's class 365 365 foreach ( (array) $menu_items as $key => $parent_item ) { 366 if ( 367 isset( $parent_item->type ) && 368 'post_type' == $parent_item->type && 366 if ( 367 isset( $parent_item->type ) && 368 'post_type' == $parent_item->type && 369 369 ! empty( $queried_object->post_type ) && 370 is_post_type_hierarchical( $queried_object->post_type ) && 370 is_post_type_hierarchical( $queried_object->post_type ) && 371 371 in_array( $parent_item->object_id, $queried_object->ancestors ) 372 372 ) -
trunk/wp-includes/nav-menu.php
r14878 r14924 764 764 'menu-item-type' => 'post_type', 765 765 ); 766 766 767 767 foreach ( $auto_add as $menu_id ) { 768 768 $items = (array) wp_get_nav_menu_items( $menu_id ); -
trunk/wp-includes/pluggable.php
r14803 r14924 106 106 if ( ! is_numeric( $user_id ) ) 107 107 return false; 108 108 109 109 $user_id = absint( $user_id ); 110 110 if ( ! $user_id ) 111 111 return false; 112 112 113 113 $user = wp_cache_get( $user_id, 'users' ); 114 114 -
trunk/wp-includes/plugin.php
r14691 r14924 744 744 $function = (array) $function; 745 745 } 746 746 747 747 if (is_object($function[0]) ) { 748 748 // Object Class Calling -
trunk/wp-includes/post.php
r14903 r14924 784 784 * - taxonomies - An array of taxonomy identifiers that will be registered for the post type. Default is no taxonomies. Taxonomies can be registered later with register_taxonomy() or register_taxonomy_for_object_type(). 785 785 * - labels - An array of labels for this post type. You can see accepted values in {@link get_post_type_labels()}. By default post labels are used for non-hierarchical types and page labels for hierarchical ones. 786 * - permalink_epmask - The default rewrite endpoint bitmasks. 786 * - permalink_epmask - The default rewrite endpoint bitmasks. 787 787 * - rewrite - false to prevent rewrite, or array('slug'=>$slug) to customize permastruct; default will use $taxonomy as slug. 788 788 * - query_var - false to prevent queries, or string to value of the query var to use for this post type 789 789 * - can_export - true allows this post type to be exported. 790 * - show_in_nav_menus - true makes this post type available for selection in navigation menus. 790 * - show_in_nav_menus - true makes this post type available for selection in navigation menus. 791 791 * - _builtin - true if this post type is a native or "built-in" post_type. THIS IS FOR INTERNAL USE ONLY! 792 * - _edit_link - URL segement to use for edit link of this post type. Set to 'post.php?post=%d'. THIS IS FOR INTERNAL USE ONLY! 792 * - _edit_link - URL segement to use for edit link of this post type. Set to 'post.php?post=%d'. THIS IS FOR INTERNAL USE ONLY! 793 793 * 794 794 * @since 2.9.0 … … 889 889 /** 890 890 * Builds an object with all post type capabilities out of a post type object 891 * 891 * 892 892 * Accepted keys of the capabilities array in the post type object: 893 893 * - edit_post - The meta capability that controls editing a particular object of this post type. Defaults to "edit_$capability_type" (edit_post). … … 898 898 * - read_private_posts - The capability that controls reading private posts. Defaults to "read_ . $capability_type . s" (read_private_posts). 899 899 * - delete_post - The meta capability that controls deleting a particular object of this post type. Defaults to "delete_$capability_type" (delete_post). 900 * 900 * 901 901 * @since 3.0.0 902 902 * @param object $args … … 919 919 /** 920 920 * Builds an object with all post type labels out of a post type object 921 * 921 * 922 922 * Accepted keys of the label array in the post type object: 923 923 * - name - general name for the post type, usually plural. The same and overriden by $post_type_object->label. Default is Posts/Pages … … 933 933 * - not_found_in_trash - Default is No posts found in Trash/No pages found in Trash 934 934 * - parent_item_colon - This string isn't used on non-hierarchical types. In hierarchical ones the default is Parent Page: 935 * 935 * 936 936 * Above, the first default value is for non-hierarchical post types (like posts) and the second one is for hierarchical post types (like pages.) 937 * 937 * 938 938 * @since 3.0.0 939 939 * @param object $post_type_object … … 959 959 /** 960 960 * Builds an object with custom-something object (post type, taxonomy) labels out of a custom-something object 961 * 961 * 962 962 * @access private 963 963 */ 964 964 function _get_custom_object_labels( $object, $nohier_vs_hier_defaults ) { 965 965 966 966 if ( isset( $object->label ) ) { 967 967 $object->labels['name'] = $object->label; 968 968 } 969 969 970 970 if ( !isset( $object->labels['singular_name'] ) && isset( $object->labels['name'] ) ) { 971 971 $object->labels['singular_name'] = $object->labels['name']; 972 972 } 973 973 974 974 $defaults = array_map( create_function( '$x', $object->hierarchical? 'return $x[1];' : 'return $x[0];' ), $nohier_vs_hier_defaults ); 975 975 $labels = array_merge( $defaults, $object->labels ); 976 return (object)$labels; 976 return (object)$labels; 977 977 } 978 978 -
trunk/wp-includes/query.php
r14887 r14924 1865 1865 } 1866 1866 } 1867 1867 1868 1868 // Allow plugins to contextually add/remove/modify the search section of the database query 1869 1869 $search = apply_filters_ref_array('posts_search', array( $search, &$this ) ); -
trunk/wp-includes/rewrite.php
r14885 r14924 1776 1776 '; 1777 1777 } 1778 1778 1779 1779 $rules .= ' 1780 1780 <rule name="wordpress" patternSyntax="Wildcard"> -
trunk/wp-includes/taxonomy.php
r14841 r14924 212 212 * 213 213 * Optional $args contents: 214 * 214 * 215 215 * label - Name of the taxonomy shown in the menu. Usually plural. If not set, labels['name'] will be used. 216 216 * … … 235 235 * show_tagcloud - false to prevent the taxonomy being listed in the Tag Cloud Widget; 236 236 * defaults to show_ui which defalts to public. 237 * 237 * 238 238 * labels - An array of labels for this taxonomy. You can see accepted values in {@link get_taxonomy_labels()}. By default tag labels are used for non-hierarchical types and category labels for hierarchical ones. 239 239 * … … 304 304 $args['labels'] = get_taxonomy_labels( (object) $args ); 305 305 $args['label'] = $args['labels']->name; 306 306 307 307 $wp_taxonomies[$taxonomy] = (object) $args; 308 308 … … 313 313 /** 314 314 * Builds an object with all taxonomy labels out of a taxonomy object 315 * 315 * 316 316 * Accepted keys of the label array in the taxonomy object: 317 317 * - name - general name for the taxonomy, usually plural. The same as and overriden by $tax->label. Default is Post Tags/Categories … … 326 326 * - add_new_item - Default is Add New Tag/Add New Category 327 327 * - new_item_name - Default is New Tag Name/New Category Name 328 * 328 * 329 329 * Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories.) 330 * 330 * 331 331 * @since 3.0.0 332 332 * @param object $tax Taxonomy object -
trunk/wp-includes/theme.php
r14858 r14924 1717 1717 /** 1718 1718 * Checks an attachment being deleted to see if it's a header or background image. 1719 * 1719 * 1720 1720 * If true it removes the theme modification which would be pointing at the deleted 1721 1721 * attachment … … 1729 1729 $header_image = get_header_image(); 1730 1730 $background_image = get_background_image(); 1731 1731 1732 1732 if ( $header_image && $header_image == $attachment_image ) 1733 1733 remove_theme_mod( 'header_image' ); -
trunk/wp-mail.php
r14518 r14924 37 37 $pop3 = new POP3(); 38 38 39 if ( !$pop3->connect( get_option('mailserver_url'), get_option('mailserver_port') ) || !$pop3->user( get_option('mailserver_login') ) ) 39 if ( !$pop3->connect( get_option('mailserver_url'), get_option('mailserver_port') ) || !$pop3->user( get_option('mailserver_login') ) ) 40 40 wp_die( esc_html( $pop3->ERROR ) ); 41 41 42 42 $count = $pop3->pass( get_option('mailserver_pass') ); 43 43 44 if( false === $count ) 44 if( false === $count ) 45 45 wp_die( esc_html( $pop3->ERROR ) ); 46 46 47 47 if( 0 === $count ) { 48 48 $pop3->quit();
Note: See TracChangeset
for help on using the changeset viewer.