Changeset 16438
- Timestamp:
- 11/17/2010 06:47:34 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r16388 r16438 724 724 require_once ABSPATH . 'wp-admin/includes/nav-menu.php'; 725 725 726 // For performance reasons, we omit some object properties from the checklist. 726 // For performance reasons, we omit some object properties from the checklist. 727 727 // The following is a hacky way to restore them when adding non-custom items. 728 728 … … 730 730 foreach ( (array) $_POST['menu-item'] as $menu_item_data ) { 731 731 if ( 732 ! empty( $menu_item_data['menu-item-type'] ) && 732 ! empty( $menu_item_data['menu-item-type'] ) && 733 733 'custom' != $menu_item_data['menu-item-type'] && 734 734 ! empty( $menu_item_data['menu-item-object-id'] ) … … 740 740 741 741 case 'taxonomy' : 742 $_object = get_term( $menu_item_data['menu-item-object-id'], $menu_item_data['menu-item-object'] ); 742 $_object = get_term( $menu_item_data['menu-item-object-id'], $menu_item_data['menu-item-object'] ); 743 743 break; 744 744 } 745 745 746 $_menu_items = array_map( 'wp_setup_nav_menu_item', array( $_object ) ); 746 $_menu_items = array_map( 'wp_setup_nav_menu_item', array( $_object ) ); 747 747 $_menu_item = array_shift( $_menu_items ); 748 748 … … 750 750 $menu_item_data['menu-item-description'] = $_menu_item->description; 751 751 } 752 752 753 753 $menu_items_data[] = $menu_item_data; 754 } 754 } 755 755 756 756 $item_ids = wp_save_nav_menu_items( 0, $menu_items_data ); … … 1078 1078 1079 1079 wp_link_ajax( $_POST ); 1080 1080 1081 1081 exit; 1082 1082 break; -
trunk/wp-admin/css/colors-classic.dev.css
r16418 r16438 1127 1127 .folded #adminmenu li.wp-has-current-submenu, 1128 1128 .folded #adminmenu li.menu-top.current { 1129 background: #e0e0e0 url(../images/menu-bits-vs.gif?ver=20101102) top left repeat-x; 1130 border: #5589aa 1px solid; 1129 background: #e0e0e0 url(../images/menu-bits-vs.gif?ver=20101102) top left repeat-x; 1130 border: #5589aa 1px solid; 1131 1131 color: #464646; 1132 1132 } -
trunk/wp-admin/edit-comments.php
r16333 r16438 11 11 if ( !current_user_can('edit_posts') ) 12 12 wp_die(__('Cheatin’ uh?')); 13 13 14 14 $wp_list_table = get_list_table('WP_Comments_List_Table'); 15 15 $wp_list_table->check_permissions(); -
trunk/wp-admin/edit-tags.php
r16362 r16438 12 12 if ( !current_user_can( $tax->cap->manage_terms ) ) 13 13 wp_die( __( 'Cheatin’ uh?' ) ); 14 14 15 15 $wp_list_table = get_list_table('WP_Terms_List_Table'); 16 16 $wp_list_table->check_permissions(); -
trunk/wp-admin/includes/class-wp-media-list-table.php
r16229 r16438 99 99 if ( $this->detached ) { 100 100 submit_button( __( 'Scan for lost attachments' ), 'secondary', 'find_detached', false ); 101 } elseif ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) { 101 } elseif ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) { 102 102 submit_button( __( 'Empty Trash' ), 'button-secondary apply', 'delete_all', false ); 103 103 } ?> -
trunk/wp-admin/includes/class-wp-ms-sites-list-table.php
r16329 r16438 195 195 196 196 $blogname = ( is_subdomain_install() ) ? str_replace( '.'.$current_site->domain, '', $blog['domain'] ) : $blog['path']; 197 197 198 198 list( $columns, $hidden ) = $this->get_column_info(); 199 199 -
trunk/wp-admin/includes/class-wp-ms-themes-list-table.php
r16361 r16438 8 8 */ 9 9 class WP_MS_Themes_List_Table extends WP_List_Table { 10 10 11 11 var $site_id; 12 12 var $is_site_themes; … … 35 35 ) ); 36 36 } 37 37 38 38 function check_permissions() { 39 39 if ( is_multisite() ) { … … 46 46 } 47 47 48 if ( $this->is_site_themes && !current_user_can('manage_sites') ) 49 wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) ); 50 else if ( !$this->is_site_themes && !current_user_can('manage_network_themes') ) 48 if ( $this->is_site_themes && !current_user_can('manage_sites') ) 49 wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) ); 50 else if ( !$this->is_site_themes && !current_user_can('manage_network_themes') ) 51 51 wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) ); 52 52 } … … 65 65 ); 66 66 67 $site_allowed_themes = get_site_allowed_themes(); 67 $site_allowed_themes = get_site_allowed_themes(); 68 68 if ( !$this->is_site_themes ) { 69 69 $allowed_themes = $site_allowed_themes; … … 73 73 $themes_per_page = $this->get_items_per_page( 'site_themes_network_per_page' ); 74 74 } 75 75 76 76 $current = get_site_transient( 'update_themes' ); 77 77 … … 90 90 $themes['upgrade'][$key] = $themes['all'][$key]; 91 91 92 if ( $this->is_site_themes && isset( $site_allowed_themes[$theme_key] ) ) { 93 unset( $themes['all'][$key] ); 94 unset( $themes['enabled'][$key] ); 95 unset( $themes['disabled'][$key] ); 92 if ( $this->is_site_themes && isset( $site_allowed_themes[$theme_key] ) ) { 93 unset( $themes['all'][$key] ); 94 unset( $themes['enabled'][$key] ); 95 unset( $themes['disabled'][$key] ); 96 96 } 97 97 } … … 132 132 ) ); 133 133 } 134 134 135 135 function _search_callback( $theme ) { 136 136 static $term; … … 212 212 } 213 213 214 if ( $this->is_site_themes ) 215 $url = 'site-themes.php?id=' . $this->site_id; 216 else 214 if ( $this->is_site_themes ) 215 $url = 'site-themes.php?id=' . $this->site_id; 216 else 217 217 $url = 'themes.php'; 218 218 … … 237 237 if ( current_user_can( 'update_themes' ) ) 238 238 $actions['update-selected'] = __( 'Update' ); 239 239 240 240 return $actions; 241 241 } … … 333 333 334 334 echo "</div></td>"; 335 break; 335 break; 336 336 break; 337 337 default: -
trunk/wp-admin/includes/class-wp-plugins-list-table.php
r16372 r16438 258 258 259 259 if ( 'active' != $status ) { 260 $action = $screen->is_network ? 'network-activate-selected' : 'activate-selected'; 260 $action = $screen->is_network ? 'network-activate-selected' : 'activate-selected'; 261 261 $actions[ $action ] = __( 'Activate' ); 262 262 } … … 433 433 if ( ! empty( $plugin_data['PluginURI'] ) ) 434 434 $plugin_meta[] = '<a href="' . $plugin_data['PluginURI'] . '" title="' . __( 'Visit plugin site' ) . '">' . __( 'Visit plugin site' ) . '</a>'; 435 435 436 436 $plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status ); 437 437 echo implode( ' | ', $plugin_meta ); -
trunk/wp-admin/includes/class-wp-posts-list-table.php
r16376 r16438 667 667 default: 668 668 ?> 669 <td <?php echo $attributes ?>><?php 669 <td <?php echo $attributes ?>><?php 670 670 if ( 'page' == $post->post_type ) 671 671 do_action( 'manage_pages_custom_column', $column_name, $post->ID ); -
trunk/wp-admin/includes/dashboard.php
r16431 r16438 150 150 $widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( "$url#$widget_id" ) . '" class="edit-box open-box">' . __( 'Configure' ) . '</a></span>'; 151 151 } 152 152 153 153 if ( is_blog_admin () ) 154 154 $side_widgets = array('dashboard_quick_press', 'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary'); … … 422 422 $user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) ); 423 423 $blog_text = sprintf( _n( '%s site', '%s sites', $c_blogs ), number_format_i18n( $c_blogs ) ); 424 424 425 425 $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text ); 426 426 -
trunk/wp-admin/includes/file.php
r16366 r16438 97 97 * @since 1.5.0 98 98 * 99 * @uses get_home_path 99 * @uses get_home_path 100 100 * @uses WP_CONTENT_DIR full filesystem path to the wp-content directory 101 101 * @param string $file filesystem path relative to the WordPress install directory or to the wp-content directory … … 255 255 * @uses wp_upload_dir 256 256 * @uses wp_unique_filename 257 * @uses delete_transient 257 * @uses delete_transient 258 258 * @param array $file Reference to a single element of $_FILES. Call the function once for each uploaded file. 259 259 * @param array $overrides Optional. An associative array of names=>values to override default variables with extract( $overrides, EXTR_OVERWRITE ). -
trunk/wp-admin/includes/list-table.php
r16175 r16438 18 18 function get_list_table( $class ) { 19 19 $class = apply_filters( "get_list_table_$class", $class ); 20 20 21 21 require_list_table( $class ); 22 22 -
trunk/wp-admin/includes/media.php
r16431 r16438 1120 1120 1121 1121 $post = get_post( $attachment_id ); 1122 1122 1123 1123 $default_args = array( 'errors' => null, 'send' => $post->post_parent ? post_type_supports( get_post_type( $post->post_parent ), 'editor' ) : true, 'delete' => true, 'toggle' => true, 'show_title' => true ); 1124 1124 $args = wp_parse_args( $args, $default_args ); -
trunk/wp-admin/includes/meta-boxes.php
r16431 r16438 156 156 $post_formats = get_theme_support( 'post-formats' ); 157 157 158 if ( is_array( $post_formats[0] ) ) : 158 if ( is_array( $post_formats[0] ) ) : 159 159 $post_format = get_post_format( $post->ID ); 160 160 if ( !$post_format ) -
trunk/wp-admin/includes/plugin.php
r16313 r16438 486 486 * @param string $plugin Plugin path to main plugin file with plugin data. 487 487 * @param string $redirect Optional. URL to redirect to. 488 * @param bool $network_wide Whether to enable the plugin for all sites in the 488 * @param bool $network_wide Whether to enable the plugin for all sites in the 489 489 * network or just the current site. Multisite only. Default is false. 490 490 * @param bool $silent Prevent calling activation hooks. Optional, default is false. -
trunk/wp-admin/includes/template.php
r16431 r16438 2120 2120 endswitch; 2121 2121 $text = ( NULL == $text ) ? __( 'Save Changes' ) : $text; 2122 2122 2123 2123 $attributes = ''; 2124 2124 if ( is_array( $other_attributes ) ) { … … 2129 2129 $attributes = $other_attributes; 2130 2130 } 2131 2131 2132 2132 // Default the id attribute to $name unless an id was specifically provided in $other_attributes 2133 2133 $id = $name; 2134 2134 if ( is_array( $other_attributes ) && isset( $other_attributes['id'] ) ) 2135 2135 $id = $other_attributes['id']; 2136 2136 2137 2137 $button = '<input type="submit" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" class="' . esc_attr( $class ); 2138 2138 $button .= '" value="' . esc_attr( $text ) . '" ' . $attributes . ' />'; 2139 2139 2140 2140 if ( $wrap ) { 2141 2141 $button = '<p class="submit">' . $button . '</p>'; 2142 2142 } 2143 2143 2144 2144 return $button; 2145 2145 } -
trunk/wp-admin/js/list-table.dev.js
r16433 r16438 70 70 data[key] = ''; 71 71 else 72 data[key] = value; 72 data[key] = value; 73 73 }); 74 74 -
trunk/wp-admin/media.php
r16326 r16438 67 67 wp_enqueue_script('image-edit'); 68 68 wp_enqueue_style('imgareaselect'); 69 69 70 70 add_contextual_help( $current_screen, 71 71 '<p>' . __('This screen allows you to edit five fields for metadata in a file within the media library.') . '</p>' . -
trunk/wp-admin/widgets.php
r16326 r16438 312 312 <?php 313 313 } else { 314 submit_button( __( 'Delete' ), 'button alignleft', 'removewidget', false ); 314 submit_button( __( 'Delete' ), 'button alignleft', 'removewidget', false ); 315 315 } 316 316 submit_button( __( 'Save Widget' ), 'button-primary alignright', 'savewidget', false ); ?> -
trunk/wp-includes/admin-bar.php
r16310 r16438 5 5 * This code handles the building and rendering of the press bar. 6 6 */ 7 7 8 8 /** 9 9 * Instantiate the admin bar object and set it up as a global for access elsewhere. … … 23 23 /* Instantiate the admin bar */ 24 24 $admin_bar_class = apply_filters( 'wp_admin_bar_class', 'WP_Admin_Bar' ); 25 if ( class_exists( $admin_bar_class ) ) 25 if ( class_exists( $admin_bar_class ) ) 26 26 $wp_admin_bar = new $admin_bar_class; 27 27 else 28 28 return false; 29 29 30 30 $wp_admin_bar->initialize(); 31 31 $wp_admin_bar->add_menus(); … … 61 61 62 62 do_action( 'wp_after_admin_bar_render' ); 63 63 64 64 $wp_admin_bar->unload_user_locale_translations(); 65 65 } … … 88 88 89 89 $user_id = get_current_user_id(); 90 90 91 91 if ( 0 != $user_id ) { 92 92 /* Add the 'My Account' menu */ 93 93 $wp_admin_bar->add_menu( array( 'id' => 'my-account', 'title' => $user_identity, 'href' => get_edit_profile_url( $user_id ) ) ); 94 94 95 95 /* Add the "My Account" sub menus */ 96 96 $wp_admin_bar->add_menu( array( 'parent' => 'my-account', 'title' => __( 'Edit My Profile' ), 'href' => get_edit_profile_url( $user_id ) ) ); … … 158 158 /** 159 159 * Provide a shortlink. 160 * 160 * 161 161 * @since 3.1.0 162 162 */ … … 172 172 /** 173 173 * Provide an edit link for posts and terms. 174 * 174 * 175 175 * @since 3.1.0 176 176 */ … … 198 198 if ( $ptype_obj->show_in_menu !== true || ! current_user_can( $ptype_obj->cap->edit_posts ) ) 199 199 continue; 200 200 201 201 $actions["post-new.php?post_type=$ptype"] = array( $ptype_obj->labels->singular_name, $ptype_obj->cap->edit_posts, "new-$ptype" ); 202 202 } … … 260 260 $wordpress_update_count = 1; 261 261 */ 262 262 263 263 $update_count = $plugin_update_count + $theme_update_count + $wordpress_update_count; 264 264 … … 298 298 ?> 299 299 <style type="text/css"> 300 <?php 301 302 if ( 303 ( empty( $_GET['nobump'] ) || is_admin() ) && 304 ! strpos( $_SERVER['REQUEST_URI'], 'media-upload.php' ) 305 ) : 300 <?php 301 302 if ( 303 ( empty( $_GET['nobump'] ) || is_admin() ) && 304 ! strpos( $_SERVER['REQUEST_URI'], 'media-upload.php' ) 305 ) : 306 306 ?> 307 307 body { padding-top: 28px !important; } 308 <?php 309 endif; 308 <?php 309 endif; 310 310 311 311 if ( in_array( get_current_theme(), array('H3', 'H4', 'The Journalist v1.9') ) ) : … … 329 329 function is_admin_bar_showing() { 330 330 global $show_admin_bar; 331 331 332 332 /* For all these types of request we never want an admin bar period */ 333 333 if ( defined('XMLRPC_REQUEST') || defined('APP_REQUEST') || defined('DOING_AJAX') || defined('IFRAME_REQUEST') ) 334 334 return false; 335 335 336 336 if ( ! isset( $show_admin_bar ) || null === $show_admin_bar ) { 337 337 if ( ! is_user_logged_in() || ( is_admin() && ! is_multisite() ) ) { -
trunk/wp-includes/class-wp-admin-bar.php
r16309 r16438 14 14 15 15 /* Set the protocol used throughout this code */ 16 if ( is_ssl() ) 16 if ( is_ssl() ) 17 17 $this->proto = 'https://'; 18 18 … … 98 98 <div id="adminbarsearch-wrap"> 99 99 <form action="<?php echo home_url(); ?>" method="get" id="adminbarsearch"> 100 <input class="adminbar-input" name="s" id="adminbar-search" type="text" title="<?php esc_attr_e( 'Search' ); ?>" value="" maxlength="150" /> 100 <input class="adminbar-input" name="s" id="adminbar-search" type="text" title="<?php esc_attr_e( 'Search' ); ?>" value="" maxlength="150" /> 101 101 <button type="submit" class="adminbar-button"><span><?php _e('Search'); ?></span></button> 102 102 </form> … … 113 113 <?php $menuclass = ( ! empty( $menu_item['children'] ) ) ? 'menupop ' : ''; ?> 114 114 115 <li class="<?php echo $menuclass . "ab-$id" ?><?php 116 if ( ! empty( $menu_item['meta']['class'] ) ) : 115 <li class="<?php echo $menuclass . "ab-$id" ?><?php 116 if ( ! empty( $menu_item['meta']['class'] ) ) : 117 117 echo ' ' . $menu_item['meta']['class']; 118 endif; 118 endif; 119 119 ?>"> 120 <a href="<?php echo strip_tags( $menu_item['href'] ) ?>"<?php 120 <a href="<?php echo strip_tags( $menu_item['href'] ) ?>"<?php 121 121 if ( ! empty( $menu_item['meta']['onclick'] ) ) : 122 ?> onclick="<?php echo $menu_item['meta']['onclick']; ?>"<?php 122 ?> onclick="<?php echo $menu_item['meta']['onclick']; ?>"<?php 123 123 endif; 124 124 if ( ! empty( $menu_item['meta']['target'] ) ) : 125 ?> target="<?php echo $menu_item['meta']['target']; ?>"<?php 126 endif; 127 128 ?>><?php 129 130 if ( ! empty( $menuclass ) ) : 131 ?><span><?php 132 endif; 133 125 ?> target="<?php echo $menu_item['meta']['target']; ?>"<?php 126 endif; 127 128 ?>><?php 129 130 if ( ! empty( $menuclass ) ) : 131 ?><span><?php 132 endif; 133 134 134 echo $menu_item['title']; 135 136 if ( ! empty( $menuclass ) ) : 137 ?></span><?php 138 endif; 139 135 136 if ( ! empty( $menuclass ) ) : 137 ?></span><?php 138 endif; 139 140 140 ?></a> 141 141 … … 165 165 $this->add_node( $parent_id, $menu->{$id}['children'], $child ); 166 166 } 167 167 168 168 $child = null; 169 169 … … 205 205 function load_user_locale_translations() { 206 206 $this->need_to_change_locale = ( get_locale() != $this->user->locale ); 207 if ( ! $this->need_to_change_locale ) 207 if ( ! $this->need_to_change_locale ) 208 208 return; 209 209 /* … … 219 219 function unload_user_locale_translations() { 220 220 global $l10n; 221 if ( ! $this->changed_locale ) 221 if ( ! $this->changed_locale ) 222 222 return; 223 223 /* -
trunk/wp-includes/class-wp-http-ixr-client.php
r16149 r16438 24 24 } 25 25 } else { 26 $this->scheme = 'http'; 26 $this->scheme = 'http'; 27 27 $this->server = $server; 28 28 $this->path = $path; … … 46 46 'body' => $xml, 47 47 ); 48 48 49 49 // Merge Custom headers ala #8145 50 50 foreach ( $this->headers as $header => $value ) 51 51 $args['headers'][$header] = $value; 52 52 53 53 if ( $this->timeout !== false ) 54 54 $args['timeout'] = $this->timeout; 55 55 56 56 // Now send the request 57 57 if ($this->debug) { … … 59 59 } 60 60 61 $response = wp_remote_post($url, $args); 61 $response = wp_remote_post($url, $args); 62 62 63 if ( is_wp_error($response) ) { 64 $errno = $response->get_error_code(); 65 $errorstr = $response->get_error_message(); 66 $this->error = new IXR_Error(-32300, "transport error: $errno $errstr"); 63 if ( is_wp_error($response) ) { 64 $errno = $response->get_error_code(); 65 $errorstr = $response->get_error_message(); 66 $this->error = new IXR_Error(-32300, "transport error: $errno $errstr"); 67 67 return false; 68 68 } 69 70 $code = $response['response']['code']; 71 if ( $code != 200 ) { 69 70 $code = $response['response']['code']; 71 if ( $code != 200 ) { 72 72 $this->error = new IXR_Error(-32301, "transport error - HTTP status code was not 200 ($code)"); return false; 73 73 } -
trunk/wp-includes/class-wp-xmlrpc-server.php
r16331 r16438 1489 1489 * @since 3.1.0 1490 1490 * 1491 * @param array $args Method parameters. Contains: 1491 * @param array $args Method parameters. Contains: 1492 1492 * - blog_id 1493 1493 * - username 1494 1494 * - password 1495 1495 * - attachment_id 1496 * @return array. Assocciative array containing: 1496 * @return array. Assocciative array containing: 1497 1497 * - 'date_created_gmt' 1498 1498 * - 'parent' … … 1546 1546 /** 1547 1547 * Retrieves a collection of media library items (or attachments) 1548 * 1549 * Besides the common blog_id, username, and password arguments, it takes a filter 1548 * 1549 * Besides the common blog_id, username, and password arguments, it takes a filter 1550 1550 * array as last argument. 1551 * 1551 * 1552 1552 * Accepted 'filter' keys are 'parent_id', 'mime_type', 'offset', and 'number'. 1553 * 1553 * 1554 1554 * The defaults are as follows: 1555 1555 * - 'number' - Default is 5. Total number of media items to retrieve. … … 1557 1557 * - 'parent_id' - Default is ''. The post where the media item is attached. Empty string shows all media items. 0 shows unattached media items. 1558 1558 * - 'mime_type' - Default is ''. Filter by mime type (e.g., 'image/jpeg', 'application/pdf') 1559 * 1559 * 1560 1560 * @since 3.1.0 1561 1561 * … … 1588 1588 $offset = ( isset($struct['offset']) ) ? absint($struct['offset']) : 0 ; 1589 1589 $number = ( isset($struct['number']) ) ? absint($struct['number']) : -1 ; 1590 1590 1591 1591 $attachments = get_posts( array('post_type' => 'attachment', 'post_parent' => $parent_id, 'offset' => $offset, 'numberposts' => $number, 'post_mime_type' => $mime_type ) ); 1592 1592 $num_attachments = count($attachments); -
trunk/wp-includes/class.wp-scripts.php
r16282 r16438 186 186 if ( 0 === strpos( $src, '/wp-includes/js/l10n' ) ) 187 187 return false; 188 188 189 189 foreach ( (array) $this->default_dirs as $test ) { 190 190 if ( 0 === strpos($src, $test) ) -
trunk/wp-includes/comment.php
r16365 r16438 1765 1765 include_once(ABSPATH . WPINC . '/class-IXR.php'); 1766 1766 include_once(ABSPATH . WPINC . '/class-wp-http-ixr-client.php'); 1767 1767 1768 1768 // original code by Mort (http://mort.mine.nu:8080) 1769 1769 $post_links = array(); -
trunk/wp-includes/formatting.php
r16431 r16438 224 224 /** 225 225 * Newline preservation help function for wpautop 226 * 226 * 227 227 * @since 3.1.0 228 228 * @access private … … 738 738 * 739 739 * Removes tags, octets, entities, and if strict is enabled, will only keep 740 * alphanumeric, _, space, ., -, @. After sanitizing, it passes the username, 740 * alphanumeric, _, space, ., -, @. After sanitizing, it passes the username, 741 741 * raw username (the username in the parameter), and the value of $strict as 742 742 * parameters for the 'sanitize_user' filter. … … 1575 1575 /** 1576 1576 * Helper function to convert hex encoded chars to ascii 1577 * 1577 * 1578 1578 * @since 3.1.0 1579 1579 * @access private 1580 1580 * @param $match the preg_replace_callback matches array 1581 1581 */ 1582 function _wp_iso_convert( $match ) { 1583 return chr( hexdec( strtolower( $match[1] ) ) ); 1584 } 1582 function _wp_iso_convert( $match ) { 1583 return chr( hexdec( strtolower( $match[1] ) ) ); 1584 } 1585 1585 1586 1586 /** -
trunk/wp-includes/functions.php
r16392 r16438 120 120 } 121 121 $timezone_formats = array( 'P', 'I', 'O', 'T', 'Z', 'e' ); 122 $timezone_formats_re = implode( '|', $timezone_formats ); 122 $timezone_formats_re = implode( '|', $timezone_formats ); 123 123 if ( preg_match( "/$timezone_formats_re/", $dateformatstring ) && wp_timezone_supported() ) { 124 124 $timezone_string = get_option( 'timezone_string' ); … … 133 133 $dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 ); 134 134 } 135 } 135 } 136 136 } 137 } 137 } 138 138 $j = @$datefunc( $dateformatstring, $i ); 139 139 // allow plugins to redo this entirely for languages with untypical grammars … … 1185 1185 function do_enclose( $content, $post_ID ) { 1186 1186 global $wpdb; 1187 1187 1188 1188 //TODO: Tidy this ghetto code up and make the debug code optional 1189 1189 include_once( ABSPATH . WPINC . '/class-IXR.php' ); -
trunk/wp-includes/l10n.php
r16075 r16438 290 290 /** 291 291 * Translate the result of _n_noop() or _nx_noop() 292 * 292 * 293 293 * @since 3.1 294 294 * @param array $nooped_plural array with singular, plural and context keys, usually the result of _n_noop() or _nx_noop() -
trunk/wp-includes/ms-admin-bar.php
r16098 r16438 13 13 /* Get the settings we need for the current site */ 14 14 $matureaction = $current_blog->mature ? 'unmatureblog' : 'matureblog'; 15 $maturetext_confirm = $current_blog->mature ? 16 sprintf( 15 $maturetext_confirm = $current_blog->mature ? 16 sprintf( 17 17 esc_attr__( 'Are you sure you want to unmark %s as mature?' ), 18 18 $current_blog->domain 19 ) : 19 ) : 20 20 sprintf( 21 21 esc_attr__( 'Are you sure you want to mark %s as mature?' ), … … 25 25 $suspendaction = $current_blog->spam ? 'unspamblog' : 'spamblog'; 26 26 $suspendtext_confirm = $current_blog->spam ? 27 sprintf( 27 sprintf( 28 28 esc_attr__( 'Are you sure you want to unsuspend site %s?' ), 29 29 $current_blog->domain 30 ) : 30 ) : 31 31 sprintf( 32 32 esc_attr__( 'Are you sure you want to suspend site %s?' ), 33 33 $current_blog->domain 34 34 ); 35 35 36 36 $mature_url = network_admin_url( "edit.php?action=confirm&action2={$matureaction}&id={$current_blog->blog_id}&msg=" . urlencode( $maturetext_confirm ) ); 37 37 $suspend_url = network_admin_url( "edit.php?action=confirm&action2={$suspendaction}&id={$current_blog->blog_id}&msg=" . urlencode( $suspendtext_confirm ) ); -
trunk/wp-includes/ms-functions.php
r16299 r16438 1375 1375 function add_existing_user_to_blog( $details = false ) { 1376 1376 global $blog_id; 1377 1377 1378 1378 if ( is_array( $details ) ) { 1379 1379 $result = add_user_to_blog( $blog_id, $details[ 'user_id' ], $details[ 'role' ] ); -
trunk/wp-includes/post-template.php
r16432 r16438 231 231 /** 232 232 * Preview fix for javascript bug with foreign languages 233 * 233 * 234 234 * @since 3.1.0 235 235 * @access private … … 238 238 */ 239 239 function _convert_urlencoded_to_entities( $match ) { 240 return '&#' . base_convert( $match[1], 16, 10 ) . ';'; 240 return '&#' . base_convert( $match[1], 16, 10 ) . ';'; 241 241 } 242 242 … … 328 328 $classes[] = 'type-' . $post->post_type; 329 329 $classes[] = 'status-' . $post->post_status; 330 330 331 331 // Post Format 332 332 $post_format = get_post_format( $post->ID ); … … 340 340 if ( post_password_required($post->ID) ) 341 341 $classes[] = 'post-password-required'; 342 342 343 343 // sticky for Sticky Posts 344 344 if ( is_sticky($post->ID) && is_home() && !is_paged() ) … … 429 429 $classes[] = 'single-' . sanitize_html_class($post->post_type, $post_id); 430 430 $classes[] = 'postid-' . $post_id; 431 431 432 432 // Post Format 433 433 $post_format = get_post_format( $post->ID ); -
trunk/wp-includes/post.php
r16431 r16438 2274 2274 $args = array( 'numberposts' => absint( $args ) ); 2275 2275 } 2276 2276 2277 2277 // Set default arguments 2278 2278 $defaults = array( … … 3138 3138 $curpage = $page; 3139 3139 while ( $curpage->post_parent != 0 ) { 3140 $post_parent = $curpage->post_parent; 3141 $curpage = wp_cache_get( $post_parent, 'posts' ); 3142 if ( false === $curpage ) 3140 $post_parent = $curpage->post_parent; 3141 $curpage = wp_cache_get( $post_parent, 'posts' ); 3142 if ( false === $curpage ) 3143 3143 $curpage = $wpdb->get_row( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE ID = %d and post_type = %s", $post_parent, $post_type ) ); 3144 3144 $path = '/' . $curpage->post_name . $path; … … 5242 5242 * @since 3.1.0 5243 5243 * 5244 * @return array The array of translations 5244 * @return array The array of translations 5245 5245 */ 5246 5246 function get_post_format_strings() { … … 5261 5261 /** 5262 5262 * Returns a pretty, translated version of a post format slug 5263 * 5263 * 5264 5264 * @since 3.1.0 5265 5265 * -
trunk/wp-includes/query.php
r16414 r16438 46 46 /** 47 47 * Retrieve ID of the current queried object. Wrapper for $wp_query->get_queried_object_id() 48 * 48 * 49 49 * @uses WP_Query::get_queried_object_id() 50 50 * -
trunk/wp-includes/script-loader.php
r16436 r16438 62 62 $scripts->add( 'l10n', "/wp-includes/js/l10n$suffix.js", false, '20101110' ); 63 63 $scripts->enqueue( 'l10n' ); 64 64 65 65 $scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20101110' ); 66 66 … … 261 261 262 262 $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter' ), '20100925' ); 263 $scripts->add_data( 'user-profile', 'group', 1 ); 263 $scripts->add_data( 'user-profile', 'group', 1 ); 264 264 265 265 $scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", false, '20101117'); 266 $scripts->add_data( 'admin-bar', 'group', 1 ); 266 $scripts->add_data( 'admin-bar', 'group', 1 ); 267 267 $scripts->localize( 'admin-bar', 'adminBarL10n', array( 268 268 'url' => __( 'URL:' ), 269 269 'noShortlink' => __( 'No shortlink available for this page.' ), 270 270 ) ); 271 271 272 272 if ( is_admin() ) { 273 273 $scripts->add( 'ajaxcat', "/wp-admin/js/cat$suffix.js", array( 'wp-lists' ), '20090102' ); … … 502 502 $styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' ); 503 503 $styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20100907' ); 504 504 505 505 // Admin bar 506 506 $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20101117' ); -
trunk/wp-includes/taxonomy.php
r16423 r16438 591 591 // NOT IN is very slow for some reason 592 592 $where .= " AND $primary_table.$primary_id_column IN ( 593 SELECT object_id 594 FROM $wpdb->term_relationships 595 WHERE term_taxonomy_id $operator ($terms) 596 )"; 593 SELECT object_id 594 FROM $wpdb->term_relationships 595 WHERE term_taxonomy_id $operator ($terms) 596 )"; 597 597 } 598 598 } … … 1180 1180 $$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : ''; 1181 1181 1182 $query = "SELECT $fields FROM $wpdb->terms AS t $join WHERE $where $orderby $order $limits"; 1182 $query = "SELECT $fields FROM $wpdb->terms AS t $join WHERE $where $orderby $order $limits"; 1183 1183 1184 1184 $fields = $_fields;
Note: See TracChangeset
for help on using the changeset viewer.