WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/22/2017 07:02:26 PM (5 years ago)
Author:
westonruter
Message:

Customize: Show notice in Widgets panel when there are additional widget areas not rendered in preview.

This extends the existing behavior which only showed a message only when there were no widget areas rendered in the preview. The number of non-rendered widget areas is indicated. Also removes needles deletion of wp.customize.Widgets.data.l10n property which hindered plugins.

See #33567, #33052.
Fixes #39087.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-widgets.php

    r39951 r40312  
    733733                'widgetMovedUp'    => __( 'Widget moved up' ),
    734734                'widgetMovedDown'  => __( 'Widget moved down' ),
    735                 'noAreasRendered'  => __( 'There are no widget areas on the page shown, however other pages in this theme do have them.' ),
     735                'navigatePreview'  => __( 'You can navigate to other pages on your site while using the Customizer to view and edit the widgets displayed on those pages.' ),
     736                'someAreasShown'   => wp_array_slice_assoc(
     737                    /* translators: placeholder is the number of other widget areas registered */
     738                    _n_noop(
     739                        'Your theme has %d other widget area, but this particular page doesn\'t display it.',
     740                        'Your theme has %d other widget areas, but this particular page doesn\'t display them.'
     741                    ),
     742                    array( 'singular', 'plural' )
     743                ),
     744                'noAreasShown'    => wp_array_slice_assoc(
     745                    /* translators: placeholder is the total number of widget areas registered */
     746                    _n_noop(
     747                        'Your theme has %d widget area, but this particular page doesn\'t display it.',
     748                        'Your theme has %d widget areas, but this particular page doesn\'t display them.'
     749                    ),
     750                    array( 'singular', 'plural' )
     751                ),
    736752                'reorderModeOn'    => __( 'Reorder mode enabled' ),
    737753                'reorderModeOff'   => __( 'Reorder mode closed' ),
    738754                'reorderLabelOn'   => esc_attr__( 'Reorder widgets' ),
     755                /* translators: placeholder is the count for the number of widgets found */
    739756                'widgetsFound'     => __( 'Number of widgets found: %d' ),
    740757                'noWidgetsFound'   => __( 'No widgets found.' ),
Note: See TracChangeset for help on using the changeset viewer.