Make WordPress Core

Ticket #21785: 21785-fix-randomize.diff

File 21785-fix-randomize.diff, 1.5 KB (added by mcsf, 11 years ago)
  • src/wp-includes/class-wp-customize-control.php

    diff --git a/src/wp-includes/class-wp-customize-control.php b/src/wp-includes/class-wp-customize-control.php
    index 6c5e467..f10a74f 100644
    a b final class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control 
    889889                                        <span><span class="dice">&#9860;</span>
    890890                                        <# if ( data.type === 'uploaded' ) { #>
    891891                                                <?php _e( 'Randomize uploaded headers' ); ?>
    892                                         <# } else if ( data.type === 'suggested' ) { #>
     892                                        <# } else if ( data.type === 'default' ) { #>
    893893                                                <?php _e( 'Randomize suggested headers' ); ?>
    894894                                        <# } #>
    895895                                        </span>
    final class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control 
    920920                                        <span><span class="dice">&#9860;</span>
    921921                                        <# if ( data.type === 'uploaded' ) { #>
    922922                                                <?php _e( 'Randomizing uploaded headers' ); ?>
    923                                         <# } else if ( data.type === 'suggested' ) { #>
     923                                        <# } else if ( data.type === 'default' ) { #>
    924924                                                <?php _e( 'Randomizing suggested headers' ); ?>
    925925                                        <# } #>
    926926                                        </span>
  • src/wp-includes/js/customize-views.js

    diff --git a/src/wp-includes/js/customize-views.js b/src/wp-includes/js/customize-views.js
    index 018852d..eb3d4aa 100644
    a b  
    136136                extendedModel: function() {
    137137                        var c = this.model.get('collection');
    138138                        return _.extend(this.model.toJSON(), {
    139                                 // -1 to exclude the randomize button
    140                                 nImages: c.size() - 1
     139                                type: c.type
    141140                        });
    142141                },
    143142