WordPress.org

Make WordPress Core

Ticket #31570: 31570.2.diff

File 31570.2.diff, 3.0 KB (added by adamsilverstein, 4 years ago)

refresh patch from trunk

  • src/wp-admin/includes/ajax-actions.php

     
    23762376        $query = new WP_Query( $query );
    23772377
    23782378        $posts = array_map( 'wp_prepare_attachment_for_js', $query->posts );
    2379         $posts = array_filter( $posts );
     2379        $posts = array_values( array_filter( $posts ) );
    23802380
    23812381        wp_send_json_success( $posts );
    23822382}
  • src/wp-admin/includes/update.php

     
    335335                        $active_class = is_plugin_active( $file ) ? ' active' : '';
    336336                }
    337337
    338                 echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $r->slug . '-update' ) . '" data-slug="' . esc_attr( $r->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message">';
     338                echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $r->slug . '-update' ) . '" data-slug="' . esc_attr( $r->slug ) . '" data-plugin="' . esc_attr( $file ) . '" data-name="' . esc_attr( $plugin_name ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message">';
    339339
    340340                if ( ! current_user_can( 'update_plugins' ) ) {
    341                         printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
     341                        printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $plugin_name, esc_url($details_url), esc_attr( $plugin_name ), $r->new_version );
    342342                } elseif ( empty($r->package) ) {
    343343                        printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
    344344                } else {
  • src/wp-content/themes/twentyeleven/functions.php

     
    3838 * @since Twenty Eleven 1.0
    3939 */
    4040
     41function restrict_media_library_by_width($response, $attachment, $meta) {
     42  if(isset($response['width']) && isset($response['height']) && $response['width'] > 100) {
     43    return $response;
     44  }
     45  return false;
     46}
     47add_filter('wp_prepare_attachment_for_js', 'restrict_media_library_by_width', 10, 3);
     48
    4149// Set the content width based on the theme's design and stylesheet.
    4250if ( ! isset( $content_width ) )
    4351        $content_width = 584;