Pinking shears

git-svn-id: http://core.svn.wordpress.org/trunk@24303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren 2013-05-20 12:10:58 +00:00
parent 1eff4a8a62
commit ad4a081c0c
5 changed files with 17 additions and 17 deletions

View File

@ -234,7 +234,7 @@ p.button-controls,
right: 0;
}
.screen-reader-text {
.screen-reader-text {
right: auto;
text-indent: -1000em;
}
text-indent: -1000em;
}

View File

@ -611,7 +611,7 @@ function wp_refresh_post_lock( $response, $data, $screen_id ) {
$error = array(
'text' => sprintf( __( '%s has taken over and is currently editing.' ), $user->display_name )
);
if ( $avatar = get_avatar( $user->ID, 64 ) ) {
if ( preg_match( "|src='([^']+)'|", $avatar, $matches ) )
$error['avatar_src'] = $matches[1];

View File

@ -326,7 +326,7 @@ $(document).on( 'heartbeat-tick.refresh-lock', function( e, data ) {
timeout = window.setTimeout( function(){ check = 1; }, 3600000 );
}
$(document).on( 'heartbeat-send.wp-refresh-nonces', function( e, data ) {
$(document).on( 'heartbeat-send.wp-refresh-nonces', function( e, data ) {
var nonce, post_id;
if ( check ) {

View File

@ -762,12 +762,12 @@ class WP_Http_Fsockopen {
$process['body'] = '';
}
}
if ( isset( $r['limit-response-size'] ) && ( $bytes_written + strlen( $block ) ) > $r['limit-response-size'] )
$block = substr( $block, 0, ( $r['limit-response-size'] - $bytes_written ) );
$bytes_written += fwrite( $stream_handle, $block );
$bytes_written += fwrite( $stream_handle, $block );
$keep_reading = !isset( $r['limit-response-size'] ) || $bytes_written < $r['limit-response-size'];
}
@ -1847,7 +1847,7 @@ class WP_Http_Encoding {
if ( function_exists( 'gzuncompress' ) )
$type[] = 'compress;q=0.5';
if ( function_exists( 'gzdecode' ) )
$type[] = 'gzip;q=0.5';
}

View File

@ -2216,12 +2216,12 @@ function wp_set_object_terms($object_id, $terms, $taxonomy, $append = false) {
if ( ! $append ) {
$delete_tt_ids = array_diff( $old_tt_ids, $tt_ids );
if ( $delete_tt_ids ) {
$in_delete_tt_ids = "'" . implode( "', '", $delete_tt_ids ) . "'";
$delete_term_ids = $wpdb->get_col( $wpdb->prepare( "SELECT tt.term_id FROM $wpdb->term_taxonomy AS tt WHERE tt.taxonomy = %s AND tt.term_taxonomy_id IN ($in_delete_tt_ids)", $taxonomy ) );
$delete_term_ids = array_map( 'intval', $delete_term_ids );
$remove = wp_remove_object_terms( $object_id, $delete_term_ids, $taxonomy );
if ( is_wp_error( $remove ) ) {
return $remove;
@ -2295,33 +2295,33 @@ function wp_remove_object_terms( $object_id, $terms, $taxonomy ) {
}
$tt_ids = array();
foreach ( (array) $terms as $term ) {
if ( ! strlen( trim( $term ) ) ) {
continue;
}
if ( ! $term_info = term_exists( $term, $taxonomy ) ) {
// Skip if a non-existent term ID is passed.
if ( is_int( $term ) ) {
continue;
}
}
if ( is_wp_error( $term_info ) ) {
return $term_info;
}
$tt_ids[] = $term_info['term_taxonomy_id'];
}
if ( $tt_ids ) {
$in_tt_ids = "'" . implode( "', '", $tt_ids ) . "'";
do_action( 'delete_term_relationships', $object_id, $tt_ids );
$deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_tt_ids)", $object_id ) );
do_action( 'deleted_term_relationships', $object_id, $tt_ids );
wp_update_term_count( $tt_ids, $taxonomy );
return (bool) $deleted;
}