Pinking shears.

git-svn-id: http://svn.automattic.com/wordpress/trunk@15843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-10-19 07:48:22 +00:00
parent 76e493c281
commit 5e1184aa57
34 changed files with 115 additions and 115 deletions

View File

@ -215,13 +215,13 @@ if ( isset($plugin_page) ) {
exit(); exit();
} else { } else {
do_action("load-$pagenow"); do_action("load-$pagenow");
// Backwards compatibility with old load-page-new.php, load-page.php, // Backwards compatibility with old load-page-new.php, load-page.php,
// and load-categories.php actions. // and load-categories.php actions.
if ( $typenow == 'page' ) { if ( $typenow == 'page' ) {
if ( $pagenow == 'post-new.php' ) if ( $pagenow == 'post-new.php' )
do_action( 'load-page-new.php' ); do_action( 'load-page-new.php' );
elseif ( $pagenow == 'post.php' ) elseif ( $pagenow == 'post.php' )
do_action( 'load-page.php' ); do_action( 'load-page.php' );
} elseif ( $taxnow == 'category' && $pagenow == 'edit-tags.php' ) { } elseif ( $taxnow == 'category' && $pagenow == 'edit-tags.php' ) {
do_action( 'load-categories.php' ); do_action( 'load-categories.php' );
} }

View File

@ -95,7 +95,7 @@ body {
#menu-management .menu-add-new abbr { #menu-management .menu-add-new abbr {
font-weight:bold; font-weight:bold;
} }
#nav-menu-footer { #nav-menu-footer {
border-width: 0 1px 1px 1px; border-width: 0 1px 1px 1px;
-moz-border-radius-bottomleft: 6px; -moz-border-radius-bottomleft: 6px;

View File

@ -558,8 +558,8 @@ class Custom_Image_Header {
</tbody> </tbody>
</table> </table>
<?php endif; <?php endif;
do_action( 'custom_header_options' ); do_action( 'custom_header_options' );
wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
@ -644,7 +644,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr( $id ); ?>" /> <input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr( $id ); ?>" />
<input type="hidden" name="oitar" id="oitar" value="<?php echo esc_attr( $oitar ); ?>" /> <input type="hidden" name="oitar" id="oitar" value="<?php echo esc_attr( $oitar ); ?>" />
<?php wp_nonce_field( 'custom-header-crop-image' ) ?> <?php wp_nonce_field( 'custom-header-crop-image' ) ?>
<?php submit_button( __( 'Crop and Publish' ) ); ?> <?php submit_button( __( 'Crop and Publish' ) ); ?>
</p> </p>
</form> </form>

View File

@ -120,7 +120,7 @@ function get_link_to_edit( $link_id ) {
} }
/** /**
* This function inserts/updates links into/in the database. * This function inserts/updates links into/in the database.
* *
* @since 2.0.0 * @since 2.0.0
* *
@ -221,7 +221,7 @@ function wp_insert_link( $linkdata, $wp_error = false ) {
* @since 2.1.0 * @since 2.1.0
* *
* @param int $link_id ID of link to update * @param int $link_id ID of link to update
* @param array $link_categories Array of categories to * @param array $link_categories Array of categories to
*/ */
function wp_set_link_cats( $link_id = 0, $link_categories = array() ) { function wp_set_link_cats( $link_id = 0, $link_categories = array() ) {
// If $link_categories isn't already an array, make it one: // If $link_categories isn't already an array, make it one:

View File

@ -85,7 +85,7 @@ class WP_Posts_Table extends WP_List_Table {
$total_items = $this->hierarchical_display ? $wp_query->post_count : $wp_query->found_posts; $total_items = $this->hierarchical_display ? $wp_query->post_count : $wp_query->found_posts;
$per_page = $this->get_items_per_page( 'edit_' . $post_type . '_per_page' ); $per_page = $this->get_items_per_page( 'edit_' . $post_type . '_per_page' );
$per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type ); $per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type );
if ( $this->hierarchical_display ) if ( $this->hierarchical_display )
$total_pages = ceil( $total_items / $per_page ); $total_pages = ceil( $total_items / $per_page );
@ -161,7 +161,7 @@ class WP_Posts_Table extends WP_List_Table {
$status_links[$status_name] = "<li><a href='edit.php?post_status=$status_name&amp;post_type=$post_type'$class>" . sprintf( _n( $status->label_count[0], $status->label_count[1], $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . '</a>'; $status_links[$status_name] = "<li><a href='edit.php?post_status=$status_name&amp;post_type=$post_type'$class>" . sprintf( _n( $status->label_count[0], $status->label_count[1], $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . '</a>';
} }
return $status_links; return $status_links;
} }
@ -735,11 +735,11 @@ class WP_Posts_Table extends WP_List_Table {
$authors_dropdown = ''; $authors_dropdown = '';
if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) : if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) :
$users_opt = array( $users_opt = array(
'name' => 'post_author', 'name' => 'post_author',
'class'=> 'authors', 'class'=> 'authors',
'multi' => 1, 'multi' => 1,
'echo' => 0 'echo' => 0
); );
if ( $bulk ) if ( $bulk )
$users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' ); $users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
@ -998,7 +998,7 @@ class WP_Media_Table extends WP_List_Table {
function check_permissions() { function check_permissions() {
if ( !current_user_can('upload_files') ) if ( !current_user_can('upload_files') )
wp_die( __( 'You do not have permission to upload files.' ) ); wp_die( __( 'You do not have permission to upload files.' ) );
} }
function prepare_items() { function prepare_items() {
global $lost, $wpdb, $wp_query, $post_mime_types, $avail_post_mime_types; global $lost, $wpdb, $wp_query, $post_mime_types, $avail_post_mime_types;
@ -1488,10 +1488,10 @@ class WP_Terms_Table extends WP_List_Table {
$args['order'] = trim( stripslashes( $_REQUEST['order'] ) ); $args['order'] = trim( stripslashes( $_REQUEST['order'] ) );
$this->callback_args = $args; $this->callback_args = $args;
$this->set_pagination_args( array( $this->set_pagination_args( array(
'total_items' => wp_count_terms( $taxonomy, compact( 'search' ) ), 'total_items' => wp_count_terms( $taxonomy, compact( 'search' ) ),
'per_page' => $tags_per_page, 'per_page' => $tags_per_page,
) ); ) );
} }
@ -1677,7 +1677,7 @@ class WP_Terms_Table extends WP_List_Table {
return $out; return $out;
} }
function column_description( $tag ) { function column_description( $tag ) {
return $tag->description; return $tag->description;
} }
@ -1711,7 +1711,7 @@ class WP_Terms_Table extends WP_List_Table {
function column_default( $tag, $column_name ) { function column_default( $tag, $column_name ) {
global $taxonomy; global $taxonomy;
return apply_filters( "manage_${taxonomy}_custom_column", '', $column_name, $tag->term_id ); return apply_filters( "manage_${taxonomy}_custom_column", '', $column_name, $tag->term_id );
$out .= "</td>"; $out .= "</td>";
} }
@ -1820,10 +1820,10 @@ class WP_Users_Table extends WP_List_Table {
$wp_user_search = new WP_User_Query( $args ); $wp_user_search = new WP_User_Query( $args );
$this->items = $wp_user_search->get_results(); $this->items = $wp_user_search->get_results();
$this->set_pagination_args( array( $this->set_pagination_args( array(
'total_items' => $wp_user_search->get_total(), 'total_items' => $wp_user_search->get_total(),
'per_page' => $users_per_page, 'per_page' => $users_per_page,
) ); ) );
} }
@ -1888,7 +1888,7 @@ class WP_Users_Table extends WP_List_Table {
</div> </div>
<?php <?php
} }
function current_action() { function current_action() {
if ( isset($_REQUEST['changeit']) && !empty($_REQUEST['new_role']) ) if ( isset($_REQUEST['changeit']) && !empty($_REQUEST['new_role']) )
return 'promote'; return 'promote';
@ -2563,7 +2563,7 @@ class WP_Links_Table extends WP_List_Table {
$args['order'] = $order; $args['order'] = $order;
$this->items = get_bookmarks( $args ); $this->items = get_bookmarks( $args );
} }
function no_items() { function no_items() {
_e( 'No links found.' ); _e( 'No links found.' );
@ -2724,7 +2724,7 @@ class WP_Sites_Table extends WP_List_Table {
) ); ) );
} }
function check_permissions() { function check_permissions() {
if ( ! current_user_can( 'manage_sites' ) ) if ( ! current_user_can( 'manage_sites' ) )
wp_die( __( 'You do not have permission to access this page.' ) ); wp_die( __( 'You do not have permission to access this page.' ) );
} }
@ -3014,7 +3014,7 @@ class WP_MS_Users_Table extends WP_List_Table {
function check_permissions() { function check_permissions() {
if ( !is_multisite() ) if ( !is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) ); wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can( 'manage_network_users' ) ) if ( ! current_user_can( 'manage_network_users' ) )
wp_die( __( 'You do not have permission to access this page.' ) ); wp_die( __( 'You do not have permission to access this page.' ) );
} }
@ -3045,10 +3045,10 @@ class WP_MS_Users_Table extends WP_List_Table {
$wp_user_search = new WP_User_Query( $args ); $wp_user_search = new WP_User_Query( $args );
$this->items = $wp_user_search->get_results(); $this->items = $wp_user_search->get_results();
$this->set_pagination_args( array( $this->set_pagination_args( array(
'total_items' => $wp_user_search->get_total(), 'total_items' => $wp_user_search->get_total(),
'per_page' => $users_per_page, 'per_page' => $users_per_page,
) ); ) );
} }
@ -3367,7 +3367,7 @@ class WP_Plugins_Table extends WP_List_Table {
} }
uasort( $this->items, '_order_plugins_callback' ); uasort( $this->items, '_order_plugins_callback' );
} }
$plugins_per_page = $this->get_items_per_page( 'plugins_per_page', 999 ); $plugins_per_page = $this->get_items_per_page( 'plugins_per_page', 999 );
$start = ( $page - 1 ) * $plugins_per_page; $start = ( $page - 1 ) * $plugins_per_page;
@ -3416,7 +3416,7 @@ class WP_Plugins_Table extends WP_List_Table {
function get_views() { function get_views() {
global $totals, $status; global $totals, $status;
$status_links = array(); $status_links = array();
foreach ( $totals as $type => $count ) { foreach ( $totals as $type => $count ) {
if ( !$count ) if ( !$count )
@ -3452,7 +3452,7 @@ class WP_Plugins_Table extends WP_List_Table {
break; break;
} }
$status_links[$type] = sprintf( "<li><a href='%s' %s>%s</a>", $status_links[$type] = sprintf( "<li><a href='%s' %s>%s</a>",
add_query_arg('plugin_status', $type, 'plugins.php'), add_query_arg('plugin_status', $type, 'plugins.php'),
( $type == $status ) ? ' class="current"' : '', ( $type == $status ) ? ' class="current"' : '',
sprintf( $text, number_format_i18n( $count ) ) sprintf( $text, number_format_i18n( $count ) )
@ -3640,7 +3640,7 @@ class WP_Plugin_Install_Table extends WP_List_Table {
function check_permissions() { function check_permissions() {
if ( ! current_user_can('install_plugins') ) if ( ! current_user_can('install_plugins') )
wp_die(__('You do not have sufficient permissions to install plugins on this site.')); wp_die(__('You do not have sufficient permissions to install plugins on this site.'));
} }
function prepare_items() { function prepare_items() {
@ -4081,8 +4081,8 @@ class WP_Theme_Install_Table extends WP_List_Table {
function prepare_items() { function prepare_items() {
include( ABSPATH . 'wp-admin/includes/theme-install.php' ); include( ABSPATH . 'wp-admin/includes/theme-install.php' );
global $tabs, $tab, $paged, $type, $term, $theme_field_defaults; global $tabs, $tab, $paged, $type, $term, $theme_field_defaults;
wp_reset_vars( array( 'tab' ) ); wp_reset_vars( array( 'tab' ) );
$paged = $this->get_pagenum(); $paged = $this->get_pagenum();

View File

@ -261,7 +261,7 @@ class WP_List_Table {
if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] )
return $_REQUEST['action2']; return $_REQUEST['action2'];
return false; return false;
} }
@ -398,7 +398,7 @@ class WP_List_Table {
*/ */
function get_pagenum( $query_var = 'paged' ) { function get_pagenum( $query_var = 'paged' ) {
$pagenum = isset( $_REQUEST[$query_var] ) ? absint( $_REQUEST[$query_var] ) : 0; $pagenum = isset( $_REQUEST[$query_var] ) ? absint( $_REQUEST[$query_var] ) : 0;
return max( 1, $pagenum ); return max( 1, $pagenum );
} }
@ -409,7 +409,7 @@ class WP_List_Table {
* @access protected * @access protected
* *
* @return int * @return int
*/ */
function get_items_per_page( $option, $default = 20 ) { function get_items_per_page( $option, $default = 20 ) {
$per_page = (int) get_user_option( $option ); $per_page = (int) get_user_option( $option );
if ( empty( $per_page ) || $per_page < 1 ) if ( empty( $per_page ) || $per_page < 1 )
@ -621,7 +621,7 @@ class WP_List_Table {
* @access protected * @access protected
* *
* @return array * @return array
*/ */
function get_table_classes() { function get_table_classes() {
extract( $this->_args ); extract( $this->_args );

View File

@ -508,8 +508,8 @@ function post_author_meta_box($post) {
?> ?>
<label class="screen-reader-text" for="post_author_override"><?php _e('Author'); ?></label> <label class="screen-reader-text" for="post_author_override"><?php _e('Author'); ?></label>
<?php <?php
wp_dropdown_users( array( wp_dropdown_users( array(
'name' => 'post_author_override', 'name' => 'post_author_override',
'selected' => empty($post->ID) ? $user_ID : $post->post_author 'selected' => empty($post->ID) ? $user_ID : $post->post_author
) ); ) );
} }

View File

@ -2072,7 +2072,7 @@ function set_current_screen( $id = '' ) {
$current_screen->is_network = is_network_admin() ? true : false; $current_screen->is_network = is_network_admin() ? true : false;
$current_screen->is_user = is_user_admin() ? true : false; $current_screen->is_user = is_user_admin() ? true : false;
if ( $current_screen->is_network ) { if ( $current_screen->is_network ) {
$current_screen->base .= '-network'; $current_screen->base .= '-network';
$current_screen->id .= '-network'; $current_screen->id .= '-network';

View File

@ -77,7 +77,7 @@ window.listTable = {
this._callback = callback; this._callback = callback;
this.fetch_list( this.fetch_list(
data, data,
$.proxy(this, 'handle_success'), $.proxy(this, 'handle_success'),
$.proxy(this, 'handle_error') $.proxy(this, 'handle_error')
); );

View File

@ -918,7 +918,7 @@ var wpNavMenu;
takenIDs[newID] = true; takenIDs[newID] = true;
if ( newID != matched[1] ) { if ( newID != matched[1] ) {
$item.html( $item.html().replace(new RegExp( $item.html( $item.html().replace(new RegExp(
'menu-item\\[' + matched[1] + '\\]', 'g'), 'menu-item\\[' + matched[1] + '\\]', 'g'),
'menu-item[' + newID + ']' 'menu-item[' + newID + ']'
) ); ) );
} }

View File

@ -47,7 +47,7 @@ var ThemeViewer;
// Set the options // Set the options
opts.search = $( 'input[name=s]' ).val(); opts.search = $( 'input[name=s]' ).val();
opts.order = document.location.href.match( /order=(\w*)/ ) ? document.location.href.match( /order=(\w*)/ )[1] : 'random'; opts.order = document.location.href.match( /order=(\w*)/ ) ? document.location.href.match( /order=(\w*)/ )[1] : 'random';
$( '#availablethemes td' ).fadeTo( 500, 0.1, function() { $( '#availablethemes td' ).fadeTo( 500, 0.1, function() {
$( '#availablethemes td img' ).hide(); $( '#availablethemes td img' ).hide();
} ); } );
@ -55,7 +55,7 @@ var ThemeViewer;
return false; return false;
}); });
} }
// These are the functions we expose // These are the functions we expose
var api = { var api = {
init: init init: init
@ -68,4 +68,4 @@ var ThemeViewer;
jQuery( document ).ready( function($) { jQuery( document ).ready( function($) {
theme_viewer = new ThemeViewer(); theme_viewer = new ThemeViewer();
theme_viewer.init(); theme_viewer.init();
}); });

View File

@ -74,7 +74,7 @@ function confirm_delete_users( $users ) {
} }
} }
} }
submit_button( __('Confirm Deletion'), 'delete' ); submit_button( __('Confirm Deletion'), 'delete' );
?> ?>
</form> </form>

View File

@ -49,7 +49,7 @@ function add_js() {
$.post(ajaxurl, { $.post(ajaxurl, {
action: 'date_format_custom' == format.attr('name') ? 'date_format' : 'time_format', action: 'date_format_custom' == format.attr('name') ? 'date_format' : 'time_format',
date : format.val(), date : format.val(),
}, function(d) { format.siblings('img').css('visibility','hidden'); format.siblings('.example').text(d); } ); }, function(d) { format.siblings('img').css('visibility','hidden'); format.siblings('.example').text(d); } );
}); });
}); });
//]]> //]]>

View File

@ -110,7 +110,7 @@ require_once('./admin-header.php');
} }
} }
echo implode ( ' | ', $options ); echo implode ( ' | ', $options );
if ( $ct->tags ) : ?> if ( $ct->tags ) : ?>
<p><?php _e('Tags:'); ?> <?php echo join(', ', $ct->tags); ?></p> <p><?php _e('Tags:'); ?> <?php echo join(', ', $ct->tags); ?></p>
<?php endif; ?> <?php endif; ?>
@ -146,7 +146,7 @@ if ( ! current_user_can( 'switch_themes' ) ) {
<?php foreach ( $feature_list as $feature_name => $features ) : <?php foreach ( $feature_list as $feature_name => $features ) :
$feature_name = esc_html( $feature_name ); ?> $feature_name = esc_html( $feature_name ); ?>
<div class="feature-container"> <div class="feature-container">
<div class="feature-name"><?php echo $feature_name ?></div> <div class="feature-name"><?php echo $feature_name ?></div>

View File

@ -342,13 +342,13 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
if ( !$redirect_url || $redirect_url == $requested_url ) if ( !$redirect_url || $redirect_url == $requested_url )
return false; return false;
// Hex encoded octets are case-insensitive. // Hex encoded octets are case-insensitive.
if ( false !== strpos($requested_url, '%') ) { if ( false !== strpos($requested_url, '%') ) {
if ( !function_exists('lowercase_octets') ) { if ( !function_exists('lowercase_octets') ) {
function lowercase_octets($matches) { function lowercase_octets($matches) {
return strtolower( $matches[0] ); return strtolower( $matches[0] );
} }
} }
$requested_url = preg_replace_callback('|%[a-fA-F0-9][a-fA-F0-9]|', 'lowercase_octets', $requested_url); $requested_url = preg_replace_callback('|%[a-fA-F0-9][a-fA-F0-9]|', 'lowercase_octets', $requested_url);
} }

View File

@ -963,7 +963,7 @@ function has_tag( $tag = '', $post = null ) {
/** /**
* Check if the current post has any of given terms. * Check if the current post has any of given terms.
* *
* The given terms are checked against the post's terms' term_ids, names and slugs. * The given terms are checked against the post's terms' term_ids, names and slugs.
* Terms given as integers will only be checked against the post's terms' term_ids. * Terms given as integers will only be checked against the post's terms' term_ids.
* If no terms are given, determines if post has any terms. * If no terms are given, determines if post has any terms.

View File

@ -311,7 +311,7 @@ class WP_Comment_Query extends WP_Object_Query {
wp_cache_add( $cache_key, $comments, 'comment' ); wp_cache_add( $cache_key, $comments, 'comment' );
return $comments; return $comments;
} }
} }

View File

@ -4342,7 +4342,7 @@ function _wp_mysql_week( $column ) {
* Finds hierarchy loops using a callback function that maps objects to parents. * Finds hierarchy loops using a callback function that maps objects to parents.
* *
* @since 3.1.0 * @since 3.1.0
* @access private * @access private
* *
* @param callback $callback function that accepts ( ID, callback_arg, ... ) and outputs parent_ID * @param callback $callback function that accepts ( ID, callback_arg, ... ) and outputs parent_ID
* @param $start The ID to start the loop check at * @param $start The ID to start the loop check at

View File

@ -654,7 +654,7 @@ function post_type_archive_title() {
if ( ! is_post_type_archive() ) if ( ! is_post_type_archive() )
return; return;
$post_type_obj = get_post_type_object( get_query_var( 'post_type' ) ); $post_type_obj = get_post_type_object( get_query_var( 'post_type' ) );
$title = apply_filters('post_type_archive_title', $post_type_obj->labels->name ); $title = apply_filters('post_type_archive_title', $post_type_obj->labels->name );
@ -663,7 +663,7 @@ function post_type_archive_title() {
else else
return $title; return $title;
} }
/** /**
* Display or retrieve page title for category archive. * Display or retrieve page title for category archive.
* *

View File

@ -858,9 +858,9 @@ function get_post_type_archive_link( $post_type ) {
* @since 3.1.0 * @since 3.1.0
* *
* @param string $post_type Post type * @param string $post_type Post type
* @param string $feed Optional. Feed type * @param string $feed Optional. Feed type
* @return string * @return string
*/ */
function get_post_type_archive_feed_link( $post_type, $feed = '' ) { function get_post_type_archive_feed_link( $post_type, $feed = '' ) {
$default_feed = get_default_feed(); $default_feed = get_default_feed();
if ( empty( $feed ) ) if ( empty( $feed ) )

View File

@ -116,7 +116,7 @@ function get_id_from_blogname( $name ) {
* Retrieve the details for a blog from the blogs table and blog options. * Retrieve the details for a blog from the blogs table and blog options.
* *
* @since MU * @since MU
* *
* @param int|string|array $fields A blog ID, a blog name, or an array of fields to query against. * @param int|string|array $fields A blog ID, a blog name, or an array of fields to query against.
* @param bool $get_all Whether to retrieve all details or only the details in the blogs table. Default is true. * @param bool $get_all Whether to retrieve all details or only the details in the blogs table. Default is true.
* @return object Blog details. * @return object Blog details.
@ -488,9 +488,9 @@ function switch_to_blog( $new_blog, $validate = false ) {
$wp_roles->__construct(); $wp_roles->__construct();
$wpdb->suppress_errors( false ); $wpdb->suppress_errors( false );
} }
if ( did_action('init') ) { if ( did_action('init') ) {
$current_user = wp_get_current_user(); $current_user = wp_get_current_user();
if ( is_object( $current_user ) ) if ( is_object( $current_user ) )
$current_user->for_blog( $blog_id ); $current_user->for_blog( $blog_id );
} }
@ -663,7 +663,7 @@ function get_blog_status( $id, $pref ) {
* Get a list of most recently updated blogs. * Get a list of most recently updated blogs.
* *
* @since MU * @since MU
* *
* @param $deprecated Not used * @param $deprecated Not used
* @param int $start The offset * @param int $start The offset
* @param int $quantity The maximum number of blogs to retrieve. Default is 40. * @param int $quantity The maximum number of blogs to retrieve. Default is 40.

View File

@ -124,7 +124,7 @@ function get_active_blog_for_user( $user_id ) {
* *
* @since MU 1.1 * @since MU 1.1
* @uses get_blogs_of_user() * @uses get_blogs_of_user()
* *
* @param int $user_id The unique ID of the user * @param int $user_id The unique ID of the user
* @param int $blog Optional. If no blog_id is provided, current site is used * @param int $blog Optional. If no blog_id is provided, current site is used
* @return bool * @return bool
@ -268,7 +268,7 @@ function add_user_to_blog( $blog_id, $user_id, $role ) {
* Use the 'remove_user_from_blog' action to fire an event when * Use the 'remove_user_from_blog' action to fire an event when
* users are removed from a blog. * users are removed from a blog.
* *
* Accepts an optional $reassign parameter, if you want to * Accepts an optional $reassign parameter, if you want to
* reassign the user's blog posts to another user upon removal. * reassign the user's blog posts to another user upon removal.
* *
* @since MU 1.0 * @since MU 1.0

View File

@ -196,7 +196,7 @@ function wp_nav_menu( $args = array() ) {
$sorted_menu_items[$menu_item->menu_order] = $menu_item; $sorted_menu_items[$menu_item->menu_order] = $menu_item;
unset($menu_items); unset($menu_items);
$sorted_menu_items = apply_filters( 'wp_nav_menu_objects', $sorted_menu_items, $args ); $sorted_menu_items = apply_filters( 'wp_nav_menu_objects', $sorted_menu_items, $args );
$items .= walk_nav_menu_tree( $sorted_menu_items, $args->depth, $args ); $items .= walk_nav_menu_tree( $sorted_menu_items, $args->depth, $args );
@ -314,9 +314,9 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
$possible_object_parents = array_filter( $possible_object_parents ); $possible_object_parents = array_filter( $possible_object_parents );
foreach ( (array) $menu_items as $key => $menu_item ) { foreach ( (array) $menu_items as $key => $menu_item ) {
$menu_items[$key]->current = false; $menu_items[$key]->current = false;
$classes = (array) $menu_item->classes; $classes = (array) $menu_item->classes;
$classes[] = 'menu-item'; $classes[] = 'menu-item';
$classes[] = 'menu-item-type-' . $menu_item->type; $classes[] = 'menu-item-type-' . $menu_item->type;
@ -362,7 +362,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
$current_url = untrailingslashit( ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); $current_url = untrailingslashit( ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
$item_url = untrailingslashit( strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url ); $item_url = untrailingslashit( strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url );
$_indexless_current = untrailingslashit( preg_replace( '/index.php$/', '', $current_url ) ); $_indexless_current = untrailingslashit( preg_replace( '/index.php$/', '', $current_url ) );
if ( in_array( $item_url, array( $current_url, $_indexless_current ) ) ) { if ( in_array( $item_url, array( $current_url, $_indexless_current ) ) ) {
$classes[] = 'current-menu-item'; $classes[] = 'current-menu-item';
$menu_items[$key]->current = true; $menu_items[$key]->current = true;
@ -383,7 +383,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
$active_parent_object_ids[] = (int) $menu_item->post_parent; $active_parent_object_ids[] = (int) $menu_item->post_parent;
$active_object = $menu_item->object; $active_object = $menu_item->object;
} }
if ( untrailingslashit($item_url) == home_url() ) if ( untrailingslashit($item_url) == home_url() )
$classes[] = 'menu-item-home'; $classes[] = 'menu-item-home';
} }
@ -403,7 +403,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
$classes = (array) $parent_item->classes; $classes = (array) $parent_item->classes;
$menu_items[$key]->current_item_ancestor = false; $menu_items[$key]->current_item_ancestor = false;
$menu_items[$key]->current_item_parent = false; $menu_items[$key]->current_item_parent = false;
if ( if (
isset( $parent_item->type ) && isset( $parent_item->type ) &&
( (

View File

@ -496,7 +496,7 @@ function get_post_format( $post ) {
* *
* @since 3.1.0 * @since 3.1.0
* @uses has_term() * @uses has_term()
* *
* @param string $format The format to check for * @param string $format The format to check for
* @param object|id $post The post to check. If not supplied, defaults to the current post if used in the loop. * @param object|id $post The post to check. If not supplied, defaults to the current post if used in the loop.
* @return bool True if the post has the format, false otherwise. * @return bool True if the post has the format, false otherwise.
@ -3812,7 +3812,7 @@ function wp_mime_type_icon( $mime = 0 ) {
/** /**
* Checked for changed slugs for published post objects and save the old slug. * Checked for changed slugs for published post objects and save the old slug.
* *
* The function is used when a post object of any type is updated, * The function is used when a post object of any type is updated,
* by comparing the current and previous post objects. * by comparing the current and previous post objects.
* *
* If the slug was changed and not already part of the old slugs then it will be * If the slug was changed and not already part of the old slugs then it will be

View File

@ -103,7 +103,7 @@ function wp_reset_postdata() {
* Month, Year, Category, Author, ... * Month, Year, Category, Author, ...
* *
* If the $post_types parameter is specified, this function will additionally * If the $post_types parameter is specified, this function will additionally
* check if the query is for exactly one of the post types specified. If a plugin * check if the query is for exactly one of the post types specified. If a plugin
* is causing multiple post types to appear in the query, specifying a post type * is causing multiple post types to appear in the query, specifying a post type
* will cause this check to return false. * will cause this check to return false.
* *
@ -135,7 +135,7 @@ function is_post_type_archive( $post_types = '' ) {
return $wp_query->is_post_type_archive( $post_types ); return $wp_query->is_post_type_archive( $post_types );
} }
/** /**
* Is the query for an attachment page? * Is the query for an attachment page?
* *
@ -2648,7 +2648,7 @@ class WP_Query extends WP_Object_Query {
* Month, Year, Category, Author, ... * Month, Year, Category, Author, ...
* *
* If the $post_types parameter is specified, this function will additionally * If the $post_types parameter is specified, this function will additionally
* check if the query is for exactly one of the post types specified. If a plugin * check if the query is for exactly one of the post types specified. If a plugin
* is causing multiple post types to appear in the query, specifying a post type * is causing multiple post types to appear in the query, specifying a post type
* will cause this check to return false. * will cause this check to return false.
* *

View File

@ -503,7 +503,7 @@ function get_objects_in_term( $terms, $taxonomies, $args = array() ) {
if ( $term = get_term_by( $field, $term, $taxonomy ) ) if ( $term = get_term_by( $field, $term, $taxonomy ) )
$term = $term->term_id; $term = $term->term_id;
else else
continue; continue;
} }
$children = array_merge( $children, get_term_children( $term, $taxonomy ) ); $children = array_merge( $children, get_term_children( $term, $taxonomy ) );
$children[] = $term; $children[] = $term;
@ -1446,13 +1446,13 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) {
$tt_id = $ids['term_taxonomy_id']; $tt_id = $ids['term_taxonomy_id'];
$defaults = array(); $defaults = array();
if ( 'category' == $taxonomy ) { if ( 'category' == $taxonomy ) {
$defaults['default'] = get_option( 'default_category' ); $defaults['default'] = get_option( 'default_category' );
if ( $defaults['default'] == $term ) if ( $defaults['default'] == $term )
return 0; // Don't delete the default category return 0; // Don't delete the default category
} }
$args = wp_parse_args($args, $defaults); $args = wp_parse_args($args, $defaults);
extract($args, EXTR_SKIP); extract($args, EXTR_SKIP);
@ -2641,7 +2641,7 @@ function get_term_link( $term, $taxonomy = '') {
$termlink = home_url( user_trailingslashit($termlink, 'category') ); $termlink = home_url( user_trailingslashit($termlink, 'category') );
} }
// Back Compat filters. // Back Compat filters.
if ( 'post_tag' == $taxonomy ) if ( 'post_tag' == $taxonomy )
$termlink = apply_filters( 'tag_link', $termlink, $term->term_id ); $termlink = apply_filters( 'tag_link', $termlink, $term->term_id );
elseif ( 'category' == $taxonomy ) elseif ( 'category' == $taxonomy )
$termlink = apply_filters( 'category_link', $termlink, $term->term_id ); $termlink = apply_filters( 'category_link', $termlink, $term->term_id );
@ -2815,7 +2815,7 @@ function is_object_in_taxonomy($object_type, $taxonomy) {
return false; return false;
} }
/** /**
* Get an array of ancestor IDs for a given object. * Get an array of ancestor IDs for a given object.
* *
@ -2825,13 +2825,13 @@ function is_object_in_taxonomy($object_type, $taxonomy) {
*/ */
function get_ancestors($object_id = 0, $object_type = '') { function get_ancestors($object_id = 0, $object_type = '') {
$object_id = (int) $object_id; $object_id = (int) $object_id;
$ancestors = array(); $ancestors = array();
if ( empty( $object_id ) ) { if ( empty( $object_id ) ) {
return apply_filters('get_ancestors', $ancestors, $object_id, $object_type); return apply_filters('get_ancestors', $ancestors, $object_id, $object_type);
} }
if ( is_taxonomy_hierarchical( $object_type ) ) { if ( is_taxonomy_hierarchical( $object_type ) ) {
$term = get_term($object_id, $object_type); $term = get_term($object_id, $object_type);
while ( ! is_wp_error($term) && ! empty( $term->parent ) && ! in_array( $term->parent, $ancestors ) ) { while ( ! is_wp_error($term) && ! empty( $term->parent ) && ! in_array( $term->parent, $ancestors ) ) {
@ -2840,7 +2840,7 @@ function get_ancestors($object_id = 0, $object_type = '') {
} }
} elseif ( null !== get_post_type_object( $object_type ) ) { } elseif ( null !== get_post_type_object( $object_type ) ) {
$object = get_post($object_id); $object = get_post($object_id);
if ( ! is_wp_error( $object ) && isset( $object->ancestors ) && is_array( $object->ancestors ) ) if ( ! is_wp_error( $object ) && isset( $object->ancestors ) && is_array( $object->ancestors ) )
$ancestors = $object->ancestors; $ancestors = $object->ancestors;
else { else {
while ( ! is_wp_error($object) && ! empty( $object->post_parent ) && ! in_array( $object->post_parent, $ancestors ) ) { while ( ! is_wp_error($object) && ! empty( $object->post_parent ) && ! in_array( $object->post_parent, $ancestors ) ) {

View File

@ -3,9 +3,9 @@
* @package WordPress * @package WordPress
* @subpackage Theme_Compat * @subpackage Theme_Compat
* @deprecated 3.0 * @deprecated 3.0
* *
* This file is here for Backwards compatibility with old themes and will be removed in a future version * This file is here for Backwards compatibility with old themes and will be removed in a future version
* *
*/ */
_deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s template in your theme.'), basename(__FILE__) ) ); _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s template in your theme.'), basename(__FILE__) ) );
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

View File

@ -3,18 +3,18 @@
* @package WordPress * @package WordPress
* @subpackage Theme_Compat * @subpackage Theme_Compat
* @deprecated 3.0 * @deprecated 3.0
* *
* This file is here for Backwards compatibility with old themes and will be removed in a future version * This file is here for Backwards compatibility with old themes and will be removed in a future version
* *
*/ */
_deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s template in your theme.'), basename(__FILE__) ) ); _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s template in your theme.'), basename(__FILE__) ) );
// Do not delete these lines // Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!'); die ('Please do not load this page directly. Thanks!');
if ( post_password_required() ) { ?> if ( post_password_required() ) { ?>
<p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.'); ?></p> <p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.'); ?></p>
<?php <?php
return; return;
} }
@ -58,9 +58,9 @@ _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.
<h3><?php comment_form_title( __('Leave a Reply'), __('Leave a Reply to %s' ) ); ?></h3> <h3><?php comment_form_title( __('Leave a Reply'), __('Leave a Reply to %s' ) ); ?></h3>
<div id="cancel-comment-reply"> <div id="cancel-comment-reply">
<small><?php cancel_comment_reply_link() ?></small> <small><?php cancel_comment_reply_link() ?></small>
</div> </div>
<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?> <?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
<p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.'), wp_login_url( get_permalink() )); ?></p> <p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.'), wp_login_url( get_permalink() )); ?></p>
@ -90,7 +90,7 @@ _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.
<p><textarea name="comment" id="comment" cols="58" rows="10" tabindex="4"></textarea></p> <p><textarea name="comment" id="comment" cols="58" rows="10" tabindex="4"></textarea></p>
<p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment'); ?>" /> <p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment'); ?>" />
<?php comment_id_fields(); ?> <?php comment_id_fields(); ?>
</p> </p>
<?php do_action('comment_form', $post->ID); ?> <?php do_action('comment_form', $post->ID); ?>

View File

@ -3,9 +3,9 @@
* @package WordPress * @package WordPress
* @subpackage Theme_Compat * @subpackage Theme_Compat
* @deprecated 3.0 * @deprecated 3.0
* *
* This file is here for Backwards compatibility with old themes and will be removed in a future version * This file is here for Backwards compatibility with old themes and will be removed in a future version
* *
*/ */
_deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s template in your theme.'), basename(__FILE__) ) ); _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s template in your theme.'), basename(__FILE__) ) );
?> ?>

View File

@ -3,9 +3,9 @@
* @package WordPress * @package WordPress
* @subpackage Theme_Compat * @subpackage Theme_Compat
* @deprecated 3.0 * @deprecated 3.0
* *
* This file is here for Backwards compatibility with old themes and will be removed in a future version * This file is here for Backwards compatibility with old themes and will be removed in a future version
* *
*/ */
_deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s template in your theme.'), basename(__FILE__) ) ); _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s template in your theme.'), basename(__FILE__) ) );
?> ?>

View File

@ -3,9 +3,9 @@
* @package WordPress * @package WordPress
* @subpackage Theme_Compat * @subpackage Theme_Compat
* @deprecated 3.0 * @deprecated 3.0
* *
* This file is here for Backwards compatibility with old themes and will be removed in a future version * This file is here for Backwards compatibility with old themes and will be removed in a future version
* *
*/ */
_deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s template in your theme.'), basename(__FILE__) ) ); _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s template in your theme.'), basename(__FILE__) ) );
?> ?>

View File

@ -642,7 +642,7 @@ function get_ordered_blogs_of_user( $user_id, $visibility = true ) {
$blogs = get_blogs_of_user( $user_id ); $blogs = get_blogs_of_user( $user_id );
$order_meta = get_user_meta( $user_id, 'blog_order' ); $order_meta = get_user_meta( $user_id, 'blog_order' );
$visible_meta = get_user_meta( $user_id, 'blog_visibility' ); $visible_meta = get_user_meta( $user_id, 'blog_visibility' );
$order = $order_meta; $order = $order_meta;
if ( !is_array( $order ) ) if ( !is_array( $order ) )
$order = array(); $order = array();
@ -650,7 +650,7 @@ function get_ordered_blogs_of_user( $user_id, $visibility = true ) {
$visible = $visible_meta; $visible = $visible_meta;
if ( !is_array( $visible ) ) if ( !is_array( $visible ) )
$visible = array(); $visible = array();
// Index the blogs by userblog_id and set the visibility flag // Index the blogs by userblog_id and set the visibility flag
// Visibility is on by default, unless a linked site then off // Visibility is on by default, unless a linked site then off
foreach ( $blogs as $blog ) { foreach ( $blogs as $blog ) {
@ -667,7 +667,7 @@ function get_ordered_blogs_of_user( $user_id, $visibility = true ) {
// A previous change was saving the entire blog details into ordered, not just the blog ID - this detects it // A previous change was saving the entire blog details into ordered, not just the blog ID - this detects it
if ( is_object( $id ) && isset( $id->userblog_id ) ) if ( is_object( $id ) && isset( $id->userblog_id ) )
$id = $id->userblog_id; $id = $id->userblog_id;
if ( is_numeric( $id ) && isset( $newblogs[intval( $id )] ) ) { if ( is_numeric( $id ) && isset( $newblogs[intval( $id )] ) ) {
$ordered[$id] = $newblogs[$id]; $ordered[$id] = $newblogs[$id];
unset( $newblogs[$id] ); unset( $newblogs[$id] );
@ -724,7 +724,7 @@ function set_blog_visibility( $blog_id, $visible ) {
*/ */
function is_blog_user( $blog_id = 0 ) { function is_blog_user( $blog_id = 0 ) {
global $wpdb; global $wpdb;
$current_user = wp_get_current_user(); $current_user = wp_get_current_user();
if ( !$blog_id ) if ( !$blog_id )
$blog_id = $wpdb->blogid; $blog_id = $wpdb->blogid;

View File

@ -540,7 +540,7 @@ class wpdb {
/** /**
* Sets the connection's character set. * Sets the connection's character set.
* *
* @param resource $dbh The resource given by mysql_connect * @param resource $dbh The resource given by mysql_connect
* @param string $charset The character set (optional) * @param string $charset The character set (optional)
* @param string $collate The collation (optional) * @param string $collate The collation (optional)
@ -740,7 +740,7 @@ class wpdb {
* @return null Always null. * @return null Always null.
*/ */
function select( $db, $dbh = null) { function select( $db, $dbh = null) {
if ( is_null($dbh) ) if ( is_null($dbh) )
$dbh = $this->dbh; $dbh = $this->dbh;
if ( !@mysql_select_db( $db, $dbh ) ) { if ( !@mysql_select_db( $db, $dbh ) ) {
@ -1043,7 +1043,7 @@ class wpdb {
</ul> </ul>
<p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p> <p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>
"/*/WP_I18N_DB_CONN_ERROR*/, $this->dbhost ), 'db_connect_fail' ); "/*/WP_I18N_DB_CONN_ERROR*/, $this->dbhost ), 'db_connect_fail' );
//If show errors is disabled then we need to die anyway as we don't have a working DB connection //If show errors is disabled then we need to die anyway as we don't have a working DB connection
die(); die();
} }

View File

@ -261,7 +261,7 @@ function check_password_reset_key($key, $login) {
if ( empty( $user ) ) if ( empty( $user ) )
return new WP_Error('invalid_key', __('Invalid key')); return new WP_Error('invalid_key', __('Invalid key'));
return $user; return $user;
} }