Plugin Directory

Changeset 1712728


Ignore:
Timestamp:
08/13/2017 07:06:44 AM (9 years ago)
Author:
ajvillegas
Message:

Version 1.2.0 release

Location:
easy-widget-columns
Files:
22 edited
30 copied

Legend:

Unmodified
Added
Removed
  • easy-widget-columns/tags/1.2.0/README.txt

    r1624214 r1712728  
    11=== Easy Widget Columns ===
    22Contributors: ajvillegas
    3 Donate link:
     3Donate link:   
    44Tags: widget, admin, columns, layout, widget columns
    55Requires at least: 4.5
    66Tested up to: 4.8
    7 Stable tag: 1.1.8
     7Stable tag: 1.2.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1515Easy Widget Columns makes it really easy to arrange your widgets in rows of columns. It works by adding a new 'Column width' select option at the bottom of your widget’s form that allows you to set a width value for each widget.
    1616
    17 You can define new rows of widget columns with the 'Widget Row' widget, allowing you to create complex layouts directly from within your widget area or sidebar.
     17You can define new rows and sub-rows of widget columns with the 'Widget Row' widget and the 'Sub-Row' widget respectively, allowing you to create complex layouts directly from within your widget area or sidebar.
    1818
    1919> **Genesis Framework users**, be sure to check out the [Widgetized Page Template](https://wordpress.org/plugins/widgetized-page-template/) plugin, which helps you create full-page widget areas to use as a "blank canvas" with Easy Widget Columns.
     
    2929**Filters for Developers**
    3030
    31 The following filters are available for you to add or remove the 'Column width' control from specific widgets giving you full control over your widgets.
    32 
    33 * `ewc_include_widgets` is a whitelist filter used to add the control ONLY to the specified widgets.
    34 * `ewc_exclude_widgets` is a blacklist filter used to remove the control from the specified widgets.
    35 
    36 Both filters accept the widget’s ID base as parameters. Please note that you cannot use both filters at once. The `ewc_include_widgets` filter will always take precedence over the `ewc_exclude_widgets` filter and overwrite it.
    37 
    38 The examples below demonstrate how you can implement these filters on your theme using the default WordPress widgets:
     31The following filters are available for you to take full control of the plugin on your themes.
     32
     33* `ewc_include_widgets` - This whitelist filter is used to add the width control ONLY to the specified widgets.
     34* `ewc_exclude_widgets` - This blacklist filter is used to remove the width control from the specified widgets.
     35* `ewc_color_palette` - This filter allows you to add a custom color palette to the color picker control in the 'Widget Row' widget.
     36* `ewc_preset_classes` - This filter allows you assign preset CSS classes that display as a checkbox list in the 'Widget Row' widget.
     37* `ewc_advanced_options` - This filter allows you remove specific or all advanced options from the 'Widget Row' widget.
     38
     39**ewc_include_widgets**   
     40**ewc_exclude_widgets**
     41
     42Both filters accept the widget's ID base as parameters. Please note that you cannot use both filters at once. The `ewc_include_widgets` filter will always take precedence over the `ewc_exclude_widgets` filter and overwrite it.
     43
     44The examples below demonstrate how you can implement these filters on your theme.
    3945
    4046`add_filter( 'ewc_include_widgets', 'myprefix_add_ewc_control' );
     
    4955    $ewc_widgets = array(
    5056        'meta', // WP Meta widget
    51         //'nav_menu', // WP Custom Menu widget
    5257        'archives', // WP Archives widget
    5358        'calendar', // WP Calendar widget
    5459        'categories', // WP Categories widget
    55         //'links', // WP Links widget
    56         //'pages', // WP Pages widget
    57         //'recent-comments', // WP Recent Comments widget
    58         //'recent-posts', // WP Recent Posts widget
    59         //'rss', // WP RSS widget
    60         //'search', // WP Search widget
    61         //'tag_cloud', // WP Tag Cloud widget
    62         //'text', // WP Text widget
    6360    );
    6461   
     
    7774   
    7875    $ewc_widgets = array(
    79         //'meta', // WP Meta widget
    80         //'nav_menu', // WP Custom Menu widget
    81         'archives', // WP Archives widget
    82         'calendar', // WP Calendar widget
    83         'categories', // WP Categories widget
    84         'links', // WP Links widget
    85         //'pages', // WP Pages widget
    8676        'recent-comments', // WP Recent Comments widget
    8777        'recent-posts', // WP Recent Posts widget
    8878        'rss', // WP RSS widget
    89         //'search', // WP Search widget
    9079        'tag_cloud', // WP Tag Cloud widget
    91         //'text', // WP Text widget
    9280    );
    9381   
     
    9684}`
    9785
    98 The `ewc_color_palette` filter allows you to add a custom color palette to the color picker control in the 'Widget Row' widget. The filter accepts an array of hex color values as parameters.
    99 
    100 The example below demonstrates how you can implement this filter on your theme:
     86**ewc_color_palette**
     87
     88This filter allows you to add a custom color palette to the color picker control in the 'Widget Row' widget. It accepts an array of hex color values as parameters.
     89
     90The example below demonstrates how you can implement this filter on your theme.
    10191
    10292`add_filter( 'ewc_color_palette', 'myprefix_ewc_color_palette' );
     
    122112}`
    123113
    124 The `ewc_advanced_options` filter allows you to completely remove the advanced options from the 'Widget Row' widget. This can be useful for limiting design functionality on a client website ([decisions, not options](https://wordpress.org/about/philosophy/#decisions)).
    125 
    126 The example below demonstrates how you can implement this filter on your theme:
    127 
    128 `// Remove advanced options from the Widget Row widget
     114**ewc_preset_classes**
     115
     116This filter allows you assign preset CSS classes that display as a checkbox list in the 'Widget Row' widget.
     117
     118The following example demonstrates how you can implement this filter on your theme.
     119
     120`add_filter( 'ewc_preset_classes', 'myprefix_preset_classes' );
     121/**
     122 * Filter for predefining EWC Widget Row classes.
     123 *
     124 * @param   array   An empty array.
     125 * @return  array   An array containing new values.
     126 */
     127function myprefix_preset_classes( $classes ) {
     128   
     129    $classes = array(
     130        'hero',
     131        'parallax',
     132        'slider',
     133        'content',
     134    );
     135   
     136    return $classes;
     137   
     138}`
     139
     140**ewc_advanced_options**
     141
     142This filter allows you remove specific or all advanced options from the 'Widget Row' widget. This can be useful for limiting design functionality on a client website ([decisions, not options](https://wordpress.org/about/philosophy/#decisions)).
     143
     144The following example demonstrates how to completely remove all advanced options.
     145
     146`// Remove all advanced options from the Widget Row widget
    129147add_filter( 'ewc_advanced_options', '__return_false' );`
     148
     149The example below demonstrates how to disable or enable specific advanced options. The `display` parameter toggles the advanced option and the `active` parameter determines if the panel will display open (1) or closed (0) when the Widget Row widget is first added into a widget area.
     150
     151`add_filter( 'ewc_advanced_options', 'myprefix_display_advanced_options' );
     152/**
     153 * Filter to remove specific advanced options from the Widget Row widget.
     154 *
     155 * @param   array   An array containing default values.
     156 * @return  array   An array containing new values.
     157 */
     158function myprefix_display_advanced_options( $display ) {
     159   
     160    $display = array(
     161        'ewc_background' => array(
     162            'display' => true,
     163            'active' => 1,
     164        ),
     165        'ewc_margin' => array(
     166            'display' => false,
     167            'active' => 0,
     168        ),
     169        'ewc_padding' => array(
     170            'display' => false,
     171            'active' => 0,
     172        ),
     173        'ewc_class' => array(
     174            'display' => true,
     175            'active' => 0,
     176        ),
     177    );
     178   
     179    return $display;
     180   
     181}`
    130182
    131183== Installation ==
     
    169221
    170222To define new rows, use the 'Widget Row' widget at the start of each new row. If the next widget after a row has a value of 'None', then you'll need to add a 'Widget Row' widget before it to close the row. The only time you don't have to use the 'Widget Row' widget is when the last widget in a row is also the last widget in your widget area or sidebar.
     223
     224To define new sub-rows within a widget row use the 'Sub-Row' widget at the start of each new sub-row. The Sub-Row widget only works within a widget row and has no effect when used outside of a widget row.
    171225
    172226**Note:** Please make sure that each widget inside each row has a 'Column width' value other than 'None' assigned to it, otherwise the HTML markup will break in the front-end.
     
    184238== Changelog ==
    185239
     240= 1.2.0 =
     241* Enhanced UI for the Widget Row advanced options.
     242* Updated the `ewc_advanced_options` filter for removing specific advanced options.
     243* Added the `ewc_preset_classes` filter for adding your own predefined CSS classes to the 'Widget Row' widget.
     244* Added the 'Sub-Row' widget for creating sub-rows within a widget row allowing you to create more complex layouts.
     245* Fixed the image upload control to use unique IDs to avoid conflict with other Widget Row instances.
     246
     247= 1.1.9 =
     248* Strings in the image upload modal are now translatable.
     249* Updated .pot file with the new translatable strings.
     250
    186251= 1.1.8 =
    187252* Fixed a bug introduced in the last version with the 'Widget Row' widget that caused the wrong markup to be outputted in the front end.
  • easy-widget-columns/tags/1.2.0/admin/class-easy-widget-columns-control.php

    r1610881 r1712728  
    141141       
    142142        if ( !empty( $ewc_include_widgets ) &&
    143             ( in_array( $widget->id_base, array( 'ewc-row-divider' ) ) || !in_array( $widget->id_base, $ewc_include_widgets ) ) ) {
     143            ( in_array( $widget->id_base, array( 'ewc-row-divider', 'ewc-subrow-divider' ) ) || !in_array( $widget->id_base, $ewc_include_widgets ) ) ) {
    144144            return;
    145145        } else if ( empty( $ewc_include_widgets ) &&
    146             ( in_array( $widget->id_base, array( 'ewc-row-divider' ) ) || in_array( $widget->id_base, $ewc_exclude_widgets ) ) ) {
     146            ( in_array( $widget->id_base, array( 'ewc-row-divider', 'ewc-subrow-divider' ) ) || in_array( $widget->id_base, $ewc_exclude_widgets ) ) ) {
    147147            return;
    148148        }
     
    221221        // Get the widget's position in the sidebar
    222222        $sidebars_widgets = get_option( 'sidebars_widgets', array() );
    223         $position_id = array_search( $params[0]['widget_id'], $sidebars_widgets[$params[0]['id']] );
     223        $sidebar_id = $sidebars_widgets[$params[0]['id']];
     224        $position_id = array_search( $params[0]['widget_id'], $sidebar_id );
     225       
     226        // Retrieve the widget above options
     227        if ( isset( $sidebar_id[$position_id-2] ) ) {
     228            $widget_above_option = get_option( $wp_registered_widgets[$sidebar_id[$position_id-2]]['callback'][0]->option_name );
     229            $widget_above_index = preg_replace( '/[^0-9]/', '', $sidebar_id[$position_id-2] );
     230        } else {
     231            $widget_above_option = '';
     232            $widget_above_index = '';
     233        }
     234        if ( isset( $widget_above_option[$widget_above_index]['ewc_width'] ) ) {
     235            $ewc_width_above = $widget_above_option[$widget_above_index]['ewc_width'];
     236        } else {
     237            $ewc_width_above = '';
     238        }
    224239       
    225240        // Determine first widget in a row and assign .first class
    226         if ( ( isset( $sidebars_widgets[$params[0]['id']][$position_id-1] ) && in_array( _get_widget_id_base( $sidebars_widgets[$params[0]['id']][$position_id-1] ), array('ewc-row-divider') ) ) ) {
     241        if ( ( isset( $sidebar_id[$position_id-1] )
     242                && in_array( _get_widget_id_base( $sidebar_id[$position_id-1] ), array('ewc-row-divider') ) )
     243            || ( ( isset( $sidebar_id[$position_id-1] )
     244                && isset( $sidebar_id[$position_id-2] )
     245                && in_array( _get_widget_id_base( $sidebar_id[$position_id-1] ), array('ewc-subrow-divider') )
     246                && 'none' !== $ewc_width_above ) ) ) {
    227247            $first = 'first ';
    228248        } else {
     
    231251       
    232252        // Determine last widget in sidebar and assign closing row markup
    233         if ( ( end( $sidebars_widgets[$params[0]['id']] ) == $params[0]['widget_id'] ) ) {
     253        if ( ( end( $sidebar_id ) == $params[0]['widget_id'] ) ) {
    234254            $wrap_close = '</div></div>';
    235255        } else {
  • easy-widget-columns/tags/1.2.0/admin/css/easy-widget-columns-admin.css

    r1611642 r1712728  
    185185.select2-container--ewc-select .select2-results {
    186186    display: block;
     187    max-height: 300px;
     188    padding: 0;
     189    margin: 0;
    187190}
    188191
     
    545548   display: block;
    546549}
     550
     551input[type=checkbox].ewc-label-checkbox {
     552    display: none;
     553}
     554
     555input[type=checkbox].ewc-background-checkbox ~ .ewc-background-settings,
     556input[type=checkbox].ewc-margin-checkbox ~ .ewc-margin-settings,
     557input[type=checkbox].ewc-padding-checkbox ~ .ewc-padding-settings,
     558input[type=checkbox].ewc-class-checkbox ~ .ewc-class-settings {
     559    max-height: 0;
     560    overflow: hidden;
     561    visibility: hidden;
     562    transition: max-height 0.25s ease-out, visibility 0.25s linear;
     563}
     564
     565input[type=checkbox].ewc-background-checkbox:checked ~ .ewc-background-settings,
     566input[type=checkbox].ewc-margin-checkbox:checked ~ .ewc-margin-settings,
     567input[type=checkbox].ewc-padding-checkbox:checked ~ .ewc-padding-settings,
     568input[type=checkbox].ewc-class-checkbox:checked ~ .ewc-class-settings {
     569    max-height: 50em;
     570    visibility: visible;
     571    transition: max-height 0.5s ease-in, visibility 0.5s linear;
     572}
    547573 
    548574.ewc-row-styles {
     575    position: relative;
    549576    border: 1px solid #eee;
    550     padding: 0 10px;
     577    padding: 7px 10px 5px;
    551578    background: #fcfcfc;
    552579    margin-bottom: 15px;
    553580}
    554581
     582.ewc-row-styles hr {
     583    margin: 8px 0 6px;
     584}
     585
     586.ewc-row-styles hr:last-of-type {
     587    visibility: hidden;
     588    margin: 0;
     589}
     590
    555591.ewc-section-label {
    556592    display: inline-block;
    557     margin-bottom: 5px;
     593    margin: 7px 0;
    558594    font-weight: 700;
    559 }
    560 
    561 .ewc-widget-table {
    562     margin-bottom: 10px;
     595    width: 100%;
     596}
     597
     598.ewc-section-label:after {
     599    content: "\f140";
     600    position: absolute;
     601    right: 0.5em;
     602    font: 400 18px/16px dashicons;
     603    speak: none;
     604    -webkit-font-smoothing: antialiased;
     605    -moz-osx-font-smoothing: grayscale;
     606    text-decoration: none !important;
     607}
     608
     609input[type=checkbox].ewc-label-checkbox:checked + .ewc-section-label:after {
     610    content: "\f142";
    563611}
    564612
     
    579627.wp-customizer .ewc-widget-table .row-label {
    580628    width: 30px;
     629}
     630
     631.button.custom-media-button {
     632    margin: 5px 0 8px;
     633}
     634
     635input.custom-media-url:invalid ~ .ewc-image-properties {
     636    display: none;
     637}
     638
     639.ewc-image-properties {
     640    margin-top: 8px;
    581641}
    582642
     
    600660.image-properties-dropdown select {
    601661    width: 100%;
    602 }
     662    margin: 0;
     663}
     664
     665.ewc-class-settings input {
     666    margin-bottom: 3px;
     667}
     668
     669.ewc-preset-classes {
     670    background: #fff;
     671    padding: 5px 5px 0;
     672    max-height: 75px;
     673    overflow: hidden;
     674    overflow-y: auto;
     675    margin: 7px 0 3px 0;
     676    border: 1px solid #ddd;
     677    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) inset;
     678    color: #32373c;
     679}
     680
     681.ewc-class-settings .ewc-preset-classes input {
     682    margin-bottom: 0;
     683}
     684
     685.ewc-preset-label {
     686    vertical-align: top;
     687}
     688
     689/**
     690 * Media Modal
     691 */
     692 
     693.media-modal-content .media-frame.ajv-media-frame select.attachment-filters {
     694    width: 100%;
     695    max-width: 100%;
     696}
  • easy-widget-columns/tags/1.2.0/admin/css/easy-widget-columns-admin.min.css

    r1611642 r1712728  
    1 @font-face{font-family:'column-icons';src:url('font/column-icons.eot?-l9qhcm');src:url('font/column-icons.eot?#iefix-l9qhcm') format('embedded-opentype'), url('font/column-icons.ttf?-l9qhcm') format('truetype'), url('font/column-icons.woff?-l9qhcm') format('woff'), url('font/column-icons.svg?-l9qhcm#icomoon') format('svg');font-weight:normal;font-style:normal}.select2-container--ewc-select .select2-results i[class^="ewc-icon-"]:before,.select2-container--ewc-select .select2-results i[class*=" ewc-icon-"]:before,.select2-container--ewc-select .select2-selection__rendered i[class^="ewc-icon-"]:before,.select2-container--ewc-select .select2-selection__rendered i[class*=" ewc-icon-"]:before{font-family:'column-icons';font-style:normal;speak:none;font-weight:normal;position:relative;margin-right:10px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.select2-container--ewc-select .select2-selection__rendered i[class^="ewc-icon-"]:before,.select2-container--ewc-select .select2-selection__rendered i[class*=" ewc-icon-"]:before{color:#2f3132}.ewc-icon-none:before{content:"\e900"}.ewc-icon-full-width:before{content:"\e60c"}.ewc-icon-one-half:before{content:"\e601"}.ewc-icon-one-third:before{content:"\e602"}.ewc-icon-two-thirds:before{content:"\e603"}.ewc-icon-one-fourth:before{content:"\e604"}.ewc-icon-two-fourths:before{content:"\e605"}.ewc-icon-three-fourths:before{content:"\e606"}.ewc-icon-one-sixth:before{content:"\e607"}.ewc-icon-two-sixths:before{content:"\e608"}.ewc-icon-three-sixths:before{content:"\e609"}.ewc-icon-four-sixths:before{content:"\e60a"}.ewc-icon-five-sixths:before{content:"\e60b"}.select2-container--ewc-select.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container--ewc-select.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container--ewc-select.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:6px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;font-size:14px;white-space:nowrap;text-decoration:none;border-radius:0;background-clip:padding-box;background-image:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.select2-container--ewc-select.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container--ewc-select.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container--ewc-select.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container--ewc-select.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container--ewc-select.select2-container .select2-search--inline{float:left}.select2-container--ewc-select.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container--ewc-select.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-container--ewc-select .select2-dropdown{background-color:#fff;border:1px solid #5b9dd9;-webkit-box-shadow:0 0 2px rgba(30, 140, 190, .8);box-shadow:0 0 2px rgba(30, 140, 190, .8);border-radius:0;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.wp-customizer .select2-container--ewc-select .select2-dropdown{z-index:900000;}.select2-container--ewc-select .select2-results{display:block}.select2-container--ewc-select .select2-results__options{list-style:none;margin:0;padding:0}.select2-container--ewc-select .select2-results__option{padding:6px;margin-bottom:0;user-select:none;-webkit-user-select:none;font-size:14px;color:#2f3132}.select2-container--ewc-select .select2-results__option[aria-selected]{cursor:pointer}.select2-container--ewc-select.select2-container--open .select2-dropdown{left:0}.select2-container--ewc-select.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--ewc-select.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--ewc-select .select2-search--dropdown{display:block;padding:4px}.select2-container--ewc-select .select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-container--ewc-select .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-container--ewc-select .select2-search--dropdown.select2-search--hide{display:none}.select2-container--ewc-select .select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--ewc-select .select2-selection--single{background-color:#fff;border:1px solid #ddd;border-radius:0}.select2-container--ewc-select .select2-selection--single .select2-selection__rendered{color:#000;line-height:26px}.select2-container--ewc-select .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--ewc-select .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--ewc-select .select2-selection--single .select2-selection__arrow{background-color:#f9f9f9;border-left:1px solid #ddd;height:26px;position:absolute;top:1px;right:1px;width:22px}.select2-container--ewc-select .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--ewc-select[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--ewc-select[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--ewc-select.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--ewc-select.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--ewc-select.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2-container--ewc-select .select2-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--ewc-select .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--ewc-select .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--ewc-select .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--ewc-select .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--ewc-select .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--ewc-select .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--ewc-select .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--ewc-select.select2-container--focus .select2-selection--multiple{border:solid #000 1px;outline:0}.select2-container--ewc-select.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--ewc-select.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--ewc-select.select2-container--open.select2-container--above .select2-selection--single,.select2-container--ewc-select.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--ewc-select.select2-container--open.select2-container--below .select2-selection--single,.select2-container--ewc-select.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--ewc-select .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--ewc-select .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--ewc-select .select2-results > .select2-results__options{max-height:300px;overflow-y:auto}.select2-container--ewc-select .select2-results__option[role=group]{padding:0}.select2-container--ewc-select .select2-results__option[aria-disabled=true]{color:#999}.select2-container--ewc-select .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--ewc-select .select2-results__option .select2-results__option{padding-left:1em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--ewc-select .select2-results__option--highlighted[aria-selected]{background-color:#0073aa;color:#fff}.select2-container--ewc-select .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--ewc-select.select2-container .select2-selection:focus{border:1px solid #5b9dd9;outline:none;-webkit-box-shadow:0 0 2px rgba(30, 140, 190, .8);box-shadow:0 0 2px rgba(30, 140, 190, .8)}.select2-container--ewc-select.select2-container--open.select2-container--below .select2-selection:focus,.select2-container--ewc-select.select2-container--open.select2-container--above .select2-dropdown{border-bottom:1px solid #ddd}.select2-container--ewc-select.select2-container--open.select2-container--above .select2-selection:focus,.select2-container--ewc-select.select2-container--open.select2-container--below .select2-dropdown{border-top:1px solid #ddd}input[type=checkbox].ewc-options-checkbox{margin-bottom:1em}label.ewc-options-label{display:inline-block;margin-bottom:1.250em}input[type=checkbox] ~ .ewc-row-styles{display:none}input[type=checkbox]:checked ~ .ewc-row-styles{display:block}.ewc-row-styles{border:1px solid #eee;padding:0 10px;background:#fcfcfc;margin-bottom:15px}.ewc-section-label{display:inline-block;margin-bottom:5px;font-weight:700}.ewc-widget-table{margin-bottom:10px}.ewc-widget-table .row-content{display:inline-block;margin-right:10px}.wp-customizer .ewc-widget-table .row-content{margin-right:8px}.ewc-widget-table .row-label{display:inline-block;width:35px}.wp-customizer .ewc-widget-table .row-label{width:30px}.ewc-image-properties:after{clear:both;content:" ";display:table}.image-properties-dropdown{float:left;width:48.717948717949%;margin-left:2.5641025641026%;margin-top:0}.first.image-properties-dropdown{margin-left:0}.image-properties-dropdown select{width:100%}
     1@font-face{font-family:'column-icons';src:url('font/column-icons.eot?-l9qhcm');src:url('font/column-icons.eot?#iefix-l9qhcm') format('embedded-opentype'), url('font/column-icons.ttf?-l9qhcm') format('truetype'), url('font/column-icons.woff?-l9qhcm') format('woff'), url('font/column-icons.svg?-l9qhcm#icomoon') format('svg');font-weight:normal;font-style:normal}.select2-container--ewc-select .select2-results i[class^="ewc-icon-"]:before,.select2-container--ewc-select .select2-results i[class*=" ewc-icon-"]:before,.select2-container--ewc-select .select2-selection__rendered i[class^="ewc-icon-"]:before,.select2-container--ewc-select .select2-selection__rendered i[class*=" ewc-icon-"]:before{font-family:'column-icons';font-style:normal;speak:none;font-weight:normal;position:relative;margin-right:10px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.select2-container--ewc-select .select2-selection__rendered i[class^="ewc-icon-"]:before,.select2-container--ewc-select .select2-selection__rendered i[class*=" ewc-icon-"]:before{color:#2f3132}.ewc-icon-none:before{content:"\e900"}.ewc-icon-full-width:before{content:"\e60c"}.ewc-icon-one-half:before{content:"\e601"}.ewc-icon-one-third:before{content:"\e602"}.ewc-icon-two-thirds:before{content:"\e603"}.ewc-icon-one-fourth:before{content:"\e604"}.ewc-icon-two-fourths:before{content:"\e605"}.ewc-icon-three-fourths:before{content:"\e606"}.ewc-icon-one-sixth:before{content:"\e607"}.ewc-icon-two-sixths:before{content:"\e608"}.ewc-icon-three-sixths:before{content:"\e609"}.ewc-icon-four-sixths:before{content:"\e60a"}.ewc-icon-five-sixths:before{content:"\e60b"}.select2-container--ewc-select.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container--ewc-select.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container--ewc-select.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:6px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;font-size:14px;white-space:nowrap;text-decoration:none;border-radius:0;background-clip:padding-box;background-image:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.select2-container--ewc-select.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container--ewc-select.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container--ewc-select.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container--ewc-select.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container--ewc-select.select2-container .select2-search--inline{float:left}.select2-container--ewc-select.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container--ewc-select.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-container--ewc-select .select2-dropdown{background-color:#fff;border:1px solid #5b9dd9;-webkit-box-shadow:0 0 2px rgba(30, 140, 190, .8);box-shadow:0 0 2px rgba(30, 140, 190, .8);border-radius:0;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.wp-customizer .select2-container--ewc-select .select2-dropdown{z-index:900000}.select2-container--ewc-select .select2-results{display:block;max-height:300px;padding:0;margin:0}.select2-container--ewc-select .select2-results__options{list-style:none;margin:0;padding:0}.select2-container--ewc-select .select2-results__option{padding:6px;margin-bottom:0;user-select:none;-webkit-user-select:none;font-size:14px;color:#2f3132}.select2-container--ewc-select .select2-results__option[aria-selected]{cursor:pointer}.select2-container--ewc-select.select2-container--open .select2-dropdown{left:0}.select2-container--ewc-select.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--ewc-select.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--ewc-select .select2-search--dropdown{display:block;padding:4px}.select2-container--ewc-select .select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-container--ewc-select .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-container--ewc-select .select2-search--dropdown.select2-search--hide{display:none}.select2-container--ewc-select .select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--ewc-select .select2-selection--single{background-color:#fff;border:1px solid #ddd;border-radius:0}.select2-container--ewc-select .select2-selection--single .select2-selection__rendered{color:#000;line-height:26px}.select2-container--ewc-select .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--ewc-select .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--ewc-select .select2-selection--single .select2-selection__arrow{background-color:#f9f9f9;border-left:1px solid #ddd;height:26px;position:absolute;top:1px;right:1px;width:22px}.select2-container--ewc-select .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--ewc-select[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--ewc-select[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--ewc-select.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--ewc-select.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--ewc-select.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2-container--ewc-select .select2-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--ewc-select .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--ewc-select .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--ewc-select .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--ewc-select .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--ewc-select .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--ewc-select .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--ewc-select .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--ewc-select.select2-container--focus .select2-selection--multiple{border:solid #000 1px;outline:0}.select2-container--ewc-select.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--ewc-select.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--ewc-select.select2-container--open.select2-container--above .select2-selection--single,.select2-container--ewc-select.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--ewc-select.select2-container--open.select2-container--below .select2-selection--single,.select2-container--ewc-select.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--ewc-select .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--ewc-select .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--ewc-select .select2-results > .select2-results__options{max-height:300px;overflow-y:auto}.select2-container--ewc-select .select2-results__option[role=group]{padding:0}.select2-container--ewc-select .select2-results__option[aria-disabled=true]{color:#999}.select2-container--ewc-select .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--ewc-select .select2-results__option .select2-results__option{padding-left:1em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--ewc-select .select2-results__option--highlighted[aria-selected]{background-color:#0073aa;color:#fff}.select2-container--ewc-select .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--ewc-select.select2-container .select2-selection:focus{border:1px solid #5b9dd9;outline:none;-webkit-box-shadow:0 0 2px rgba(30, 140, 190, .8);box-shadow:0 0 2px rgba(30, 140, 190, .8)}.select2-container--ewc-select.select2-container--open.select2-container--below .select2-selection:focus,.select2-container--ewc-select.select2-container--open.select2-container--above .select2-dropdown{border-bottom:1px solid #ddd}.select2-container--ewc-select.select2-container--open.select2-container--above .select2-selection:focus,.select2-container--ewc-select.select2-container--open.select2-container--below .select2-dropdown{border-top:1px solid #ddd}input[type=checkbox].ewc-options-checkbox{margin-bottom:1em}label.ewc-options-label{display:inline-block;margin-bottom:1.250em}input[type=checkbox] ~ .ewc-row-styles{display:none}input[type=checkbox]:checked ~ .ewc-row-styles{display:block}input[type=checkbox].ewc-label-checkbox{display:none}input[type=checkbox].ewc-background-checkbox ~ .ewc-background-settings,input[type=checkbox].ewc-margin-checkbox ~ .ewc-margin-settings,input[type=checkbox].ewc-padding-checkbox ~ .ewc-padding-settings,input[type=checkbox].ewc-class-checkbox ~ .ewc-class-settings{max-height:0;overflow:hidden;visibility:hidden;transition:max-height 0.25s ease-out, visibility 0.25s linear}input[type=checkbox].ewc-background-checkbox:checked ~ .ewc-background-settings,input[type=checkbox].ewc-margin-checkbox:checked ~ .ewc-margin-settings,input[type=checkbox].ewc-padding-checkbox:checked ~ .ewc-padding-settings,input[type=checkbox].ewc-class-checkbox:checked ~ .ewc-class-settings{max-height:50em;visibility:visible;transition:max-height 0.5s ease-in, visibility 0.5s linear}.ewc-row-styles{position:relative;border:1px solid #eee;padding:7px 10px 5px;background:#fcfcfc;margin-bottom:15px}.ewc-row-styles hr{margin:8px 0 6px}.ewc-row-styles hr:last-of-type{visibility:hidden;margin:0}.ewc-section-label{display:inline-block;margin:7px 0;font-weight:700;width:100%}.ewc-section-label:after{content:"\f140";position:absolute;right:0.5em;font:400 18px/16px dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none !important}input[type=checkbox].ewc-label-checkbox:checked + .ewc-section-label:after{content:"\f142"}.ewc-widget-table .row-content{display:inline-block;margin-right:10px}.wp-customizer .ewc-widget-table .row-content{margin-right:8px}.ewc-widget-table .row-label{display:inline-block;width:35px}.wp-customizer .ewc-widget-table .row-label{width:30px}.button.custom-media-button{margin:5px 0 8px}input.custom-media-url:invalid ~ .ewc-image-properties{display:none}.ewc-image-properties{margin-top:8px}.ewc-image-properties:after{clear:both;content:" ";display:table}.image-properties-dropdown{float:left;width:48.717948717949%;margin-left:2.5641025641026%;margin-top:0}.first.image-properties-dropdown{margin-left:0}.image-properties-dropdown select{width:100%;margin:0}.ewc-class-settings input{margin-bottom:3px}.ewc-preset-classes{background:#fff;padding:5px 5px 0;max-height:75px;overflow:hidden;overflow-y:auto;margin:7px 0 3px 0;border:1px solid #ddd;box-shadow:0 1px 2px rgba(0, 0, 0, 0.07) inset;color:#32373c}.ewc-class-settings .ewc-preset-classes input{margin-bottom:0}.ewc-preset-label{vertical-align:top}.media-modal-content .media-frame.ajv-media-frame select.attachment-filters{width:100%;max-width:100%}
  • easy-widget-columns/tags/1.2.0/easy-widget-columns.php

    r1611687 r1712728  
    1717 * Plugin URI:        http://www.alexisvillegas.com/plugins/easy-widget-columns
    1818 * Description:       Easily display widgets in rows of columns.
    19  * Version:           1.1.8
     19 * Version:           1.2.0
    2020 * Author:            Alexis J. Villegas
    2121 * Author URI:        http://www.alexisvillegas.com
  • easy-widget-columns/tags/1.2.0/includes/class-easy-widget-columns-i18n.php

    r1610881 r1712728  
    2727class Easy_Widget_Columns_i18n {
    2828
    29 
    3029    /**
    3130     * Load the plugin text domain for translation.
     
    4342    }
    4443
    45 
    46 
    4744}
  • easy-widget-columns/tags/1.2.0/includes/class-easy-widget-columns.php

    r1611687 r1712728  
    7070
    7171        $this->plugin_name = 'easy-widget-columns';
    72         $this->version = '1.1.8';
     72        $this->version = '1.2.0';
    7373        $this->load_dependencies();
    7474        $this->set_locale();
  • easy-widget-columns/tags/1.2.0/languages/easy-widget-columns.pot

    r1610881 r1712728  
    44"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
    55"Project-Id-Version: Easy Widget Columns\n"
    6 "POT-Creation-Date: 2017-02-22 15:47-0800\n"
    7 "PO-Revision-Date: 2017-02-22 15:43-0800\n"
     6"POT-Creation-Date: 2017-08-11 12:27-0700\n"
     7"PO-Revision-Date: 2017-08-11 12:27-0700\n"
    88"Last-Translator: \n"
    99"Language-Team: \n"
     
    1111"Content-Type: text/plain; charset=UTF-8\n"
    1212"Content-Transfer-Encoding: 8bit\n"
    13 "X-Generator: Poedit 1.8.12\n"
     13"X-Generator: Poedit 2.0.3\n"
    1414"X-Poedit-Basepath: ..\n"
     15"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
    1516"X-Poedit-WPHeader: easy-widget-columns.php\n"
    1617"X-Poedit-SourceCharset: UTF-8\n"
     
    9293
    9394#: admin/partials/easy-widget-columns-widget-form.php:17
    94 #: widgets/class-widget-row-divider.php:334
     95#: widgets/class-widget-row-divider.php:415
    9596msgid "None"
    9697msgstr ""
     
    128129msgstr ""
    129130
     131#: widgets/class-easy-widget-columns-widgets.php:107
     132msgid "Choose or Upload Image"
     133msgstr ""
     134
     135#: widgets/class-easy-widget-columns-widgets.php:108
     136msgid "Insert Image"
     137msgstr ""
     138
    130139#: widgets/class-widget-row-divider.php:27
    131 #: widgets/class-widget-row-divider.php:259
     140#: widgets/class-widget-row-divider.php:336
    132141msgid "Use this widget to start or close a new row of widget columns."
    133142msgstr ""
    134143
    135 #: widgets/class-widget-row-divider.php:35
     144#: widgets/class-widget-row-divider.php:57
    136145msgid "Widget Row"
    137146msgstr ""
    138147
    139 #: widgets/class-widget-row-divider.php:264
     148#: widgets/class-widget-row-divider.php:341
    140149msgid "Advanced options"
    141150msgstr ""
    142151
    143 #: widgets/class-widget-row-divider.php:269
     152#: widgets/class-widget-row-divider.php:348
    144153msgid "Row background"
    145154msgstr ""
    146155
    147 #: widgets/class-widget-row-divider.php:270
     156#: widgets/class-widget-row-divider.php:353
    148157msgid "Color:"
    149158msgstr ""
    150159
    151 #: widgets/class-widget-row-divider.php:275
     160#: widgets/class-widget-row-divider.php:357
    152161msgid "Image:"
    153162msgstr ""
    154163
    155 #: widgets/class-widget-row-divider.php:276
     164#: widgets/class-widget-row-divider.php:358
    156165msgid "Enter URL or select image"
    157166msgstr ""
    158167
    159 #: widgets/class-widget-row-divider.php:283
     168#: widgets/class-widget-row-divider.php:359
     169msgid "Select Image"
     170msgstr ""
     171
     172#: widgets/class-widget-row-divider.php:364
    160173msgid "Repeat:"
    161174msgstr ""
    162175
    163 #: widgets/class-widget-row-divider.php:286
     176#: widgets/class-widget-row-divider.php:367
    164177msgid "Tile"
    165178msgstr ""
    166179
    167 #: widgets/class-widget-row-divider.php:287
     180#: widgets/class-widget-row-divider.php:368
    168181msgid "Horizontal"
    169182msgstr ""
    170183
    171 #: widgets/class-widget-row-divider.php:288
     184#: widgets/class-widget-row-divider.php:369
    172185msgid "Vertical"
    173186msgstr ""
    174187
    175 #: widgets/class-widget-row-divider.php:289
     188#: widgets/class-widget-row-divider.php:370
    176189msgid "No Repeat"
    177190msgstr ""
    178191
    179 #: widgets/class-widget-row-divider.php:298
     192#: widgets/class-widget-row-divider.php:379
    180193msgid "Attachment:"
    181194msgstr ""
    182195
    183 #: widgets/class-widget-row-divider.php:301
     196#: widgets/class-widget-row-divider.php:382
    184197msgid "Scroll"
    185198msgstr ""
    186199
    187 #: widgets/class-widget-row-divider.php:302
     200#: widgets/class-widget-row-divider.php:383
    188201msgid "Fixed"
    189202msgstr ""
    190203
    191 #: widgets/class-widget-row-divider.php:311
     204#: widgets/class-widget-row-divider.php:392
    192205msgid "Position:"
    193206msgstr ""
    194207
    195 #: widgets/class-widget-row-divider.php:314
     208#: widgets/class-widget-row-divider.php:395
    196209msgid "Left Top"
    197210msgstr ""
    198211
    199 #: widgets/class-widget-row-divider.php:315
     212#: widgets/class-widget-row-divider.php:396
    200213msgid "Left Center"
    201214msgstr ""
    202215
    203 #: widgets/class-widget-row-divider.php:316
     216#: widgets/class-widget-row-divider.php:397
    204217msgid "Left Bottom"
    205218msgstr ""
    206219
    207 #: widgets/class-widget-row-divider.php:317
     220#: widgets/class-widget-row-divider.php:398
    208221msgid "Right Top"
    209222msgstr ""
    210223
    211 #: widgets/class-widget-row-divider.php:318
     224#: widgets/class-widget-row-divider.php:399
    212225msgid "Right Center"
    213226msgstr ""
    214227
    215 #: widgets/class-widget-row-divider.php:319
     228#: widgets/class-widget-row-divider.php:400
    216229msgid "Right Bottom"
    217230msgstr ""
    218231
    219 #: widgets/class-widget-row-divider.php:320
     232#: widgets/class-widget-row-divider.php:401
    220233msgid "Center Top"
    221234msgstr ""
    222235
    223 #: widgets/class-widget-row-divider.php:321
     236#: widgets/class-widget-row-divider.php:402
    224237msgid "Center"
    225238msgstr ""
    226239
    227 #: widgets/class-widget-row-divider.php:322
     240#: widgets/class-widget-row-divider.php:403
    228241msgid "Center Bottom"
    229242msgstr ""
    230243
    231 #: widgets/class-widget-row-divider.php:331
     244#: widgets/class-widget-row-divider.php:412
    232245msgid "Scale:"
    233246msgstr ""
    234247
    235 #: widgets/class-widget-row-divider.php:335
     248#: widgets/class-widget-row-divider.php:416
    236249msgid "Cover"
    237250msgstr ""
    238251
    239 #: widgets/class-widget-row-divider.php:336
     252#: widgets/class-widget-row-divider.php:417
    240253msgid "Contain"
    241254msgstr ""
    242255
    243 #: widgets/class-widget-row-divider.php:348
     256#: widgets/class-widget-row-divider.php:436
    244257msgid "Row margin"
    245258msgstr ""
    246259
    247 #: widgets/class-widget-row-divider.php:353
    248 #: widgets/class-widget-row-divider.php:382
     260#: widgets/class-widget-row-divider.php:442
     261#: widgets/class-widget-row-divider.php:480
    249262msgid "top:"
    250263msgstr ""
    251264
    252 #: widgets/class-widget-row-divider.php:358
    253 #: widgets/class-widget-row-divider.php:387
     265#: widgets/class-widget-row-divider.php:447
     266#: widgets/class-widget-row-divider.php:485
    254267msgid "right:"
    255268msgstr ""
    256269
    257 #: widgets/class-widget-row-divider.php:365
    258 #: widgets/class-widget-row-divider.php:394
     270#: widgets/class-widget-row-divider.php:454
     271#: widgets/class-widget-row-divider.php:492
    259272msgid "btm:"
    260273msgstr ""
    261274
    262 #: widgets/class-widget-row-divider.php:370
    263 #: widgets/class-widget-row-divider.php:399
     275#: widgets/class-widget-row-divider.php:459
     276#: widgets/class-widget-row-divider.php:497
    264277msgid "left:"
    265278msgstr ""
    266279
    267 #: widgets/class-widget-row-divider.php:377
     280#: widgets/class-widget-row-divider.php:474
    268281msgid "Row padding"
    269282msgstr ""
    270283
    271 #: widgets/class-widget-row-divider.php:409
    272 msgid "Custom classes"
    273 msgstr ""
    274 
    275 #: widgets/class-widget-row-divider.php:411
    276 msgid "Separate classes by a space."
     284#: widgets/class-widget-row-divider.php:512
     285msgid "CSS classes"
     286msgstr ""
     287
     288#: widgets/class-widget-row-divider.php:515
     289msgid "Enter custom classes"
     290msgstr ""
     291
     292#: widgets/class-widget-subrow-divider.php:28
     293#: widgets/class-widget-subrow-divider.php:72
     294msgid "Use this widget to start a new sub-row of widget columns."
     295msgstr ""
     296
     297#: widgets/class-widget-subrow-divider.php:36
     298msgid "sub-row"
    277299msgstr ""
    278300
  • easy-widget-columns/tags/1.2.0/public/class-easy-widget-columns-public.php

    r1610881 r1712728  
    8787        // Check if current locale is RTL (Right To Left)
    8888        if ( is_rtl() ) {
    89             $embedded_css = '.widget-row:after,.widget-row .wrap:after{clear:both;content:" ";display:table;}.widget-row .full-width{float:right;width:100%;}';
     89            $embedded_css = '.widget-row:after,.widget-row .wrap:after{clear:both;content:"";display:table;}.widget-row .full-width{float:right;width:100%;}';
    9090        } else {
    91             $embedded_css = '.widget-row:after,.widget-row .wrap:after{clear:both;content:" ";display:table;}.widget-row .full-width{float:left;width:100%;}';
     91            $embedded_css = '.widget-row:after,.widget-row .wrap:after{clear:both;content:"";display:table;}.widget-row .full-width{float:left;width:100%;}';
    9292        }
    9393       
  • easy-widget-columns/tags/1.2.0/uninstall.php

    r1611000 r1712728  
    3434   
    3535    global $wpdb;
    36     $blogs = $wpdb->get_results("SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A);
     36    $blogs = $wpdb->get_results( "SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A );
    3737   
    3838    delete_option( 'easy-widget-columns' );
  • easy-widget-columns/tags/1.2.0/widgets/class-easy-widget-columns-widgets.php

    r1610881 r1712728  
    6363   
    6464        /**
    65          * The class responsible for defining the Row Divider widget.
     65         * The class responsible for defining the Widget Row widget.
    6666         */
    6767        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'widgets/class-widget-row-divider.php';
     68       
     69        /**
     70         * The class responsible for defining the Sub Row widget.
     71         */
     72        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'widgets/class-widget-subrow-divider.php';
    6873   
    6974    }
     
    97102        // Image uploader
    98103        wp_enqueue_media();
    99         wp_enqueue_script( 'ajv-image-upload', plugin_dir_url( __FILE__ ) . 'js/image-upload.min.js', array( 'jquery' ), $this->version, false );
     104        wp_register_script( 'ajv-image-upload', plugin_dir_url( __FILE__ ) . 'js/image-upload.min.js', array( 'jquery' ), $this->version, false );
     105        wp_localize_script( 'ajv-image-upload', 'ajv_image_upload',
     106            array(
     107                'frame_title' => __( 'Choose or Upload Image', 'easy-widget-columns' ),
     108                'frame_button' => __( 'Insert Image', 'easy-widget-columns' ),
     109            )
     110        );
     111        wp_enqueue_script( 'ajv-image-upload' );
    100112       
    101113    }
     
    159171    public function register_widgets() {
    160172       
    161         // Register the Row Divider widget
     173        // Register the Widget Row widget
    162174        register_widget( 'EWC_Row_Divider' );
     175       
     176        // Register the Sub-Row widget
     177        register_widget( 'EWC_Sub_Row_Divider' );
    163178       
    164179    }
  • easy-widget-columns/tags/1.2.0/widgets/class-widget-row-divider.php

    r1611687 r1712728  
    3333        );
    3434       
     35        // Define options filter and default values
     36        $display = apply_filters( 'ewc_advanced_options', array(
     37            'ewc_background' => array(
     38                'display' => true,
     39                'active' => 1,
     40            ),
     41            'ewc_margin' => array(
     42                'display' => true,
     43                'active' => 0,
     44            ),
     45            'ewc_padding' => array(
     46                'display' => true,
     47                'active' => 0,
     48            ),
     49            'ewc_class' => array(
     50                'display' => true,
     51                'active' => 0,
     52            ),
     53        ) );
     54       
     55        $this->display = $display;
     56       
    3557        parent::__construct( 'ewc-row-divider', '&#8212; ' . __( 'Widget Row', 'easy-widget-columns' ) . ' &#8212;', $widget_ops, $control_ops );
    3658       
     
    6789       
    6890        // Background color
    69         if ( !empty( $instance['background_color'] ) ) {
     91        if ( !empty( $instance['background_color'] )
     92            && ( !empty( $this->display['ewc_background']['display'] ) && true === $this->display['ewc_background']['display'] ) ) {
    7093            $background_color = $instance['background_color'];
    7194        } else {
     
    7497       
    7598        // Background image
    76         if ( !empty( $instance['background_image'] ) ) {
     99        if ( !empty( $instance['background_image'] )
     100            && ( !empty( $this->display['ewc_background']['display'] ) && true === $this->display['ewc_background']['display'] ) ) {
    77101            $background_image = ' ' . "url('" . $instance['background_image'] . "')";
    78102        } else {
     
    81105       
    82106        // Background repeat
    83         if ( !empty( $instance['background_repeat'] ) ) {
     107        if ( !empty( $instance['background_repeat'] )
     108            && ( !empty( $this->display['ewc_background']['display'] ) && true === $this->display['ewc_background']['display'] ) ) {
    84109            $background_repeat = ' ' . $instance['background_repeat'];
    85110        } else {
     
    88113       
    89114        // Background attachment
    90         if ( !empty( $instance['background_attachment'] ) ) {
     115        if ( !empty( $instance['background_attachment'] )
     116            && ( !empty( $this->display['ewc_background']['display'] ) && true === $this->display['ewc_background']['display'] ) ) {
    91117            $background_attachment = ' ' . $instance['background_attachment'];
    92118        } else {
     
    95121       
    96122        // Background position
    97         if ( !empty( $instance['background_position'] ) ) {
     123        if ( !empty( $instance['background_position'] )
     124            && ( !empty( $this->display['ewc_background']['display'] ) && true === $this->display['ewc_background']['display'] ) ) {
    98125            $background_position = ' ' . $instance['background_position'];
    99126        } else {
     
    102129       
    103130        // Background size
    104         if ( !empty( $instance['background_size'] ) && 'none' !== $instance['background_size'] ) {
     131        if ( !empty( $instance['background_size'] ) && 'none' !== $instance['background_size']
     132            && ( !empty( $this->display['ewc_background']['display'] ) && true === $this->display['ewc_background']['display'] ) ) {
    105133            $background_size = 'background-size:' . $instance['background_size'] . ';';
    106134        } else {
     
    113141        $padding_bottom = $instance['padding_bottom'];
    114142        $padding_left = $instance['padding_left'];
    115         $padding = 'padding:' . $padding_top . 'px ' . $padding_right . 'px ' . $padding_bottom . 'px ' . $padding_left . 'px;';
    116         if ( 'padding:0px 0px 0px 0px;' == $padding ) {
    117             $padding = '';
    118         }
    119        
     143        if ( ( !empty( $this->display['ewc_padding']['display'] ) && true === $this->display['ewc_padding']['display'] ) ) {
     144            $padding = 'padding:' . $padding_top . 'px ' . $padding_right . 'px ' . $padding_bottom . 'px ' . $padding_left . 'px;';
     145            if ( 'padding:0px 0px 0px 0px;' == $padding ) {
     146                $padding = '';
     147            }
     148        } else {
     149            $padding = '';
     150        }
     151       
    120152        // Margin
    121153        $margin_top = $instance['margin_top'];
     
    123155        $margin_bottom = $instance['margin_bottom'];
    124156        $margin_left = $instance['margin_left'];
    125         $margin = 'margin:' . $margin_top . 'px ' . $margin_right . 'px ' . $margin_bottom . 'px ' . $margin_left . 'px;';
    126         if ( 'margin:0px 0px 0px 0px;' == $margin ) {
    127             $margin = '';
    128         }
     157        if ( ( !empty( $this->display['ewc_margin']['display'] ) && true === $this->display['ewc_margin']['display'] ) ) {
     158            $margin = 'margin:' . $margin_top . 'px ' . $margin_right . 'px ' . $margin_bottom . 'px ' . $margin_left . 'px;';
     159            if ( 'margin:0px 0px 0px 0px;' == $margin ) {
     160                $margin = '';
     161            }
     162        } else {
     163            $margin = '';
     164        }
    129165       
    130166        // Inline styles
     
    145181       
    146182        // Custom Classes
    147         if ( !empty( $instance['custom_classes'] ) ) {
    148             $custom_classes = ' ' . $instance['custom_classes'];
     183        if ( ( !empty( $instance['custom_classes'] ) || !empty( $instance['preset_classes'] ) )
     184            && ( !empty( $this->display['ewc_class']['display'] ) && true === $this->display['ewc_class']['display'] ) ) {
     185           
     186            // Merge preset classes with custom classes
     187            if ( !empty( $instance['preset_classes'] ) && is_array( $instance['preset_classes'] ) ) {
     188                $custom_classes = explode( ' ', $instance['custom_classes'] );
     189                foreach ( $instance['preset_classes'] as $key => $value ) {
     190                    if ( !in_array( $value, $custom_classes ) ) {
     191                        $custom_classes[] = $value;
     192                    }
     193                }
     194                $custom_classes = ' ' . implode( ' ', $custom_classes );
     195            } else {
     196                $custom_classes = ' ' . $instance['custom_classes'];
     197            }
     198           
    149199        } else {
    150200            $custom_classes = '';
     
    163213       
    164214        // Assign the closing widget row markup
    165         if ( isset( $sidebar_id[$position_id-1] ) && !in_array( _get_widget_id_base( $sidebar_id[$position_id-1] ), array('ewc-row-divider') ) ) {
     215        if ( isset( $sidebar_id[$position_id-1] )
     216            && !in_array( _get_widget_id_base( $sidebar_id[$position_id-1] ), array( 'ewc-row-divider', 'ewc-subrow-divider' ) ) ) {
    166217           
    167218            // Get widget above options
     
    183234       
    184235        // Assign the opening widget row markup
    185         if ( isset( $sidebar_id[$position_id+1] ) && !in_array( _get_widget_id_base( $sidebar_id[$position_id+1] ), array('ewc-row-divider') ) ) {
     236        if ( isset( $sidebar_id[$position_id+1] )
     237            && !in_array( _get_widget_id_base( $sidebar_id[$position_id+1] ), array( 'ewc-row-divider', 'ewc-subrow-divider' ) ) ) {
    186238           
    187239            // Get widget below options
     
    218270        $instance = $old_instance;
    219271        $instance['show_options'] = strip_tags( $new_instance['show_options'] );
     272        $instance['show_background'] = strip_tags( $new_instance['show_background'] );
     273        $instance['show_margin'] = strip_tags( $new_instance['show_margin'] );
     274        $instance['show_padding'] = strip_tags( $new_instance['show_padding'] );
     275        $instance['show_class'] = strip_tags( $new_instance['show_class'] );
    220276        $instance['background_color'] = strip_tags( sanitize_hex_color( $new_instance['background_color'] ) );
    221277        $instance['background_image'] = esc_url( $new_instance['background_image'] );
     
    232288        $instance['margin_bottom'] = absint( $new_instance['margin_bottom'] );
    233289        $instance['margin_left'] = absint( $new_instance['margin_left'] );
    234         $instance['custom_classes'] = strip_tags( $new_instance['custom_classes'] );
     290        $instance['custom_classes'] = strip_tags( preg_replace( array( '/\s*,\s*/', '/\s+/' ), ' ', $new_instance['custom_classes'] ) );
     291        $instance['preset_classes'] = array_map( 'strip_tags', $new_instance['preset_classes'] );
    235292       
    236293        return $instance;
     
    245302    public function form( $instance ) {
    246303       
     304        // Sanitize filter values
     305        $show_background = !empty( $this->display['ewc_background']['active'] ) ? $this->display['ewc_background']['active'] : 0;
     306        $show_margin = !empty( $this->display['ewc_margin']['active'] ) ? $this->display['ewc_margin']['active'] : 0;
     307        $show_padding = !empty( $this->display['ewc_padding']['active'] ) ? $this->display['ewc_padding']['active'] : 0;
     308        $show_class = !empty( $this->display['ewc_class']['active'] ) ? $this->display['ewc_class']['active'] : 0;
     309       
     310        // Set widget default values
    247311        $defaults = array(
    248312            'show_options' => 0,
     313            'show_background' => $show_background,
     314            'show_margin' => $show_margin,
     315            'show_padding' => $show_padding,
     316            'show_class' => $show_class,
    249317            'background_color' => '',
    250318            'background_image' => '',
     
    262330            'margin_left' => 0,
    263331            'custom_classes' => '',
     332            'preset_classes' => array(),
    264333        );
    265         $instance = wp_parse_args( (array) $instance, $defaults ); ?>
    266        
    267         <p><?php _e('Use this widget to start or close a new row of widget columns.', 'easy-widget-columns'); ?></p> <?php
     334        $instance = wp_parse_args( (array) $instance, $defaults );  ?>
     335       
     336        <p><?php _e( 'Use this widget to start or close a new row of widget columns.', 'easy-widget-columns' ); ?></p> <?php
    268337       
    269338        if ( apply_filters( 'ewc_advanced_options', true ) ) { ?>
    270339       
    271             <input class="ewc-options-checkbox" id="<?php echo $this->get_field_id( 'show_options' ); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_options'); ?>" value="1" <?php checked( 1, $instance['show_options'] ); ?>/>
     340            <input type="checkbox" class="ewc-options-checkbox" id="<?php echo $this->get_field_id( 'show_options' ); ?>" name="<?php echo $this->get_field_name('show_options'); ?>" value="1" <?php checked( 1, $instance['show_options'] ); ?>/>
    272341            <label class="ewc-options-label" for="<?php echo $this->get_field_id( 'show_options' ); ?>"><?php _e( 'Advanced options', 'easy-widget-columns' ); ?></label>
    273342           
    274             <div class="ewc-row-styles">
    275                
    276                 <p>
    277                     <label class="ewc-section-label" for="<?php echo $this->get_field_id( 'background_color' ); ?>"><?php _e( 'Row background', 'easy-widget-columns' ); ?></label><br>
    278                     <label for="<?php echo $this->get_field_id( 'background_color' ); ?>"><?php _e( 'Color:', 'easy-widget-columns' ); ?></label><br />
    279                     <input class="color-picker" id="<?php echo $this->get_field_id( 'background_color' ); ?>" name="<?php echo $this->get_field_name( 'background_color' ); ?>" type="text" value="<?php echo $instance['background_color']; ?>" data-default-color=""/>
    280                 </p>
    281                
    282                 <p>
    283                     <label for="<?php echo $this->get_field_id( 'background_image' ); ?>"><?php _e( 'Image:', 'easy-widget-columns' ); ?></label>
    284                     <input type="text" class="widefat custom-media-url" name="<?php echo $this->get_field_name( 'background_image' ); ?>" id="<?php echo $this->get_field_id('background_image'); ?>" value="<?php echo $instance['background_image']; ?>" placeholder="<?php _e( 'Enter URL or select image', 'easy-widget-columns' ); ?>">
    285                     <input type="button" class="button custom-media-button" name="<?php echo $this->get_field_name( 'background_image' ); ?>" value="Select Image" style="margin-top:5px;" />
    286                 </p>
    287                
    288                 <span class="ewc-image-properties">
    289                    
    290                     <p class="first image-properties-dropdown">
    291                         <label for="<?php echo $this->get_field_id( 'background_repeat' ); ?>"><?php _e( 'Repeat:' ); ?></label><br />
    292                         <select id="<?php echo $this->get_field_id( 'background_repeat' ); ?>" name="<?php echo $this->get_field_name( 'background_repeat' ); ?>"> <?php
    293                             $repeat_options = array(
    294                                 __( 'Tile', 'easy-widget-columns' ) => 'repeat',
    295                                 __( 'Horizontal', 'easy-widget-columns' ) => 'repeat-x',
    296                                 __( 'Vertical', 'easy-widget-columns' ) => 'repeat-y',
    297                                 __( 'No Repeat', 'easy-widget-columns' ) => 'no-repeat',
    298                             );
    299                             foreach ( $repeat_options as $key => $value ) {
    300                                 echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_repeat'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
    301                             } ?>
    302                         </select>
     343            <div class="ewc-row-styles"> <?php
     344       
     345                if ( !empty( $this->display['ewc_background']['display'] ) && true === $this->display['ewc_background']['display'] ) { ?>
     346               
     347                <input type="checkbox" class="ewc-label-checkbox ewc-background-checkbox" id="<?php echo $this->get_field_id( 'show_background' ); ?>" name="<?php echo $this->get_field_name('show_background'); ?>" value="1" <?php checked( 1, $instance['show_background'] ); ?>/>
     348                <label class="ewc-section-label ewc-background-label" for="<?php echo $this->get_field_id( 'show_background' ); ?>"><?php _e( 'Row background', 'easy-widget-columns' ); ?></label>
     349               
     350                <div class="ewc-section-settings ewc-background-settings">
     351               
     352                    <p style="margin-top:2px;">
     353                        <label for="<?php echo $this->get_field_id( 'background_color' ); ?>"><?php _e( 'Color:', 'easy-widget-columns' ); ?></label><br />
     354                        <input class="color-picker" id="<?php echo $this->get_field_id( 'background_color' ); ?>" name="<?php echo $this->get_field_name( 'background_color' ); ?>" type="text" value="<?php echo $instance['background_color']; ?>" data-default-color=""/>
    303355                    </p>
    304356                   
    305                     <p class="image-properties-dropdown">
    306                         <label for="<?php echo $this->get_field_id( 'background_attachment' ); ?>"><?php _e( 'Attachment:' ); ?></label><br />
    307                         <select id="<?php echo $this->get_field_id( 'background_attachment' ); ?>" name="<?php echo $this->get_field_name( 'background_attachment' ); ?>"> <?php
    308                             $attachment_options = array(
    309                                 __( 'Scroll', 'easy-widget-columns' ) => 'scroll',
    310                                 __( 'Fixed', 'easy-widget-columns' ) => 'fixed',
    311                             );
    312                             foreach ( $attachment_options as $key => $value ) {
    313                                 echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_attachment'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
     357                    <label for="<?php echo $this->get_field_id( 'background_image' ); ?>"><?php _e( 'Image:', 'easy-widget-columns' ); ?></label>
     358                    <input required type="text" class="widefat custom-media-url" name="<?php echo $this->get_field_name( 'background_image' ); ?>" id="<?php echo $this->get_field_id('background_image'); ?>" value="<?php echo $instance['background_image']; ?>" placeholder="<?php _e( 'Enter URL or select image', 'easy-widget-columns' ); ?>"/>
     359                    <button type="button" class="button custom-media-button" id="<?php echo $this->get_field_id('media_button'); ?>" name="<?php echo $this->get_field_name( 'background_image' ); ?>"><?php _e( 'Select Image', 'easy-widget-columns' ); ?></button>
     360                   
     361                    <div class="ewc-image-properties">
     362                       
     363                        <p class="first image-properties-dropdown">
     364                            <label for="<?php echo $this->get_field_id( 'background_repeat' ); ?>"><?php _e( 'Repeat:' ); ?></label><br />
     365                            <select id="<?php echo $this->get_field_id( 'background_repeat' ); ?>" name="<?php echo $this->get_field_name( 'background_repeat' ); ?>"> <?php
     366                                $repeat_options = array(
     367                                    __( 'Tile', 'easy-widget-columns' ) => 'repeat',
     368                                    __( 'Horizontal', 'easy-widget-columns' ) => 'repeat-x',
     369                                    __( 'Vertical', 'easy-widget-columns' ) => 'repeat-y',
     370                                    __( 'No Repeat', 'easy-widget-columns' ) => 'no-repeat',
     371                                );
     372                                foreach ( $repeat_options as $key => $value ) {
     373                                    echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_repeat'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
     374                                } ?>
     375                            </select>
     376                        </p>
     377                       
     378                        <p class="image-properties-dropdown">
     379                            <label for="<?php echo $this->get_field_id( 'background_attachment' ); ?>"><?php _e( 'Attachment:' ); ?></label><br />
     380                            <select id="<?php echo $this->get_field_id( 'background_attachment' ); ?>" name="<?php echo $this->get_field_name( 'background_attachment' ); ?>"> <?php
     381                                $attachment_options = array(
     382                                    __( 'Scroll', 'easy-widget-columns' ) => 'scroll',
     383                                    __( 'Fixed', 'easy-widget-columns' ) => 'fixed',
     384                                );
     385                                foreach ( $attachment_options as $key => $value ) {
     386                                    echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_attachment'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
     387                                } ?>
     388                            </select>
     389                        </p>
     390                       
     391                        <p class="first image-properties-dropdown">
     392                            <label for="<?php echo $this->get_field_id( 'background_position' ); ?>"><?php _e( 'Position:' ); ?></label><br />
     393                            <select id="<?php echo $this->get_field_id( 'background_position' ); ?>" name="<?php echo $this->get_field_name( 'background_position' ); ?>"> <?php
     394                                $position_options = array(
     395                                    __( 'Left Top', 'easy-widget-columns' ) => 'left top',
     396                                    __( 'Left Center', 'easy-widget-columns' ) => 'left center',
     397                                    __( 'Left Bottom', 'easy-widget-columns' ) => 'left bottom',
     398                                    __( 'Right Top', 'easy-widget-columns' ) => 'right top',
     399                                    __( 'Right Center', 'easy-widget-columns' ) => 'right center',
     400                                    __( 'Right Bottom', 'easy-widget-columns' ) => 'right bottom',
     401                                    __( 'Center Top', 'easy-widget-columns' ) => 'center top',
     402                                    __( 'Center', 'easy-widget-columns' ) => 'center center',
     403                                    __( 'Center Bottom', 'easy-widget-columns' ) => 'center bottom',
     404                                );
     405                                foreach ( $position_options as $key => $value ) {
     406                                    echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_position'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
     407                                } ?>
     408                            </select>
     409                        </p>
     410                       
     411                        <p class="image-properties-dropdown">
     412                            <label for="<?php echo $this->get_field_id( 'background_size' ); ?>"><?php _e( 'Scale:' ); ?></label><br />
     413                            <select id="<?php echo $this->get_field_id( 'background_size' ); ?>" name="<?php echo $this->get_field_name( 'background_size' ); ?>"> <?php
     414                                $size_options = array(
     415                                    __( 'None', 'easy-widget-columns' ) => 'none',
     416                                    __( 'Cover', 'easy-widget-columns' ) => 'cover',
     417                                    __( 'Contain', 'easy-widget-columns' ) => 'contain',
     418                                );
     419                                foreach ( $size_options as $key => $value ) {
     420                                    echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_size'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
     421                                } ?>
     422                            </select>
     423                        </p>
     424                       
     425                    </div>
     426                   
     427                </div>
     428               
     429                <hr> <?php
     430               
     431                }
     432               
     433                if ( !empty( $this->display['ewc_margin']['display'] ) && true === $this->display['ewc_margin']['display'] ) { ?>
     434               
     435                <input type="checkbox" class="ewc-label-checkbox ewc-margin-checkbox" id="<?php echo $this->get_field_id( 'show_margin' ); ?>" name="<?php echo $this->get_field_name('show_margin'); ?>" value="1" <?php checked( 1, $instance['show_margin'] ); ?>/>
     436                <label class="ewc-section-label" for="<?php echo $this->get_field_id( 'show_margin' ); ?>"><?php _e('Row margin', 'easy-widget-columns'); ?></label>
     437               
     438                <div class="ewc-section-settings ewc-widget-table ewc-margin-settings">
     439                    <table class="ewc-margin-table">
     440                        <tr>
     441                            <td class="row-content">
     442                                <label class="row-label" for="<?php echo $this->get_field_id( 'margin_top' ); ?>"><?php _e( 'top:', 'easy-widget-columns' ); ?></label>
     443                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_top' ); ?>" name="<?php echo $this->get_field_name( 'margin_top' ); ?>" value="<?php echo $instance['margin_top']; ?>" style="width:50px;"/>
     444                                <label for="<?php echo $this->get_field_id( 'margin_top' ); ?>">px</label>
     445                            </td>
     446                            <td class="row-content">
     447                                <label class="row-label" for="<?php echo $this->get_field_id( 'margin_right' ); ?>"><?php _e( 'right:', 'easy-widget-columns' ); ?></label>
     448                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_right' ); ?>" name="<?php echo $this->get_field_name( 'margin_right' ); ?>" value="<?php echo $instance['margin_right']; ?>" style="width:50px;"/>
     449                                <label for="<?php echo $this->get_field_id( 'margin_right' ); ?>">px</label>
     450                            </td>
     451                        </tr>
     452                        <tr>
     453                            <td class="row-content">
     454                                <label class="row-label" for="<?php echo $this->get_field_id( 'margin_bottom' ); ?>"><?php _e( 'btm:', 'easy-widget-columns' ); ?></label>
     455                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_bottom' ); ?>" name="<?php echo $this->get_field_name( 'margin_bottom' ); ?>" value="<?php echo $instance['margin_bottom']; ?>" style="width:50px;"/>
     456                                <label for="<?php echo $this->get_field_id( 'margin_bottom' ); ?>">px</label>
     457                            </td>
     458                            <td class="row-content">
     459                                <label class="row-label" for="<?php echo $this->get_field_id( 'margin_left' ); ?>"><?php _e( 'left:', 'easy-widget-columns' ); ?></label>
     460                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_left' ); ?>" name="<?php echo $this->get_field_name( 'margin_left' ); ?>" value="<?php echo $instance['margin_left']; ?>" style="width:50px;"/>
     461                                <label for="<?php echo $this->get_field_id( 'margin_left' ); ?>">px</label>
     462                            </td>
     463                        </tr>
     464                    </table>
     465                </div>
     466               
     467                <hr> <?php
     468               
     469                }
     470               
     471                if ( !empty( $this->display['ewc_padding']['display'] ) && true === $this->display['ewc_padding']['display'] ) { ?>
     472               
     473                <input type="checkbox" class="ewc-label-checkbox ewc-padding-checkbox" id="<?php echo $this->get_field_id( 'show_padding' ); ?>" name="<?php echo $this->get_field_name('show_padding'); ?>" value="1" <?php checked( 1, $instance['show_padding'] ); ?>/>
     474                <label class="ewc-section-label" for="<?php echo $this->get_field_id( 'show_padding' ); ?>"><?php _e( 'Row padding', 'easy-widget-columns' ); ?></label>
     475               
     476                <div class="ewc-section-settings ewc-widget-table ewc-padding-settings">
     477                    <table class="ewc-padding-table">
     478                        <tr>
     479                            <td class="row-content">
     480                                <label class="row-label" for="<?php echo $this->get_field_id( 'padding_top' ); ?>"><?php _e( 'top:', 'easy-widget-columns' ); ?></label>
     481                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_top' ); ?>" name="<?php echo $this->get_field_name( 'padding_top' ); ?>" value="<?php echo $instance['padding_top']; ?>" style="width:50px;"/>
     482                                <label for="<?php echo $this->get_field_id( 'padding_top' ); ?>">px</label>
     483                            </td>
     484                            <td class="row-content">
     485                                <label class="row-label" for="<?php echo $this->get_field_id( 'padding_right' ); ?>"><?php _e( 'right:', 'easy-widget-columns' ); ?></label>
     486                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_right' ); ?>" name="<?php echo $this->get_field_name( 'padding_right' ); ?>" value="<?php echo $instance['padding_right']; ?>" style="width:50px;"/>
     487                                <label for="<?php echo $this->get_field_id( 'padding_right' ); ?>">px</label>
     488                            </td>
     489                        </tr>
     490                        <tr>
     491                            <td class="row-content">
     492                                <label class="row-label" for="<?php echo $this->get_field_id( 'padding_bottom' ); ?>"><?php _e( 'btm:', 'easy-widget-columns' ); ?></label>
     493                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_bottom' ); ?>" name="<?php echo $this->get_field_name( 'padding_bottom' ); ?>" value="<?php echo $instance['padding_bottom']; ?>" style="width:50px;"/>
     494                                <label for="<?php echo $this->get_field_id( 'padding_bottom' ); ?>">px</label>
     495                            </td>
     496                            <td class="row-content">
     497                                <label class="row-label" for="<?php echo $this->get_field_id( 'padding_left' ); ?>"><?php _e( 'left:', 'easy-widget-columns' ); ?></label>
     498                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_left' ); ?>" name="<?php echo $this->get_field_name( 'padding_left' ); ?>" value="<?php echo $instance['padding_left']; ?>" style="width:50px;"/>
     499                                <label for="<?php echo $this->get_field_id( 'padding_left' ); ?>">px</label>
     500                            </td>
     501                        </tr>
     502                    </table>
     503                </div>
     504               
     505                <hr> <?php
     506               
     507                }
     508               
     509                if ( !empty( $this->display['ewc_class']['display'] ) && true === $this->display['ewc_class']['display'] ) { ?>
     510               
     511                <input type="checkbox" class="ewc-label-checkbox ewc-class-checkbox" id="<?php echo $this->get_field_id( 'show_class' ); ?>" name="<?php echo $this->get_field_name('show_class'); ?>" value="1" <?php checked( 1, $instance['show_class'] ); ?>/>
     512                <label class="ewc-section-label" for="<?php echo $this->get_field_id( 'show_class' ); ?>"><?php _e( 'CSS classes', 'easy-widget-columns' ); ?></label>
     513               
     514                <div class="ewc-section-settings ewc-class-settings">
     515                    <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'custom_classes' ); ?>" name="<?php echo $this->get_field_name( 'custom_classes' ); ?>" value="<?php echo $instance['custom_classes']; ?>" placeholder="<?php _e( 'Enter custom classes', 'easy-widget-columns' ); ?>"/> <?php
     516                    $presets = apply_filters( 'ewc_preset_classes', array() );
     517                   
     518                    if ( !empty( $presets ) ) { ?>
     519                   
     520                        <ul class="ewc-preset-classes" id="<?php echo $this->get_field_id( 'preset_classes' ); ?>"> <?php
     521                           
     522                            foreach ( $presets as $preset ) {
     523                                $checked = '';
     524                                if ( isset( $instance['preset_classes'] ) && in_array( $preset, $instance['preset_classes'] ) ) {
     525                                    $checked = 'checked="checked"';
     526                                } ?>
     527                                <li>
     528                                    <input type="checkbox" class="ewc-preset-class" id="<?php echo $this->get_field_id( 'preset_classes' ) . '-' . $preset; ?>" name="<?php echo $this->get_field_name('preset_classes'); ?>[]" value="<?php echo $preset; ?>" <?php echo $checked; ?>/>
     529                                    <label class="ewc-preset-label" for="<?php echo $this->get_field_id( 'preset_classes' ) . '-' . $preset; ?>"><?php echo $preset; ?></label>
     530                                </li> <?php
    314531                            } ?>
    315                         </select>
    316                     </p>
    317                    
    318                     <p class="first image-properties-dropdown">
    319                         <label for="<?php echo $this->get_field_id( 'background_position' ); ?>"><?php _e( 'Position:' ); ?></label><br />
    320                         <select id="<?php echo $this->get_field_id( 'background_position' ); ?>" name="<?php echo $this->get_field_name( 'background_position' ); ?>"> <?php
    321                             $position_options = array(
    322                                 __( 'Left Top', 'easy-widget-columns' ) => 'left top',
    323                                 __( 'Left Center', 'easy-widget-columns' ) => 'left center',
    324                                 __( 'Left Bottom', 'easy-widget-columns' ) => 'left bottom',
    325                                 __( 'Right Top', 'easy-widget-columns' ) => 'right top',
    326                                 __( 'Right Center', 'easy-widget-columns' ) => 'right center',
    327                                 __( 'Right Bottom', 'easy-widget-columns' ) => 'right bottom',
    328                                 __( 'Center Top', 'easy-widget-columns' ) => 'center top',
    329                                 __( 'Center', 'easy-widget-columns' ) => 'center center',
    330                                 __( 'Center Bottom', 'easy-widget-columns' ) => 'center bottom',
    331                             );
    332                             foreach ( $position_options as $key => $value ) {
    333                                 echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_position'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
     532                           
     533                        </ul> <?php
     534                           
     535                        if ( 0 != count( $instance['preset_classes'] ) ) {
     536                           
     537                            if ( 1 == count( $instance['preset_classes'] ) ) {
     538                                $count_message = ' class checked above';
     539                            } else {
     540                                $count_message = ' classes checked above';
    334541                            } ?>
    335                         </select>
    336                     </p>
    337                    
    338                     <p class="image-properties-dropdown">
    339                         <label for="<?php echo $this->get_field_id( 'background_size' ); ?>"><?php _e( 'Scale:' ); ?></label><br />
    340                         <select id="<?php echo $this->get_field_id( 'background_size' ); ?>" name="<?php echo $this->get_field_name( 'background_size' ); ?>"> <?php
    341                             $size_options = array(
    342                                 __( 'None', 'easy-widget-columns' ) => 'none',
    343                                 __( 'Cover', 'easy-widget-columns' ) => 'cover',
    344                                 __( 'Contain', 'easy-widget-columns' ) => 'contain',
    345                             );
    346                             foreach ( $size_options as $key => $value ) {
    347                                 echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_size'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
    348                             } ?>
    349                         </select>
    350                     </p>
    351                    
    352                 </span>
    353                
    354                 <hr>
    355                
    356                 <label class="ewc-section-label" style="margin-top:7px;"><?php _e('Row margin', 'easy-widget-columns'); ?></label>
    357                
    358                 <table class="ewc-widget-table">
    359                     <tr>
    360                         <td class="row-content">
    361                             <label class="row-label" for="<?php echo $this->get_field_id( 'margin_top' ); ?>"><?php _e( 'top:', 'easy-widget-columns' ); ?></label>
    362                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_top' ); ?>" name="<?php echo $this->get_field_name( 'margin_top' ); ?>" value="<?php echo $instance['margin_top']; ?>" style="width:50px;" />
    363                             <label for="<?php echo $this->get_field_id( 'margin_top' ); ?>">px</label>
    364                         </td>
    365                         <td class="row-content">
    366                             <label class="row-label" for="<?php echo $this->get_field_id( 'margin_right' ); ?>"><?php _e( 'right:', 'easy-widget-columns' ); ?></label>
    367                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_right' ); ?>" name="<?php echo $this->get_field_name( 'margin_right' ); ?>" value="<?php echo $instance['margin_right']; ?>" style="width:50px;" />
    368                             <label for="<?php echo $this->get_field_id( 'margin_right' ); ?>">px</label>
    369                         </td>
    370                     </tr>
    371                     <tr>
    372                         <td class="row-content">
    373                             <label class="row-label" for="<?php echo $this->get_field_id( 'margin_bottom' ); ?>"><?php _e( 'btm:', 'easy-widget-columns' ); ?></label>
    374                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_bottom' ); ?>" name="<?php echo $this->get_field_name( 'margin_bottom' ); ?>" value="<?php echo $instance['margin_bottom']; ?>" style="width:50px;" />
    375                             <label for="<?php echo $this->get_field_id( 'margin_bottom' ); ?>">px</label>
    376                         </td>
    377                         <td class="row-content">
    378                             <label class="row-label" for="<?php echo $this->get_field_id( 'margin_left' ); ?>"><?php _e( 'left:', 'easy-widget-columns' ); ?></label>
    379                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_left' ); ?>" name="<?php echo $this->get_field_name( 'margin_left' ); ?>" value="<?php echo $instance['margin_left']; ?>" style="width:50px;" />
    380                             <label for="<?php echo $this->get_field_id( 'margin_left' ); ?>">px</label>
    381                         </td>
    382                     </tr>
    383                 </table>
    384                
    385                 <hr><label class="ewc-section-label" style="margin-top:7px;"><?php _e( 'Row padding', 'easy-widget-columns' ); ?></label>
    386                
    387                 <table class="ewc-widget-table">
    388                     <tr>
    389                         <td class="row-content">
    390                             <label class="row-label" for="<?php echo $this->get_field_id( 'padding_top' ); ?>"><?php _e( 'top:', 'easy-widget-columns' ); ?></label>
    391                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_top' ); ?>" name="<?php echo $this->get_field_name( 'padding_top' ); ?>" value="<?php echo $instance['padding_top']; ?>" style="width:50px;" />
    392                             <label for="<?php echo $this->get_field_id( 'padding_top' ); ?>">px</label>
    393                         </td>
    394                         <td class="row-content">
    395                             <label class="row-label" for="<?php echo $this->get_field_id( 'padding_right' ); ?>"><?php _e( 'right:', 'easy-widget-columns' ); ?></label>
    396                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_right' ); ?>" name="<?php echo $this->get_field_name( 'padding_right' ); ?>" value="<?php echo $instance['padding_right']; ?>" style="width:50px;" />
    397                             <label for="<?php echo $this->get_field_id( 'padding_right' ); ?>">px</label>
    398                         </td>
    399                     </tr>
    400                     <tr>
    401                         <td class="row-content">
    402                             <label class="row-label" for="<?php echo $this->get_field_id( 'padding_bottom' ); ?>"><?php _e( 'btm:', 'easy-widget-columns' ); ?></label>
    403                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_bottom' ); ?>" name="<?php echo $this->get_field_name( 'padding_bottom' ); ?>" value="<?php echo $instance['padding_bottom']; ?>" style="width:50px;" />
    404                             <label for="<?php echo $this->get_field_id( 'padding_bottom' ); ?>">px</label>
    405                         </td>
    406                         <td class="row-content">
    407                             <label class="row-label" for="<?php echo $this->get_field_id( 'padding_left' ); ?>"><?php _e( 'left:', 'easy-widget-columns' ); ?></label>
    408                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_left' ); ?>" name="<?php echo $this->get_field_name( 'padding_left' ); ?>" value="<?php echo $instance['padding_left']; ?>" style="width:50px;" />
    409                             <label for="<?php echo $this->get_field_id( 'padding_left' ); ?>">px</label>
    410                         </td>
    411                     </tr>
    412                 </table>
    413                
    414                 <hr>
    415                
    416                 <p>
    417                     <label class="ewc-section-label" for="<?php echo $this->get_field_id( 'custom_classes' ); ?>"><?php _e( 'Custom classes', 'easy-widget-columns' ); ?></label>
    418                     <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'custom_classes' ); ?>" name="<?php echo $this->get_field_name( 'custom_classes' ); ?>" value="<?php echo $instance['custom_classes']; ?>" />
    419                     <span class="description" style="padding-left:2px;"><em><?php _e( 'Separate classes by a space.', 'easy-widget-columns' ) ?></em></span>
    420                 </p>
     542                       
     543                            <p class="checked-count description" style="padding-bottom:0;">
     544                                <?php echo count( $instance['preset_classes'] ) . $count_message; ?>
     545                            </p> <?php
     546                       
     547                        }
     548                       
     549                    } ?>
     550                </div>
     551               
     552                <hr> <?php
     553               
     554                } ?>
    421555                               
    422556            </div> <?php
  • easy-widget-columns/tags/1.2.0/widgets/js/image-upload.js

    r1610881 r1712728  
    55 * in the Row Divider widget.
    66 *
    7  * @since      1.1.5
     7 * @since   1.1.5
    88 *
    99 */
     
    1616        var media_frame;
    1717       
     18        // Prepare the variable that holds our custom input field ID.
     19        var target_input;
     20       
    1821        // Bind to our click event in order to open up the new media experience.
    19         $( document.body ).on( 'click.ewcOpenMediaManager', '.custom-media-button', function( e ) {
     22        $( document.body ).on( 'click.ajvOpenMediaManager', '.custom-media-button', function( e ) {
    2023           
    2124            // Prevent the default action from occuring.
    2225            e.preventDefault();
    23    
    24             // If the frame already exists, re-open it.
    25             if ( media_frame ) {
    26                 media_frame.open();
    27                 return;
    28             }
    29    
    30             //Create custom media frame. Refer to the wp-includes/js/media-views.js file for more default options.
     26           
     27            // Get our custom input field ID.
     28            var target_input = $( this ).prev().attr( 'id' );
     29           
     30            // Create custom media frame. Refer to the wp-includes/js/media-views.js file for more default options.
    3131            media_frame = wp.media.frames.media_frame = wp.media( {
    3232               
    3333                // Custom class name for our media frame.
    34                 className: 'media-frame ewc-media-frame',
     34                className: 'media-frame ajv-media-frame',
    3535                // Assign 'select' workflow since we only want to upload an image. Use the 'post' workflow for posts.
    3636                frame: 'select',
    3737                // Allow mutiple file uploads.
    3838                multiple: false,
    39                 // Set custom media workflow title using the localized script object 'widget_script_handle'.
    40                 title: 'Choose or Upload Image',
     39                // Set custom media workflow title using the localized script object 'ajv_image_upload'.
     40                title: ajv_image_upload.frame_title,
    4141                // Limit media library access to images only.
    4242                library: {
    4343                    type: 'image'
    4444                },
    45                 // Set custom button text using the localized script object 'widget_script_handle'.
     45                // Set custom button text using the localized script object 'ajv_image_upload'.
    4646                button: {
    47                     text:'Insert Image'
     47                    text: ajv_image_upload.frame_button
    4848                }
    4949               
    5050            } );
    5151   
    52             media_frame.on('select', function() {
     52            media_frame.on( 'select', function() {
    5353               
    5454                // Grab our attachment selection and construct a JSON representation of the model.
     
    5656               
    5757                // Send the attachment URL to our custom input field via jQuery.
    58                 $( '.custom-media-url' ).val( media_attachment.url );
    59                 $( '.custom-media-url' ).trigger( 'change' ); // Necessary to trigger refresh in Customizer.
     58                $( '#' + target_input ).val( media_attachment.url );
     59                $( '#' + target_input ).trigger( 'change' ); // Necessary to trigger refresh in Customizer.
    6060               
    6161            } );
  • easy-widget-columns/tags/1.2.0/widgets/js/image-upload.min.js

    r1610881 r1712728  
    1 (function($){$(document).ready(function(){var media_frame;$(document.body).on('click.ewcOpenMediaManager','.custom-media-button',function(e){e.preventDefault();if(media_frame){media_frame.open();return;}media_frame=wp.media.frames.media_frame=wp.media({className:'media-frame ewc-media-frame',frame:'select',multiple:false,title:'Choose or Upload Image',library:{type:'image'},button:{text:'Insert Image'}});media_frame.on('select',function(){var media_attachment=media_frame.state().get('selection').first().toJSON();$('.custom-media-url').val(media_attachment.url);$('.custom-media-url').trigger('change');});media_frame.open();});});})(jQuery);
     1(function($){$(document).ready(function(){var media_frame;var target_input;$(document.body).on('click.ajvOpenMediaManager','.custom-media-button',function(e){e.preventDefault();var target_input=$(this).prev().attr('id');media_frame=wp.media.frames.media_frame=wp.media({className:'media-frame ajv-media-frame',frame:'select',multiple:false,title:ajv_image_upload.frame_title,library:{type:'image'},button:{text:ajv_image_upload.frame_button}});media_frame.on('select',function(){var media_attachment=media_frame.state().get('selection').first().toJSON();$('#'+target_input).val(media_attachment.url);$('#'+target_input).trigger('change');});media_frame.open();});});})(jQuery);
  • easy-widget-columns/trunk/README.txt

    r1624214 r1712728  
    11=== Easy Widget Columns ===
    22Contributors: ajvillegas
    3 Donate link:
     3Donate link:   
    44Tags: widget, admin, columns, layout, widget columns
    55Requires at least: 4.5
    66Tested up to: 4.8
    7 Stable tag: 1.1.8
     7Stable tag: 1.2.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1515Easy Widget Columns makes it really easy to arrange your widgets in rows of columns. It works by adding a new 'Column width' select option at the bottom of your widget’s form that allows you to set a width value for each widget.
    1616
    17 You can define new rows of widget columns with the 'Widget Row' widget, allowing you to create complex layouts directly from within your widget area or sidebar.
     17You can define new rows and sub-rows of widget columns with the 'Widget Row' widget and the 'Sub-Row' widget respectively, allowing you to create complex layouts directly from within your widget area or sidebar.
    1818
    1919> **Genesis Framework users**, be sure to check out the [Widgetized Page Template](https://wordpress.org/plugins/widgetized-page-template/) plugin, which helps you create full-page widget areas to use as a "blank canvas" with Easy Widget Columns.
     
    2929**Filters for Developers**
    3030
    31 The following filters are available for you to add or remove the 'Column width' control from specific widgets giving you full control over your widgets.
    32 
    33 * `ewc_include_widgets` is a whitelist filter used to add the control ONLY to the specified widgets.
    34 * `ewc_exclude_widgets` is a blacklist filter used to remove the control from the specified widgets.
    35 
    36 Both filters accept the widget’s ID base as parameters. Please note that you cannot use both filters at once. The `ewc_include_widgets` filter will always take precedence over the `ewc_exclude_widgets` filter and overwrite it.
    37 
    38 The examples below demonstrate how you can implement these filters on your theme using the default WordPress widgets:
     31The following filters are available for you to take full control of the plugin on your themes.
     32
     33* `ewc_include_widgets` - This whitelist filter is used to add the width control ONLY to the specified widgets.
     34* `ewc_exclude_widgets` - This blacklist filter is used to remove the width control from the specified widgets.
     35* `ewc_color_palette` - This filter allows you to add a custom color palette to the color picker control in the 'Widget Row' widget.
     36* `ewc_preset_classes` - This filter allows you assign preset CSS classes that display as a checkbox list in the 'Widget Row' widget.
     37* `ewc_advanced_options` - This filter allows you remove specific or all advanced options from the 'Widget Row' widget.
     38
     39**ewc_include_widgets**   
     40**ewc_exclude_widgets**
     41
     42Both filters accept the widget's ID base as parameters. Please note that you cannot use both filters at once. The `ewc_include_widgets` filter will always take precedence over the `ewc_exclude_widgets` filter and overwrite it.
     43
     44The examples below demonstrate how you can implement these filters on your theme.
    3945
    4046`add_filter( 'ewc_include_widgets', 'myprefix_add_ewc_control' );
     
    4955    $ewc_widgets = array(
    5056        'meta', // WP Meta widget
    51         //'nav_menu', // WP Custom Menu widget
    5257        'archives', // WP Archives widget
    5358        'calendar', // WP Calendar widget
    5459        'categories', // WP Categories widget
    55         //'links', // WP Links widget
    56         //'pages', // WP Pages widget
    57         //'recent-comments', // WP Recent Comments widget
    58         //'recent-posts', // WP Recent Posts widget
    59         //'rss', // WP RSS widget
    60         //'search', // WP Search widget
    61         //'tag_cloud', // WP Tag Cloud widget
    62         //'text', // WP Text widget
    6360    );
    6461   
     
    7774   
    7875    $ewc_widgets = array(
    79         //'meta', // WP Meta widget
    80         //'nav_menu', // WP Custom Menu widget
    81         'archives', // WP Archives widget
    82         'calendar', // WP Calendar widget
    83         'categories', // WP Categories widget
    84         'links', // WP Links widget
    85         //'pages', // WP Pages widget
    8676        'recent-comments', // WP Recent Comments widget
    8777        'recent-posts', // WP Recent Posts widget
    8878        'rss', // WP RSS widget
    89         //'search', // WP Search widget
    9079        'tag_cloud', // WP Tag Cloud widget
    91         //'text', // WP Text widget
    9280    );
    9381   
     
    9684}`
    9785
    98 The `ewc_color_palette` filter allows you to add a custom color palette to the color picker control in the 'Widget Row' widget. The filter accepts an array of hex color values as parameters.
    99 
    100 The example below demonstrates how you can implement this filter on your theme:
     86**ewc_color_palette**
     87
     88This filter allows you to add a custom color palette to the color picker control in the 'Widget Row' widget. It accepts an array of hex color values as parameters.
     89
     90The example below demonstrates how you can implement this filter on your theme.
    10191
    10292`add_filter( 'ewc_color_palette', 'myprefix_ewc_color_palette' );
     
    122112}`
    123113
    124 The `ewc_advanced_options` filter allows you to completely remove the advanced options from the 'Widget Row' widget. This can be useful for limiting design functionality on a client website ([decisions, not options](https://wordpress.org/about/philosophy/#decisions)).
    125 
    126 The example below demonstrates how you can implement this filter on your theme:
    127 
    128 `// Remove advanced options from the Widget Row widget
     114**ewc_preset_classes**
     115
     116This filter allows you assign preset CSS classes that display as a checkbox list in the 'Widget Row' widget.
     117
     118The following example demonstrates how you can implement this filter on your theme.
     119
     120`add_filter( 'ewc_preset_classes', 'myprefix_preset_classes' );
     121/**
     122 * Filter for predefining EWC Widget Row classes.
     123 *
     124 * @param   array   An empty array.
     125 * @return  array   An array containing new values.
     126 */
     127function myprefix_preset_classes( $classes ) {
     128   
     129    $classes = array(
     130        'hero',
     131        'parallax',
     132        'slider',
     133        'content',
     134    );
     135   
     136    return $classes;
     137   
     138}`
     139
     140**ewc_advanced_options**
     141
     142This filter allows you remove specific or all advanced options from the 'Widget Row' widget. This can be useful for limiting design functionality on a client website ([decisions, not options](https://wordpress.org/about/philosophy/#decisions)).
     143
     144The following example demonstrates how to completely remove all advanced options.
     145
     146`// Remove all advanced options from the Widget Row widget
    129147add_filter( 'ewc_advanced_options', '__return_false' );`
     148
     149The example below demonstrates how to disable or enable specific advanced options. The `display` parameter toggles the advanced option and the `active` parameter determines if the panel will display open (1) or closed (0) when the Widget Row widget is first added into a widget area.
     150
     151`add_filter( 'ewc_advanced_options', 'myprefix_display_advanced_options' );
     152/**
     153 * Filter to remove specific advanced options from the Widget Row widget.
     154 *
     155 * @param   array   An array containing default values.
     156 * @return  array   An array containing new values.
     157 */
     158function myprefix_display_advanced_options( $display ) {
     159   
     160    $display = array(
     161        'ewc_background' => array(
     162            'display' => true,
     163            'active' => 1,
     164        ),
     165        'ewc_margin' => array(
     166            'display' => false,
     167            'active' => 0,
     168        ),
     169        'ewc_padding' => array(
     170            'display' => false,
     171            'active' => 0,
     172        ),
     173        'ewc_class' => array(
     174            'display' => true,
     175            'active' => 0,
     176        ),
     177    );
     178   
     179    return $display;
     180   
     181}`
    130182
    131183== Installation ==
     
    169221
    170222To define new rows, use the 'Widget Row' widget at the start of each new row. If the next widget after a row has a value of 'None', then you'll need to add a 'Widget Row' widget before it to close the row. The only time you don't have to use the 'Widget Row' widget is when the last widget in a row is also the last widget in your widget area or sidebar.
     223
     224To define new sub-rows within a widget row use the 'Sub-Row' widget at the start of each new sub-row. The Sub-Row widget only works within a widget row and has no effect when used outside of a widget row.
    171225
    172226**Note:** Please make sure that each widget inside each row has a 'Column width' value other than 'None' assigned to it, otherwise the HTML markup will break in the front-end.
     
    184238== Changelog ==
    185239
     240= 1.2.0 =
     241* Enhanced UI for the Widget Row advanced options.
     242* Updated the `ewc_advanced_options` filter for removing specific advanced options.
     243* Added the `ewc_preset_classes` filter for adding your own predefined CSS classes to the 'Widget Row' widget.
     244* Added the 'Sub-Row' widget for creating sub-rows within a widget row allowing you to create more complex layouts.
     245* Fixed the image upload control to use unique IDs to avoid conflict with other Widget Row instances.
     246
     247= 1.1.9 =
     248* Strings in the image upload modal are now translatable.
     249* Updated .pot file with the new translatable strings.
     250
    186251= 1.1.8 =
    187252* Fixed a bug introduced in the last version with the 'Widget Row' widget that caused the wrong markup to be outputted in the front end.
  • easy-widget-columns/trunk/admin/class-easy-widget-columns-control.php

    r1610881 r1712728  
    141141       
    142142        if ( !empty( $ewc_include_widgets ) &&
    143             ( in_array( $widget->id_base, array( 'ewc-row-divider' ) ) || !in_array( $widget->id_base, $ewc_include_widgets ) ) ) {
     143            ( in_array( $widget->id_base, array( 'ewc-row-divider', 'ewc-subrow-divider' ) ) || !in_array( $widget->id_base, $ewc_include_widgets ) ) ) {
    144144            return;
    145145        } else if ( empty( $ewc_include_widgets ) &&
    146             ( in_array( $widget->id_base, array( 'ewc-row-divider' ) ) || in_array( $widget->id_base, $ewc_exclude_widgets ) ) ) {
     146            ( in_array( $widget->id_base, array( 'ewc-row-divider', 'ewc-subrow-divider' ) ) || in_array( $widget->id_base, $ewc_exclude_widgets ) ) ) {
    147147            return;
    148148        }
     
    221221        // Get the widget's position in the sidebar
    222222        $sidebars_widgets = get_option( 'sidebars_widgets', array() );
    223         $position_id = array_search( $params[0]['widget_id'], $sidebars_widgets[$params[0]['id']] );
     223        $sidebar_id = $sidebars_widgets[$params[0]['id']];
     224        $position_id = array_search( $params[0]['widget_id'], $sidebar_id );
     225       
     226        // Retrieve the widget above options
     227        if ( isset( $sidebar_id[$position_id-2] ) ) {
     228            $widget_above_option = get_option( $wp_registered_widgets[$sidebar_id[$position_id-2]]['callback'][0]->option_name );
     229            $widget_above_index = preg_replace( '/[^0-9]/', '', $sidebar_id[$position_id-2] );
     230        } else {
     231            $widget_above_option = '';
     232            $widget_above_index = '';
     233        }
     234        if ( isset( $widget_above_option[$widget_above_index]['ewc_width'] ) ) {
     235            $ewc_width_above = $widget_above_option[$widget_above_index]['ewc_width'];
     236        } else {
     237            $ewc_width_above = '';
     238        }
    224239       
    225240        // Determine first widget in a row and assign .first class
    226         if ( ( isset( $sidebars_widgets[$params[0]['id']][$position_id-1] ) && in_array( _get_widget_id_base( $sidebars_widgets[$params[0]['id']][$position_id-1] ), array('ewc-row-divider') ) ) ) {
     241        if ( ( isset( $sidebar_id[$position_id-1] )
     242                && in_array( _get_widget_id_base( $sidebar_id[$position_id-1] ), array('ewc-row-divider') ) )
     243            || ( ( isset( $sidebar_id[$position_id-1] )
     244                && isset( $sidebar_id[$position_id-2] )
     245                && in_array( _get_widget_id_base( $sidebar_id[$position_id-1] ), array('ewc-subrow-divider') )
     246                && 'none' !== $ewc_width_above ) ) ) {
    227247            $first = 'first ';
    228248        } else {
     
    231251       
    232252        // Determine last widget in sidebar and assign closing row markup
    233         if ( ( end( $sidebars_widgets[$params[0]['id']] ) == $params[0]['widget_id'] ) ) {
     253        if ( ( end( $sidebar_id ) == $params[0]['widget_id'] ) ) {
    234254            $wrap_close = '</div></div>';
    235255        } else {
  • easy-widget-columns/trunk/admin/css/easy-widget-columns-admin.css

    r1611642 r1712728  
    185185.select2-container--ewc-select .select2-results {
    186186    display: block;
     187    max-height: 300px;
     188    padding: 0;
     189    margin: 0;
    187190}
    188191
     
    545548   display: block;
    546549}
     550
     551input[type=checkbox].ewc-label-checkbox {
     552    display: none;
     553}
     554
     555input[type=checkbox].ewc-background-checkbox ~ .ewc-background-settings,
     556input[type=checkbox].ewc-margin-checkbox ~ .ewc-margin-settings,
     557input[type=checkbox].ewc-padding-checkbox ~ .ewc-padding-settings,
     558input[type=checkbox].ewc-class-checkbox ~ .ewc-class-settings {
     559    max-height: 0;
     560    overflow: hidden;
     561    visibility: hidden;
     562    transition: max-height 0.25s ease-out, visibility 0.25s linear;
     563}
     564
     565input[type=checkbox].ewc-background-checkbox:checked ~ .ewc-background-settings,
     566input[type=checkbox].ewc-margin-checkbox:checked ~ .ewc-margin-settings,
     567input[type=checkbox].ewc-padding-checkbox:checked ~ .ewc-padding-settings,
     568input[type=checkbox].ewc-class-checkbox:checked ~ .ewc-class-settings {
     569    max-height: 50em;
     570    visibility: visible;
     571    transition: max-height 0.5s ease-in, visibility 0.5s linear;
     572}
    547573 
    548574.ewc-row-styles {
     575    position: relative;
    549576    border: 1px solid #eee;
    550     padding: 0 10px;
     577    padding: 7px 10px 5px;
    551578    background: #fcfcfc;
    552579    margin-bottom: 15px;
    553580}
    554581
     582.ewc-row-styles hr {
     583    margin: 8px 0 6px;
     584}
     585
     586.ewc-row-styles hr:last-of-type {
     587    visibility: hidden;
     588    margin: 0;
     589}
     590
    555591.ewc-section-label {
    556592    display: inline-block;
    557     margin-bottom: 5px;
     593    margin: 7px 0;
    558594    font-weight: 700;
    559 }
    560 
    561 .ewc-widget-table {
    562     margin-bottom: 10px;
     595    width: 100%;
     596}
     597
     598.ewc-section-label:after {
     599    content: "\f140";
     600    position: absolute;
     601    right: 0.5em;
     602    font: 400 18px/16px dashicons;
     603    speak: none;
     604    -webkit-font-smoothing: antialiased;
     605    -moz-osx-font-smoothing: grayscale;
     606    text-decoration: none !important;
     607}
     608
     609input[type=checkbox].ewc-label-checkbox:checked + .ewc-section-label:after {
     610    content: "\f142";
    563611}
    564612
     
    579627.wp-customizer .ewc-widget-table .row-label {
    580628    width: 30px;
     629}
     630
     631.button.custom-media-button {
     632    margin: 5px 0 8px;
     633}
     634
     635input.custom-media-url:invalid ~ .ewc-image-properties {
     636    display: none;
     637}
     638
     639.ewc-image-properties {
     640    margin-top: 8px;
    581641}
    582642
     
    600660.image-properties-dropdown select {
    601661    width: 100%;
    602 }
     662    margin: 0;
     663}
     664
     665.ewc-class-settings input {
     666    margin-bottom: 3px;
     667}
     668
     669.ewc-preset-classes {
     670    background: #fff;
     671    padding: 5px 5px 0;
     672    max-height: 75px;
     673    overflow: hidden;
     674    overflow-y: auto;
     675    margin: 7px 0 3px 0;
     676    border: 1px solid #ddd;
     677    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) inset;
     678    color: #32373c;
     679}
     680
     681.ewc-class-settings .ewc-preset-classes input {
     682    margin-bottom: 0;
     683}
     684
     685.ewc-preset-label {
     686    vertical-align: top;
     687}
     688
     689/**
     690 * Media Modal
     691 */
     692 
     693.media-modal-content .media-frame.ajv-media-frame select.attachment-filters {
     694    width: 100%;
     695    max-width: 100%;
     696}
  • easy-widget-columns/trunk/admin/css/easy-widget-columns-admin.min.css

    r1611642 r1712728  
    1 @font-face{font-family:'column-icons';src:url('font/column-icons.eot?-l9qhcm');src:url('font/column-icons.eot?#iefix-l9qhcm') format('embedded-opentype'), url('font/column-icons.ttf?-l9qhcm') format('truetype'), url('font/column-icons.woff?-l9qhcm') format('woff'), url('font/column-icons.svg?-l9qhcm#icomoon') format('svg');font-weight:normal;font-style:normal}.select2-container--ewc-select .select2-results i[class^="ewc-icon-"]:before,.select2-container--ewc-select .select2-results i[class*=" ewc-icon-"]:before,.select2-container--ewc-select .select2-selection__rendered i[class^="ewc-icon-"]:before,.select2-container--ewc-select .select2-selection__rendered i[class*=" ewc-icon-"]:before{font-family:'column-icons';font-style:normal;speak:none;font-weight:normal;position:relative;margin-right:10px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.select2-container--ewc-select .select2-selection__rendered i[class^="ewc-icon-"]:before,.select2-container--ewc-select .select2-selection__rendered i[class*=" ewc-icon-"]:before{color:#2f3132}.ewc-icon-none:before{content:"\e900"}.ewc-icon-full-width:before{content:"\e60c"}.ewc-icon-one-half:before{content:"\e601"}.ewc-icon-one-third:before{content:"\e602"}.ewc-icon-two-thirds:before{content:"\e603"}.ewc-icon-one-fourth:before{content:"\e604"}.ewc-icon-two-fourths:before{content:"\e605"}.ewc-icon-three-fourths:before{content:"\e606"}.ewc-icon-one-sixth:before{content:"\e607"}.ewc-icon-two-sixths:before{content:"\e608"}.ewc-icon-three-sixths:before{content:"\e609"}.ewc-icon-four-sixths:before{content:"\e60a"}.ewc-icon-five-sixths:before{content:"\e60b"}.select2-container--ewc-select.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container--ewc-select.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container--ewc-select.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:6px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;font-size:14px;white-space:nowrap;text-decoration:none;border-radius:0;background-clip:padding-box;background-image:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.select2-container--ewc-select.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container--ewc-select.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container--ewc-select.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container--ewc-select.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container--ewc-select.select2-container .select2-search--inline{float:left}.select2-container--ewc-select.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container--ewc-select.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-container--ewc-select .select2-dropdown{background-color:#fff;border:1px solid #5b9dd9;-webkit-box-shadow:0 0 2px rgba(30, 140, 190, .8);box-shadow:0 0 2px rgba(30, 140, 190, .8);border-radius:0;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.wp-customizer .select2-container--ewc-select .select2-dropdown{z-index:900000;}.select2-container--ewc-select .select2-results{display:block}.select2-container--ewc-select .select2-results__options{list-style:none;margin:0;padding:0}.select2-container--ewc-select .select2-results__option{padding:6px;margin-bottom:0;user-select:none;-webkit-user-select:none;font-size:14px;color:#2f3132}.select2-container--ewc-select .select2-results__option[aria-selected]{cursor:pointer}.select2-container--ewc-select.select2-container--open .select2-dropdown{left:0}.select2-container--ewc-select.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--ewc-select.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--ewc-select .select2-search--dropdown{display:block;padding:4px}.select2-container--ewc-select .select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-container--ewc-select .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-container--ewc-select .select2-search--dropdown.select2-search--hide{display:none}.select2-container--ewc-select .select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--ewc-select .select2-selection--single{background-color:#fff;border:1px solid #ddd;border-radius:0}.select2-container--ewc-select .select2-selection--single .select2-selection__rendered{color:#000;line-height:26px}.select2-container--ewc-select .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--ewc-select .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--ewc-select .select2-selection--single .select2-selection__arrow{background-color:#f9f9f9;border-left:1px solid #ddd;height:26px;position:absolute;top:1px;right:1px;width:22px}.select2-container--ewc-select .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--ewc-select[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--ewc-select[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--ewc-select.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--ewc-select.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--ewc-select.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2-container--ewc-select .select2-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--ewc-select .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--ewc-select .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--ewc-select .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--ewc-select .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--ewc-select .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--ewc-select .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--ewc-select .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--ewc-select.select2-container--focus .select2-selection--multiple{border:solid #000 1px;outline:0}.select2-container--ewc-select.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--ewc-select.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--ewc-select.select2-container--open.select2-container--above .select2-selection--single,.select2-container--ewc-select.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--ewc-select.select2-container--open.select2-container--below .select2-selection--single,.select2-container--ewc-select.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--ewc-select .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--ewc-select .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--ewc-select .select2-results > .select2-results__options{max-height:300px;overflow-y:auto}.select2-container--ewc-select .select2-results__option[role=group]{padding:0}.select2-container--ewc-select .select2-results__option[aria-disabled=true]{color:#999}.select2-container--ewc-select .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--ewc-select .select2-results__option .select2-results__option{padding-left:1em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--ewc-select .select2-results__option--highlighted[aria-selected]{background-color:#0073aa;color:#fff}.select2-container--ewc-select .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--ewc-select.select2-container .select2-selection:focus{border:1px solid #5b9dd9;outline:none;-webkit-box-shadow:0 0 2px rgba(30, 140, 190, .8);box-shadow:0 0 2px rgba(30, 140, 190, .8)}.select2-container--ewc-select.select2-container--open.select2-container--below .select2-selection:focus,.select2-container--ewc-select.select2-container--open.select2-container--above .select2-dropdown{border-bottom:1px solid #ddd}.select2-container--ewc-select.select2-container--open.select2-container--above .select2-selection:focus,.select2-container--ewc-select.select2-container--open.select2-container--below .select2-dropdown{border-top:1px solid #ddd}input[type=checkbox].ewc-options-checkbox{margin-bottom:1em}label.ewc-options-label{display:inline-block;margin-bottom:1.250em}input[type=checkbox] ~ .ewc-row-styles{display:none}input[type=checkbox]:checked ~ .ewc-row-styles{display:block}.ewc-row-styles{border:1px solid #eee;padding:0 10px;background:#fcfcfc;margin-bottom:15px}.ewc-section-label{display:inline-block;margin-bottom:5px;font-weight:700}.ewc-widget-table{margin-bottom:10px}.ewc-widget-table .row-content{display:inline-block;margin-right:10px}.wp-customizer .ewc-widget-table .row-content{margin-right:8px}.ewc-widget-table .row-label{display:inline-block;width:35px}.wp-customizer .ewc-widget-table .row-label{width:30px}.ewc-image-properties:after{clear:both;content:" ";display:table}.image-properties-dropdown{float:left;width:48.717948717949%;margin-left:2.5641025641026%;margin-top:0}.first.image-properties-dropdown{margin-left:0}.image-properties-dropdown select{width:100%}
     1@font-face{font-family:'column-icons';src:url('font/column-icons.eot?-l9qhcm');src:url('font/column-icons.eot?#iefix-l9qhcm') format('embedded-opentype'), url('font/column-icons.ttf?-l9qhcm') format('truetype'), url('font/column-icons.woff?-l9qhcm') format('woff'), url('font/column-icons.svg?-l9qhcm#icomoon') format('svg');font-weight:normal;font-style:normal}.select2-container--ewc-select .select2-results i[class^="ewc-icon-"]:before,.select2-container--ewc-select .select2-results i[class*=" ewc-icon-"]:before,.select2-container--ewc-select .select2-selection__rendered i[class^="ewc-icon-"]:before,.select2-container--ewc-select .select2-selection__rendered i[class*=" ewc-icon-"]:before{font-family:'column-icons';font-style:normal;speak:none;font-weight:normal;position:relative;margin-right:10px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.select2-container--ewc-select .select2-selection__rendered i[class^="ewc-icon-"]:before,.select2-container--ewc-select .select2-selection__rendered i[class*=" ewc-icon-"]:before{color:#2f3132}.ewc-icon-none:before{content:"\e900"}.ewc-icon-full-width:before{content:"\e60c"}.ewc-icon-one-half:before{content:"\e601"}.ewc-icon-one-third:before{content:"\e602"}.ewc-icon-two-thirds:before{content:"\e603"}.ewc-icon-one-fourth:before{content:"\e604"}.ewc-icon-two-fourths:before{content:"\e605"}.ewc-icon-three-fourths:before{content:"\e606"}.ewc-icon-one-sixth:before{content:"\e607"}.ewc-icon-two-sixths:before{content:"\e608"}.ewc-icon-three-sixths:before{content:"\e609"}.ewc-icon-four-sixths:before{content:"\e60a"}.ewc-icon-five-sixths:before{content:"\e60b"}.select2-container--ewc-select.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container--ewc-select.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container--ewc-select.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:6px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;font-size:14px;white-space:nowrap;text-decoration:none;border-radius:0;background-clip:padding-box;background-image:none;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.select2-container--ewc-select.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container--ewc-select.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container--ewc-select.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container--ewc-select.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container--ewc-select.select2-container .select2-search--inline{float:left}.select2-container--ewc-select.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container--ewc-select.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-container--ewc-select .select2-dropdown{background-color:#fff;border:1px solid #5b9dd9;-webkit-box-shadow:0 0 2px rgba(30, 140, 190, .8);box-shadow:0 0 2px rgba(30, 140, 190, .8);border-radius:0;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.wp-customizer .select2-container--ewc-select .select2-dropdown{z-index:900000}.select2-container--ewc-select .select2-results{display:block;max-height:300px;padding:0;margin:0}.select2-container--ewc-select .select2-results__options{list-style:none;margin:0;padding:0}.select2-container--ewc-select .select2-results__option{padding:6px;margin-bottom:0;user-select:none;-webkit-user-select:none;font-size:14px;color:#2f3132}.select2-container--ewc-select .select2-results__option[aria-selected]{cursor:pointer}.select2-container--ewc-select.select2-container--open .select2-dropdown{left:0}.select2-container--ewc-select.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--ewc-select.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--ewc-select .select2-search--dropdown{display:block;padding:4px}.select2-container--ewc-select .select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-container--ewc-select .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-container--ewc-select .select2-search--dropdown.select2-search--hide{display:none}.select2-container--ewc-select .select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--ewc-select .select2-selection--single{background-color:#fff;border:1px solid #ddd;border-radius:0}.select2-container--ewc-select .select2-selection--single .select2-selection__rendered{color:#000;line-height:26px}.select2-container--ewc-select .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--ewc-select .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--ewc-select .select2-selection--single .select2-selection__arrow{background-color:#f9f9f9;border-left:1px solid #ddd;height:26px;position:absolute;top:1px;right:1px;width:22px}.select2-container--ewc-select .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent;border-style:solid;border-width:5px 4px 0;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--ewc-select[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--ewc-select[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--ewc-select.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--ewc-select.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--ewc-select.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888;border-width:0 4px 5px}.select2-container--ewc-select .select2-selection--multiple{background-color:#fff;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--ewc-select .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--ewc-select .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--ewc-select .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--ewc-select .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--ewc-select .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--ewc-select .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--ewc-select .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--ewc-select[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--ewc-select.select2-container--focus .select2-selection--multiple{border:solid #000 1px;outline:0}.select2-container--ewc-select.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--ewc-select.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--ewc-select.select2-container--open.select2-container--above .select2-selection--single,.select2-container--ewc-select.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--ewc-select.select2-container--open.select2-container--below .select2-selection--single,.select2-container--ewc-select.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--ewc-select .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--ewc-select .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--ewc-select .select2-results > .select2-results__options{max-height:300px;overflow-y:auto}.select2-container--ewc-select .select2-results__option[role=group]{padding:0}.select2-container--ewc-select .select2-results__option[aria-disabled=true]{color:#999}.select2-container--ewc-select .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--ewc-select .select2-results__option .select2-results__option{padding-left:1em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--ewc-select .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--ewc-select .select2-results__option--highlighted[aria-selected]{background-color:#0073aa;color:#fff}.select2-container--ewc-select .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--ewc-select.select2-container .select2-selection:focus{border:1px solid #5b9dd9;outline:none;-webkit-box-shadow:0 0 2px rgba(30, 140, 190, .8);box-shadow:0 0 2px rgba(30, 140, 190, .8)}.select2-container--ewc-select.select2-container--open.select2-container--below .select2-selection:focus,.select2-container--ewc-select.select2-container--open.select2-container--above .select2-dropdown{border-bottom:1px solid #ddd}.select2-container--ewc-select.select2-container--open.select2-container--above .select2-selection:focus,.select2-container--ewc-select.select2-container--open.select2-container--below .select2-dropdown{border-top:1px solid #ddd}input[type=checkbox].ewc-options-checkbox{margin-bottom:1em}label.ewc-options-label{display:inline-block;margin-bottom:1.250em}input[type=checkbox] ~ .ewc-row-styles{display:none}input[type=checkbox]:checked ~ .ewc-row-styles{display:block}input[type=checkbox].ewc-label-checkbox{display:none}input[type=checkbox].ewc-background-checkbox ~ .ewc-background-settings,input[type=checkbox].ewc-margin-checkbox ~ .ewc-margin-settings,input[type=checkbox].ewc-padding-checkbox ~ .ewc-padding-settings,input[type=checkbox].ewc-class-checkbox ~ .ewc-class-settings{max-height:0;overflow:hidden;visibility:hidden;transition:max-height 0.25s ease-out, visibility 0.25s linear}input[type=checkbox].ewc-background-checkbox:checked ~ .ewc-background-settings,input[type=checkbox].ewc-margin-checkbox:checked ~ .ewc-margin-settings,input[type=checkbox].ewc-padding-checkbox:checked ~ .ewc-padding-settings,input[type=checkbox].ewc-class-checkbox:checked ~ .ewc-class-settings{max-height:50em;visibility:visible;transition:max-height 0.5s ease-in, visibility 0.5s linear}.ewc-row-styles{position:relative;border:1px solid #eee;padding:7px 10px 5px;background:#fcfcfc;margin-bottom:15px}.ewc-row-styles hr{margin:8px 0 6px}.ewc-row-styles hr:last-of-type{visibility:hidden;margin:0}.ewc-section-label{display:inline-block;margin:7px 0;font-weight:700;width:100%}.ewc-section-label:after{content:"\f140";position:absolute;right:0.5em;font:400 18px/16px dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none !important}input[type=checkbox].ewc-label-checkbox:checked + .ewc-section-label:after{content:"\f142"}.ewc-widget-table .row-content{display:inline-block;margin-right:10px}.wp-customizer .ewc-widget-table .row-content{margin-right:8px}.ewc-widget-table .row-label{display:inline-block;width:35px}.wp-customizer .ewc-widget-table .row-label{width:30px}.button.custom-media-button{margin:5px 0 8px}input.custom-media-url:invalid ~ .ewc-image-properties{display:none}.ewc-image-properties{margin-top:8px}.ewc-image-properties:after{clear:both;content:" ";display:table}.image-properties-dropdown{float:left;width:48.717948717949%;margin-left:2.5641025641026%;margin-top:0}.first.image-properties-dropdown{margin-left:0}.image-properties-dropdown select{width:100%;margin:0}.ewc-class-settings input{margin-bottom:3px}.ewc-preset-classes{background:#fff;padding:5px 5px 0;max-height:75px;overflow:hidden;overflow-y:auto;margin:7px 0 3px 0;border:1px solid #ddd;box-shadow:0 1px 2px rgba(0, 0, 0, 0.07) inset;color:#32373c}.ewc-class-settings .ewc-preset-classes input{margin-bottom:0}.ewc-preset-label{vertical-align:top}.media-modal-content .media-frame.ajv-media-frame select.attachment-filters{width:100%;max-width:100%}
  • easy-widget-columns/trunk/easy-widget-columns.php

    r1611687 r1712728  
    1717 * Plugin URI:        http://www.alexisvillegas.com/plugins/easy-widget-columns
    1818 * Description:       Easily display widgets in rows of columns.
    19  * Version:           1.1.8
     19 * Version:           1.2.0
    2020 * Author:            Alexis J. Villegas
    2121 * Author URI:        http://www.alexisvillegas.com
  • easy-widget-columns/trunk/includes/class-easy-widget-columns-i18n.php

    r1610881 r1712728  
    2727class Easy_Widget_Columns_i18n {
    2828
    29 
    3029    /**
    3130     * Load the plugin text domain for translation.
     
    4342    }
    4443
    45 
    46 
    4744}
  • easy-widget-columns/trunk/includes/class-easy-widget-columns.php

    r1611687 r1712728  
    7070
    7171        $this->plugin_name = 'easy-widget-columns';
    72         $this->version = '1.1.8';
     72        $this->version = '1.2.0';
    7373        $this->load_dependencies();
    7474        $this->set_locale();
  • easy-widget-columns/trunk/languages/easy-widget-columns.pot

    r1610881 r1712728  
    44"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
    55"Project-Id-Version: Easy Widget Columns\n"
    6 "POT-Creation-Date: 2017-02-22 15:47-0800\n"
    7 "PO-Revision-Date: 2017-02-22 15:43-0800\n"
     6"POT-Creation-Date: 2017-08-11 12:27-0700\n"
     7"PO-Revision-Date: 2017-08-11 12:27-0700\n"
    88"Last-Translator: \n"
    99"Language-Team: \n"
     
    1111"Content-Type: text/plain; charset=UTF-8\n"
    1212"Content-Transfer-Encoding: 8bit\n"
    13 "X-Generator: Poedit 1.8.12\n"
     13"X-Generator: Poedit 2.0.3\n"
    1414"X-Poedit-Basepath: ..\n"
     15"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
    1516"X-Poedit-WPHeader: easy-widget-columns.php\n"
    1617"X-Poedit-SourceCharset: UTF-8\n"
     
    9293
    9394#: admin/partials/easy-widget-columns-widget-form.php:17
    94 #: widgets/class-widget-row-divider.php:334
     95#: widgets/class-widget-row-divider.php:415
    9596msgid "None"
    9697msgstr ""
     
    128129msgstr ""
    129130
     131#: widgets/class-easy-widget-columns-widgets.php:107
     132msgid "Choose or Upload Image"
     133msgstr ""
     134
     135#: widgets/class-easy-widget-columns-widgets.php:108
     136msgid "Insert Image"
     137msgstr ""
     138
    130139#: widgets/class-widget-row-divider.php:27
    131 #: widgets/class-widget-row-divider.php:259
     140#: widgets/class-widget-row-divider.php:336
    132141msgid "Use this widget to start or close a new row of widget columns."
    133142msgstr ""
    134143
    135 #: widgets/class-widget-row-divider.php:35
     144#: widgets/class-widget-row-divider.php:57
    136145msgid "Widget Row"
    137146msgstr ""
    138147
    139 #: widgets/class-widget-row-divider.php:264
     148#: widgets/class-widget-row-divider.php:341
    140149msgid "Advanced options"
    141150msgstr ""
    142151
    143 #: widgets/class-widget-row-divider.php:269
     152#: widgets/class-widget-row-divider.php:348
    144153msgid "Row background"
    145154msgstr ""
    146155
    147 #: widgets/class-widget-row-divider.php:270
     156#: widgets/class-widget-row-divider.php:353
    148157msgid "Color:"
    149158msgstr ""
    150159
    151 #: widgets/class-widget-row-divider.php:275
     160#: widgets/class-widget-row-divider.php:357
    152161msgid "Image:"
    153162msgstr ""
    154163
    155 #: widgets/class-widget-row-divider.php:276
     164#: widgets/class-widget-row-divider.php:358
    156165msgid "Enter URL or select image"
    157166msgstr ""
    158167
    159 #: widgets/class-widget-row-divider.php:283
     168#: widgets/class-widget-row-divider.php:359
     169msgid "Select Image"
     170msgstr ""
     171
     172#: widgets/class-widget-row-divider.php:364
    160173msgid "Repeat:"
    161174msgstr ""
    162175
    163 #: widgets/class-widget-row-divider.php:286
     176#: widgets/class-widget-row-divider.php:367
    164177msgid "Tile"
    165178msgstr ""
    166179
    167 #: widgets/class-widget-row-divider.php:287
     180#: widgets/class-widget-row-divider.php:368
    168181msgid "Horizontal"
    169182msgstr ""
    170183
    171 #: widgets/class-widget-row-divider.php:288
     184#: widgets/class-widget-row-divider.php:369
    172185msgid "Vertical"
    173186msgstr ""
    174187
    175 #: widgets/class-widget-row-divider.php:289
     188#: widgets/class-widget-row-divider.php:370
    176189msgid "No Repeat"
    177190msgstr ""
    178191
    179 #: widgets/class-widget-row-divider.php:298
     192#: widgets/class-widget-row-divider.php:379
    180193msgid "Attachment:"
    181194msgstr ""
    182195
    183 #: widgets/class-widget-row-divider.php:301
     196#: widgets/class-widget-row-divider.php:382
    184197msgid "Scroll"
    185198msgstr ""
    186199
    187 #: widgets/class-widget-row-divider.php:302
     200#: widgets/class-widget-row-divider.php:383
    188201msgid "Fixed"
    189202msgstr ""
    190203
    191 #: widgets/class-widget-row-divider.php:311
     204#: widgets/class-widget-row-divider.php:392
    192205msgid "Position:"
    193206msgstr ""
    194207
    195 #: widgets/class-widget-row-divider.php:314
     208#: widgets/class-widget-row-divider.php:395
    196209msgid "Left Top"
    197210msgstr ""
    198211
    199 #: widgets/class-widget-row-divider.php:315
     212#: widgets/class-widget-row-divider.php:396
    200213msgid "Left Center"
    201214msgstr ""
    202215
    203 #: widgets/class-widget-row-divider.php:316
     216#: widgets/class-widget-row-divider.php:397
    204217msgid "Left Bottom"
    205218msgstr ""
    206219
    207 #: widgets/class-widget-row-divider.php:317
     220#: widgets/class-widget-row-divider.php:398
    208221msgid "Right Top"
    209222msgstr ""
    210223
    211 #: widgets/class-widget-row-divider.php:318
     224#: widgets/class-widget-row-divider.php:399
    212225msgid "Right Center"
    213226msgstr ""
    214227
    215 #: widgets/class-widget-row-divider.php:319
     228#: widgets/class-widget-row-divider.php:400
    216229msgid "Right Bottom"
    217230msgstr ""
    218231
    219 #: widgets/class-widget-row-divider.php:320
     232#: widgets/class-widget-row-divider.php:401
    220233msgid "Center Top"
    221234msgstr ""
    222235
    223 #: widgets/class-widget-row-divider.php:321
     236#: widgets/class-widget-row-divider.php:402
    224237msgid "Center"
    225238msgstr ""
    226239
    227 #: widgets/class-widget-row-divider.php:322
     240#: widgets/class-widget-row-divider.php:403
    228241msgid "Center Bottom"
    229242msgstr ""
    230243
    231 #: widgets/class-widget-row-divider.php:331
     244#: widgets/class-widget-row-divider.php:412
    232245msgid "Scale:"
    233246msgstr ""
    234247
    235 #: widgets/class-widget-row-divider.php:335
     248#: widgets/class-widget-row-divider.php:416
    236249msgid "Cover"
    237250msgstr ""
    238251
    239 #: widgets/class-widget-row-divider.php:336
     252#: widgets/class-widget-row-divider.php:417
    240253msgid "Contain"
    241254msgstr ""
    242255
    243 #: widgets/class-widget-row-divider.php:348
     256#: widgets/class-widget-row-divider.php:436
    244257msgid "Row margin"
    245258msgstr ""
    246259
    247 #: widgets/class-widget-row-divider.php:353
    248 #: widgets/class-widget-row-divider.php:382
     260#: widgets/class-widget-row-divider.php:442
     261#: widgets/class-widget-row-divider.php:480
    249262msgid "top:"
    250263msgstr ""
    251264
    252 #: widgets/class-widget-row-divider.php:358
    253 #: widgets/class-widget-row-divider.php:387
     265#: widgets/class-widget-row-divider.php:447
     266#: widgets/class-widget-row-divider.php:485
    254267msgid "right:"
    255268msgstr ""
    256269
    257 #: widgets/class-widget-row-divider.php:365
    258 #: widgets/class-widget-row-divider.php:394
     270#: widgets/class-widget-row-divider.php:454
     271#: widgets/class-widget-row-divider.php:492
    259272msgid "btm:"
    260273msgstr ""
    261274
    262 #: widgets/class-widget-row-divider.php:370
    263 #: widgets/class-widget-row-divider.php:399
     275#: widgets/class-widget-row-divider.php:459
     276#: widgets/class-widget-row-divider.php:497
    264277msgid "left:"
    265278msgstr ""
    266279
    267 #: widgets/class-widget-row-divider.php:377
     280#: widgets/class-widget-row-divider.php:474
    268281msgid "Row padding"
    269282msgstr ""
    270283
    271 #: widgets/class-widget-row-divider.php:409
    272 msgid "Custom classes"
    273 msgstr ""
    274 
    275 #: widgets/class-widget-row-divider.php:411
    276 msgid "Separate classes by a space."
     284#: widgets/class-widget-row-divider.php:512
     285msgid "CSS classes"
     286msgstr ""
     287
     288#: widgets/class-widget-row-divider.php:515
     289msgid "Enter custom classes"
     290msgstr ""
     291
     292#: widgets/class-widget-subrow-divider.php:28
     293#: widgets/class-widget-subrow-divider.php:72
     294msgid "Use this widget to start a new sub-row of widget columns."
     295msgstr ""
     296
     297#: widgets/class-widget-subrow-divider.php:36
     298msgid "sub-row"
    277299msgstr ""
    278300
  • easy-widget-columns/trunk/public/class-easy-widget-columns-public.php

    r1610881 r1712728  
    8787        // Check if current locale is RTL (Right To Left)
    8888        if ( is_rtl() ) {
    89             $embedded_css = '.widget-row:after,.widget-row .wrap:after{clear:both;content:" ";display:table;}.widget-row .full-width{float:right;width:100%;}';
     89            $embedded_css = '.widget-row:after,.widget-row .wrap:after{clear:both;content:"";display:table;}.widget-row .full-width{float:right;width:100%;}';
    9090        } else {
    91             $embedded_css = '.widget-row:after,.widget-row .wrap:after{clear:both;content:" ";display:table;}.widget-row .full-width{float:left;width:100%;}';
     91            $embedded_css = '.widget-row:after,.widget-row .wrap:after{clear:both;content:"";display:table;}.widget-row .full-width{float:left;width:100%;}';
    9292        }
    9393       
  • easy-widget-columns/trunk/uninstall.php

    r1611000 r1712728  
    3434   
    3535    global $wpdb;
    36     $blogs = $wpdb->get_results("SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A);
     36    $blogs = $wpdb->get_results( "SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A );
    3737   
    3838    delete_option( 'easy-widget-columns' );
  • easy-widget-columns/trunk/widgets/class-easy-widget-columns-widgets.php

    r1610881 r1712728  
    6363   
    6464        /**
    65          * The class responsible for defining the Row Divider widget.
     65         * The class responsible for defining the Widget Row widget.
    6666         */
    6767        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'widgets/class-widget-row-divider.php';
     68       
     69        /**
     70         * The class responsible for defining the Sub Row widget.
     71         */
     72        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'widgets/class-widget-subrow-divider.php';
    6873   
    6974    }
     
    97102        // Image uploader
    98103        wp_enqueue_media();
    99         wp_enqueue_script( 'ajv-image-upload', plugin_dir_url( __FILE__ ) . 'js/image-upload.min.js', array( 'jquery' ), $this->version, false );
     104        wp_register_script( 'ajv-image-upload', plugin_dir_url( __FILE__ ) . 'js/image-upload.min.js', array( 'jquery' ), $this->version, false );
     105        wp_localize_script( 'ajv-image-upload', 'ajv_image_upload',
     106            array(
     107                'frame_title' => __( 'Choose or Upload Image', 'easy-widget-columns' ),
     108                'frame_button' => __( 'Insert Image', 'easy-widget-columns' ),
     109            )
     110        );
     111        wp_enqueue_script( 'ajv-image-upload' );
    100112       
    101113    }
     
    159171    public function register_widgets() {
    160172       
    161         // Register the Row Divider widget
     173        // Register the Widget Row widget
    162174        register_widget( 'EWC_Row_Divider' );
     175       
     176        // Register the Sub-Row widget
     177        register_widget( 'EWC_Sub_Row_Divider' );
    163178       
    164179    }
  • easy-widget-columns/trunk/widgets/class-widget-row-divider.php

    r1611687 r1712728  
    3333        );
    3434       
     35        // Define options filter and default values
     36        $display = apply_filters( 'ewc_advanced_options', array(
     37            'ewc_background' => array(
     38                'display' => true,
     39                'active' => 1,
     40            ),
     41            'ewc_margin' => array(
     42                'display' => true,
     43                'active' => 0,
     44            ),
     45            'ewc_padding' => array(
     46                'display' => true,
     47                'active' => 0,
     48            ),
     49            'ewc_class' => array(
     50                'display' => true,
     51                'active' => 0,
     52            ),
     53        ) );
     54       
     55        $this->display = $display;
     56       
    3557        parent::__construct( 'ewc-row-divider', '&#8212; ' . __( 'Widget Row', 'easy-widget-columns' ) . ' &#8212;', $widget_ops, $control_ops );
    3658       
     
    6789       
    6890        // Background color
    69         if ( !empty( $instance['background_color'] ) ) {
     91        if ( !empty( $instance['background_color'] )
     92            && ( !empty( $this->display['ewc_background']['display'] ) && true === $this->display['ewc_background']['display'] ) ) {
    7093            $background_color = $instance['background_color'];
    7194        } else {
     
    7497       
    7598        // Background image
    76         if ( !empty( $instance['background_image'] ) ) {
     99        if ( !empty( $instance['background_image'] )
     100            && ( !empty( $this->display['ewc_background']['display'] ) && true === $this->display['ewc_background']['display'] ) ) {
    77101            $background_image = ' ' . "url('" . $instance['background_image'] . "')";
    78102        } else {
     
    81105       
    82106        // Background repeat
    83         if ( !empty( $instance['background_repeat'] ) ) {
     107        if ( !empty( $instance['background_repeat'] )
     108            && ( !empty( $this->display['ewc_background']['display'] ) && true === $this->display['ewc_background']['display'] ) ) {
    84109            $background_repeat = ' ' . $instance['background_repeat'];
    85110        } else {
     
    88113       
    89114        // Background attachment
    90         if ( !empty( $instance['background_attachment'] ) ) {
     115        if ( !empty( $instance['background_attachment'] )
     116            && ( !empty( $this->display['ewc_background']['display'] ) && true === $this->display['ewc_background']['display'] ) ) {
    91117            $background_attachment = ' ' . $instance['background_attachment'];
    92118        } else {
     
    95121       
    96122        // Background position
    97         if ( !empty( $instance['background_position'] ) ) {
     123        if ( !empty( $instance['background_position'] )
     124            && ( !empty( $this->display['ewc_background']['display'] ) && true === $this->display['ewc_background']['display'] ) ) {
    98125            $background_position = ' ' . $instance['background_position'];
    99126        } else {
     
    102129       
    103130        // Background size
    104         if ( !empty( $instance['background_size'] ) && 'none' !== $instance['background_size'] ) {
     131        if ( !empty( $instance['background_size'] ) && 'none' !== $instance['background_size']
     132            && ( !empty( $this->display['ewc_background']['display'] ) && true === $this->display['ewc_background']['display'] ) ) {
    105133            $background_size = 'background-size:' . $instance['background_size'] . ';';
    106134        } else {
     
    113141        $padding_bottom = $instance['padding_bottom'];
    114142        $padding_left = $instance['padding_left'];
    115         $padding = 'padding:' . $padding_top . 'px ' . $padding_right . 'px ' . $padding_bottom . 'px ' . $padding_left . 'px;';
    116         if ( 'padding:0px 0px 0px 0px;' == $padding ) {
    117             $padding = '';
    118         }
    119        
     143        if ( ( !empty( $this->display['ewc_padding']['display'] ) && true === $this->display['ewc_padding']['display'] ) ) {
     144            $padding = 'padding:' . $padding_top . 'px ' . $padding_right . 'px ' . $padding_bottom . 'px ' . $padding_left . 'px;';
     145            if ( 'padding:0px 0px 0px 0px;' == $padding ) {
     146                $padding = '';
     147            }
     148        } else {
     149            $padding = '';
     150        }
     151       
    120152        // Margin
    121153        $margin_top = $instance['margin_top'];
     
    123155        $margin_bottom = $instance['margin_bottom'];
    124156        $margin_left = $instance['margin_left'];
    125         $margin = 'margin:' . $margin_top . 'px ' . $margin_right . 'px ' . $margin_bottom . 'px ' . $margin_left . 'px;';
    126         if ( 'margin:0px 0px 0px 0px;' == $margin ) {
    127             $margin = '';
    128         }
     157        if ( ( !empty( $this->display['ewc_margin']['display'] ) && true === $this->display['ewc_margin']['display'] ) ) {
     158            $margin = 'margin:' . $margin_top . 'px ' . $margin_right . 'px ' . $margin_bottom . 'px ' . $margin_left . 'px;';
     159            if ( 'margin:0px 0px 0px 0px;' == $margin ) {
     160                $margin = '';
     161            }
     162        } else {
     163            $margin = '';
     164        }
    129165       
    130166        // Inline styles
     
    145181       
    146182        // Custom Classes
    147         if ( !empty( $instance['custom_classes'] ) ) {
    148             $custom_classes = ' ' . $instance['custom_classes'];
     183        if ( ( !empty( $instance['custom_classes'] ) || !empty( $instance['preset_classes'] ) )
     184            && ( !empty( $this->display['ewc_class']['display'] ) && true === $this->display['ewc_class']['display'] ) ) {
     185           
     186            // Merge preset classes with custom classes
     187            if ( !empty( $instance['preset_classes'] ) && is_array( $instance['preset_classes'] ) ) {
     188                $custom_classes = explode( ' ', $instance['custom_classes'] );
     189                foreach ( $instance['preset_classes'] as $key => $value ) {
     190                    if ( !in_array( $value, $custom_classes ) ) {
     191                        $custom_classes[] = $value;
     192                    }
     193                }
     194                $custom_classes = ' ' . implode( ' ', $custom_classes );
     195            } else {
     196                $custom_classes = ' ' . $instance['custom_classes'];
     197            }
     198           
    149199        } else {
    150200            $custom_classes = '';
     
    163213       
    164214        // Assign the closing widget row markup
    165         if ( isset( $sidebar_id[$position_id-1] ) && !in_array( _get_widget_id_base( $sidebar_id[$position_id-1] ), array('ewc-row-divider') ) ) {
     215        if ( isset( $sidebar_id[$position_id-1] )
     216            && !in_array( _get_widget_id_base( $sidebar_id[$position_id-1] ), array( 'ewc-row-divider', 'ewc-subrow-divider' ) ) ) {
    166217           
    167218            // Get widget above options
     
    183234       
    184235        // Assign the opening widget row markup
    185         if ( isset( $sidebar_id[$position_id+1] ) && !in_array( _get_widget_id_base( $sidebar_id[$position_id+1] ), array('ewc-row-divider') ) ) {
     236        if ( isset( $sidebar_id[$position_id+1] )
     237            && !in_array( _get_widget_id_base( $sidebar_id[$position_id+1] ), array( 'ewc-row-divider', 'ewc-subrow-divider' ) ) ) {
    186238           
    187239            // Get widget below options
     
    218270        $instance = $old_instance;
    219271        $instance['show_options'] = strip_tags( $new_instance['show_options'] );
     272        $instance['show_background'] = strip_tags( $new_instance['show_background'] );
     273        $instance['show_margin'] = strip_tags( $new_instance['show_margin'] );
     274        $instance['show_padding'] = strip_tags( $new_instance['show_padding'] );
     275        $instance['show_class'] = strip_tags( $new_instance['show_class'] );
    220276        $instance['background_color'] = strip_tags( sanitize_hex_color( $new_instance['background_color'] ) );
    221277        $instance['background_image'] = esc_url( $new_instance['background_image'] );
     
    232288        $instance['margin_bottom'] = absint( $new_instance['margin_bottom'] );
    233289        $instance['margin_left'] = absint( $new_instance['margin_left'] );
    234         $instance['custom_classes'] = strip_tags( $new_instance['custom_classes'] );
     290        $instance['custom_classes'] = strip_tags( preg_replace( array( '/\s*,\s*/', '/\s+/' ), ' ', $new_instance['custom_classes'] ) );
     291        $instance['preset_classes'] = array_map( 'strip_tags', $new_instance['preset_classes'] );
    235292       
    236293        return $instance;
     
    245302    public function form( $instance ) {
    246303       
     304        // Sanitize filter values
     305        $show_background = !empty( $this->display['ewc_background']['active'] ) ? $this->display['ewc_background']['active'] : 0;
     306        $show_margin = !empty( $this->display['ewc_margin']['active'] ) ? $this->display['ewc_margin']['active'] : 0;
     307        $show_padding = !empty( $this->display['ewc_padding']['active'] ) ? $this->display['ewc_padding']['active'] : 0;
     308        $show_class = !empty( $this->display['ewc_class']['active'] ) ? $this->display['ewc_class']['active'] : 0;
     309       
     310        // Set widget default values
    247311        $defaults = array(
    248312            'show_options' => 0,
     313            'show_background' => $show_background,
     314            'show_margin' => $show_margin,
     315            'show_padding' => $show_padding,
     316            'show_class' => $show_class,
    249317            'background_color' => '',
    250318            'background_image' => '',
     
    262330            'margin_left' => 0,
    263331            'custom_classes' => '',
     332            'preset_classes' => array(),
    264333        );
    265         $instance = wp_parse_args( (array) $instance, $defaults ); ?>
    266        
    267         <p><?php _e('Use this widget to start or close a new row of widget columns.', 'easy-widget-columns'); ?></p> <?php
     334        $instance = wp_parse_args( (array) $instance, $defaults );  ?>
     335       
     336        <p><?php _e( 'Use this widget to start or close a new row of widget columns.', 'easy-widget-columns' ); ?></p> <?php
    268337       
    269338        if ( apply_filters( 'ewc_advanced_options', true ) ) { ?>
    270339       
    271             <input class="ewc-options-checkbox" id="<?php echo $this->get_field_id( 'show_options' ); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_options'); ?>" value="1" <?php checked( 1, $instance['show_options'] ); ?>/>
     340            <input type="checkbox" class="ewc-options-checkbox" id="<?php echo $this->get_field_id( 'show_options' ); ?>" name="<?php echo $this->get_field_name('show_options'); ?>" value="1" <?php checked( 1, $instance['show_options'] ); ?>/>
    272341            <label class="ewc-options-label" for="<?php echo $this->get_field_id( 'show_options' ); ?>"><?php _e( 'Advanced options', 'easy-widget-columns' ); ?></label>
    273342           
    274             <div class="ewc-row-styles">
    275                
    276                 <p>
    277                     <label class="ewc-section-label" for="<?php echo $this->get_field_id( 'background_color' ); ?>"><?php _e( 'Row background', 'easy-widget-columns' ); ?></label><br>
    278                     <label for="<?php echo $this->get_field_id( 'background_color' ); ?>"><?php _e( 'Color:', 'easy-widget-columns' ); ?></label><br />
    279                     <input class="color-picker" id="<?php echo $this->get_field_id( 'background_color' ); ?>" name="<?php echo $this->get_field_name( 'background_color' ); ?>" type="text" value="<?php echo $instance['background_color']; ?>" data-default-color=""/>
    280                 </p>
    281                
    282                 <p>
    283                     <label for="<?php echo $this->get_field_id( 'background_image' ); ?>"><?php _e( 'Image:', 'easy-widget-columns' ); ?></label>
    284                     <input type="text" class="widefat custom-media-url" name="<?php echo $this->get_field_name( 'background_image' ); ?>" id="<?php echo $this->get_field_id('background_image'); ?>" value="<?php echo $instance['background_image']; ?>" placeholder="<?php _e( 'Enter URL or select image', 'easy-widget-columns' ); ?>">
    285                     <input type="button" class="button custom-media-button" name="<?php echo $this->get_field_name( 'background_image' ); ?>" value="Select Image" style="margin-top:5px;" />
    286                 </p>
    287                
    288                 <span class="ewc-image-properties">
    289                    
    290                     <p class="first image-properties-dropdown">
    291                         <label for="<?php echo $this->get_field_id( 'background_repeat' ); ?>"><?php _e( 'Repeat:' ); ?></label><br />
    292                         <select id="<?php echo $this->get_field_id( 'background_repeat' ); ?>" name="<?php echo $this->get_field_name( 'background_repeat' ); ?>"> <?php
    293                             $repeat_options = array(
    294                                 __( 'Tile', 'easy-widget-columns' ) => 'repeat',
    295                                 __( 'Horizontal', 'easy-widget-columns' ) => 'repeat-x',
    296                                 __( 'Vertical', 'easy-widget-columns' ) => 'repeat-y',
    297                                 __( 'No Repeat', 'easy-widget-columns' ) => 'no-repeat',
    298                             );
    299                             foreach ( $repeat_options as $key => $value ) {
    300                                 echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_repeat'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
    301                             } ?>
    302                         </select>
     343            <div class="ewc-row-styles"> <?php
     344       
     345                if ( !empty( $this->display['ewc_background']['display'] ) && true === $this->display['ewc_background']['display'] ) { ?>
     346               
     347                <input type="checkbox" class="ewc-label-checkbox ewc-background-checkbox" id="<?php echo $this->get_field_id( 'show_background' ); ?>" name="<?php echo $this->get_field_name('show_background'); ?>" value="1" <?php checked( 1, $instance['show_background'] ); ?>/>
     348                <label class="ewc-section-label ewc-background-label" for="<?php echo $this->get_field_id( 'show_background' ); ?>"><?php _e( 'Row background', 'easy-widget-columns' ); ?></label>
     349               
     350                <div class="ewc-section-settings ewc-background-settings">
     351               
     352                    <p style="margin-top:2px;">
     353                        <label for="<?php echo $this->get_field_id( 'background_color' ); ?>"><?php _e( 'Color:', 'easy-widget-columns' ); ?></label><br />
     354                        <input class="color-picker" id="<?php echo $this->get_field_id( 'background_color' ); ?>" name="<?php echo $this->get_field_name( 'background_color' ); ?>" type="text" value="<?php echo $instance['background_color']; ?>" data-default-color=""/>
    303355                    </p>
    304356                   
    305                     <p class="image-properties-dropdown">
    306                         <label for="<?php echo $this->get_field_id( 'background_attachment' ); ?>"><?php _e( 'Attachment:' ); ?></label><br />
    307                         <select id="<?php echo $this->get_field_id( 'background_attachment' ); ?>" name="<?php echo $this->get_field_name( 'background_attachment' ); ?>"> <?php
    308                             $attachment_options = array(
    309                                 __( 'Scroll', 'easy-widget-columns' ) => 'scroll',
    310                                 __( 'Fixed', 'easy-widget-columns' ) => 'fixed',
    311                             );
    312                             foreach ( $attachment_options as $key => $value ) {
    313                                 echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_attachment'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
     357                    <label for="<?php echo $this->get_field_id( 'background_image' ); ?>"><?php _e( 'Image:', 'easy-widget-columns' ); ?></label>
     358                    <input required type="text" class="widefat custom-media-url" name="<?php echo $this->get_field_name( 'background_image' ); ?>" id="<?php echo $this->get_field_id('background_image'); ?>" value="<?php echo $instance['background_image']; ?>" placeholder="<?php _e( 'Enter URL or select image', 'easy-widget-columns' ); ?>"/>
     359                    <button type="button" class="button custom-media-button" id="<?php echo $this->get_field_id('media_button'); ?>" name="<?php echo $this->get_field_name( 'background_image' ); ?>"><?php _e( 'Select Image', 'easy-widget-columns' ); ?></button>
     360                   
     361                    <div class="ewc-image-properties">
     362                       
     363                        <p class="first image-properties-dropdown">
     364                            <label for="<?php echo $this->get_field_id( 'background_repeat' ); ?>"><?php _e( 'Repeat:' ); ?></label><br />
     365                            <select id="<?php echo $this->get_field_id( 'background_repeat' ); ?>" name="<?php echo $this->get_field_name( 'background_repeat' ); ?>"> <?php
     366                                $repeat_options = array(
     367                                    __( 'Tile', 'easy-widget-columns' ) => 'repeat',
     368                                    __( 'Horizontal', 'easy-widget-columns' ) => 'repeat-x',
     369                                    __( 'Vertical', 'easy-widget-columns' ) => 'repeat-y',
     370                                    __( 'No Repeat', 'easy-widget-columns' ) => 'no-repeat',
     371                                );
     372                                foreach ( $repeat_options as $key => $value ) {
     373                                    echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_repeat'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
     374                                } ?>
     375                            </select>
     376                        </p>
     377                       
     378                        <p class="image-properties-dropdown">
     379                            <label for="<?php echo $this->get_field_id( 'background_attachment' ); ?>"><?php _e( 'Attachment:' ); ?></label><br />
     380                            <select id="<?php echo $this->get_field_id( 'background_attachment' ); ?>" name="<?php echo $this->get_field_name( 'background_attachment' ); ?>"> <?php
     381                                $attachment_options = array(
     382                                    __( 'Scroll', 'easy-widget-columns' ) => 'scroll',
     383                                    __( 'Fixed', 'easy-widget-columns' ) => 'fixed',
     384                                );
     385                                foreach ( $attachment_options as $key => $value ) {
     386                                    echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_attachment'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
     387                                } ?>
     388                            </select>
     389                        </p>
     390                       
     391                        <p class="first image-properties-dropdown">
     392                            <label for="<?php echo $this->get_field_id( 'background_position' ); ?>"><?php _e( 'Position:' ); ?></label><br />
     393                            <select id="<?php echo $this->get_field_id( 'background_position' ); ?>" name="<?php echo $this->get_field_name( 'background_position' ); ?>"> <?php
     394                                $position_options = array(
     395                                    __( 'Left Top', 'easy-widget-columns' ) => 'left top',
     396                                    __( 'Left Center', 'easy-widget-columns' ) => 'left center',
     397                                    __( 'Left Bottom', 'easy-widget-columns' ) => 'left bottom',
     398                                    __( 'Right Top', 'easy-widget-columns' ) => 'right top',
     399                                    __( 'Right Center', 'easy-widget-columns' ) => 'right center',
     400                                    __( 'Right Bottom', 'easy-widget-columns' ) => 'right bottom',
     401                                    __( 'Center Top', 'easy-widget-columns' ) => 'center top',
     402                                    __( 'Center', 'easy-widget-columns' ) => 'center center',
     403                                    __( 'Center Bottom', 'easy-widget-columns' ) => 'center bottom',
     404                                );
     405                                foreach ( $position_options as $key => $value ) {
     406                                    echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_position'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
     407                                } ?>
     408                            </select>
     409                        </p>
     410                       
     411                        <p class="image-properties-dropdown">
     412                            <label for="<?php echo $this->get_field_id( 'background_size' ); ?>"><?php _e( 'Scale:' ); ?></label><br />
     413                            <select id="<?php echo $this->get_field_id( 'background_size' ); ?>" name="<?php echo $this->get_field_name( 'background_size' ); ?>"> <?php
     414                                $size_options = array(
     415                                    __( 'None', 'easy-widget-columns' ) => 'none',
     416                                    __( 'Cover', 'easy-widget-columns' ) => 'cover',
     417                                    __( 'Contain', 'easy-widget-columns' ) => 'contain',
     418                                );
     419                                foreach ( $size_options as $key => $value ) {
     420                                    echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_size'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
     421                                } ?>
     422                            </select>
     423                        </p>
     424                       
     425                    </div>
     426                   
     427                </div>
     428               
     429                <hr> <?php
     430               
     431                }
     432               
     433                if ( !empty( $this->display['ewc_margin']['display'] ) && true === $this->display['ewc_margin']['display'] ) { ?>
     434               
     435                <input type="checkbox" class="ewc-label-checkbox ewc-margin-checkbox" id="<?php echo $this->get_field_id( 'show_margin' ); ?>" name="<?php echo $this->get_field_name('show_margin'); ?>" value="1" <?php checked( 1, $instance['show_margin'] ); ?>/>
     436                <label class="ewc-section-label" for="<?php echo $this->get_field_id( 'show_margin' ); ?>"><?php _e('Row margin', 'easy-widget-columns'); ?></label>
     437               
     438                <div class="ewc-section-settings ewc-widget-table ewc-margin-settings">
     439                    <table class="ewc-margin-table">
     440                        <tr>
     441                            <td class="row-content">
     442                                <label class="row-label" for="<?php echo $this->get_field_id( 'margin_top' ); ?>"><?php _e( 'top:', 'easy-widget-columns' ); ?></label>
     443                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_top' ); ?>" name="<?php echo $this->get_field_name( 'margin_top' ); ?>" value="<?php echo $instance['margin_top']; ?>" style="width:50px;"/>
     444                                <label for="<?php echo $this->get_field_id( 'margin_top' ); ?>">px</label>
     445                            </td>
     446                            <td class="row-content">
     447                                <label class="row-label" for="<?php echo $this->get_field_id( 'margin_right' ); ?>"><?php _e( 'right:', 'easy-widget-columns' ); ?></label>
     448                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_right' ); ?>" name="<?php echo $this->get_field_name( 'margin_right' ); ?>" value="<?php echo $instance['margin_right']; ?>" style="width:50px;"/>
     449                                <label for="<?php echo $this->get_field_id( 'margin_right' ); ?>">px</label>
     450                            </td>
     451                        </tr>
     452                        <tr>
     453                            <td class="row-content">
     454                                <label class="row-label" for="<?php echo $this->get_field_id( 'margin_bottom' ); ?>"><?php _e( 'btm:', 'easy-widget-columns' ); ?></label>
     455                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_bottom' ); ?>" name="<?php echo $this->get_field_name( 'margin_bottom' ); ?>" value="<?php echo $instance['margin_bottom']; ?>" style="width:50px;"/>
     456                                <label for="<?php echo $this->get_field_id( 'margin_bottom' ); ?>">px</label>
     457                            </td>
     458                            <td class="row-content">
     459                                <label class="row-label" for="<?php echo $this->get_field_id( 'margin_left' ); ?>"><?php _e( 'left:', 'easy-widget-columns' ); ?></label>
     460                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_left' ); ?>" name="<?php echo $this->get_field_name( 'margin_left' ); ?>" value="<?php echo $instance['margin_left']; ?>" style="width:50px;"/>
     461                                <label for="<?php echo $this->get_field_id( 'margin_left' ); ?>">px</label>
     462                            </td>
     463                        </tr>
     464                    </table>
     465                </div>
     466               
     467                <hr> <?php
     468               
     469                }
     470               
     471                if ( !empty( $this->display['ewc_padding']['display'] ) && true === $this->display['ewc_padding']['display'] ) { ?>
     472               
     473                <input type="checkbox" class="ewc-label-checkbox ewc-padding-checkbox" id="<?php echo $this->get_field_id( 'show_padding' ); ?>" name="<?php echo $this->get_field_name('show_padding'); ?>" value="1" <?php checked( 1, $instance['show_padding'] ); ?>/>
     474                <label class="ewc-section-label" for="<?php echo $this->get_field_id( 'show_padding' ); ?>"><?php _e( 'Row padding', 'easy-widget-columns' ); ?></label>
     475               
     476                <div class="ewc-section-settings ewc-widget-table ewc-padding-settings">
     477                    <table class="ewc-padding-table">
     478                        <tr>
     479                            <td class="row-content">
     480                                <label class="row-label" for="<?php echo $this->get_field_id( 'padding_top' ); ?>"><?php _e( 'top:', 'easy-widget-columns' ); ?></label>
     481                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_top' ); ?>" name="<?php echo $this->get_field_name( 'padding_top' ); ?>" value="<?php echo $instance['padding_top']; ?>" style="width:50px;"/>
     482                                <label for="<?php echo $this->get_field_id( 'padding_top' ); ?>">px</label>
     483                            </td>
     484                            <td class="row-content">
     485                                <label class="row-label" for="<?php echo $this->get_field_id( 'padding_right' ); ?>"><?php _e( 'right:', 'easy-widget-columns' ); ?></label>
     486                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_right' ); ?>" name="<?php echo $this->get_field_name( 'padding_right' ); ?>" value="<?php echo $instance['padding_right']; ?>" style="width:50px;"/>
     487                                <label for="<?php echo $this->get_field_id( 'padding_right' ); ?>">px</label>
     488                            </td>
     489                        </tr>
     490                        <tr>
     491                            <td class="row-content">
     492                                <label class="row-label" for="<?php echo $this->get_field_id( 'padding_bottom' ); ?>"><?php _e( 'btm:', 'easy-widget-columns' ); ?></label>
     493                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_bottom' ); ?>" name="<?php echo $this->get_field_name( 'padding_bottom' ); ?>" value="<?php echo $instance['padding_bottom']; ?>" style="width:50px;"/>
     494                                <label for="<?php echo $this->get_field_id( 'padding_bottom' ); ?>">px</label>
     495                            </td>
     496                            <td class="row-content">
     497                                <label class="row-label" for="<?php echo $this->get_field_id( 'padding_left' ); ?>"><?php _e( 'left:', 'easy-widget-columns' ); ?></label>
     498                                <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_left' ); ?>" name="<?php echo $this->get_field_name( 'padding_left' ); ?>" value="<?php echo $instance['padding_left']; ?>" style="width:50px;"/>
     499                                <label for="<?php echo $this->get_field_id( 'padding_left' ); ?>">px</label>
     500                            </td>
     501                        </tr>
     502                    </table>
     503                </div>
     504               
     505                <hr> <?php
     506               
     507                }
     508               
     509                if ( !empty( $this->display['ewc_class']['display'] ) && true === $this->display['ewc_class']['display'] ) { ?>
     510               
     511                <input type="checkbox" class="ewc-label-checkbox ewc-class-checkbox" id="<?php echo $this->get_field_id( 'show_class' ); ?>" name="<?php echo $this->get_field_name('show_class'); ?>" value="1" <?php checked( 1, $instance['show_class'] ); ?>/>
     512                <label class="ewc-section-label" for="<?php echo $this->get_field_id( 'show_class' ); ?>"><?php _e( 'CSS classes', 'easy-widget-columns' ); ?></label>
     513               
     514                <div class="ewc-section-settings ewc-class-settings">
     515                    <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'custom_classes' ); ?>" name="<?php echo $this->get_field_name( 'custom_classes' ); ?>" value="<?php echo $instance['custom_classes']; ?>" placeholder="<?php _e( 'Enter custom classes', 'easy-widget-columns' ); ?>"/> <?php
     516                    $presets = apply_filters( 'ewc_preset_classes', array() );
     517                   
     518                    if ( !empty( $presets ) ) { ?>
     519                   
     520                        <ul class="ewc-preset-classes" id="<?php echo $this->get_field_id( 'preset_classes' ); ?>"> <?php
     521                           
     522                            foreach ( $presets as $preset ) {
     523                                $checked = '';
     524                                if ( isset( $instance['preset_classes'] ) && in_array( $preset, $instance['preset_classes'] ) ) {
     525                                    $checked = 'checked="checked"';
     526                                } ?>
     527                                <li>
     528                                    <input type="checkbox" class="ewc-preset-class" id="<?php echo $this->get_field_id( 'preset_classes' ) . '-' . $preset; ?>" name="<?php echo $this->get_field_name('preset_classes'); ?>[]" value="<?php echo $preset; ?>" <?php echo $checked; ?>/>
     529                                    <label class="ewc-preset-label" for="<?php echo $this->get_field_id( 'preset_classes' ) . '-' . $preset; ?>"><?php echo $preset; ?></label>
     530                                </li> <?php
    314531                            } ?>
    315                         </select>
    316                     </p>
    317                    
    318                     <p class="first image-properties-dropdown">
    319                         <label for="<?php echo $this->get_field_id( 'background_position' ); ?>"><?php _e( 'Position:' ); ?></label><br />
    320                         <select id="<?php echo $this->get_field_id( 'background_position' ); ?>" name="<?php echo $this->get_field_name( 'background_position' ); ?>"> <?php
    321                             $position_options = array(
    322                                 __( 'Left Top', 'easy-widget-columns' ) => 'left top',
    323                                 __( 'Left Center', 'easy-widget-columns' ) => 'left center',
    324                                 __( 'Left Bottom', 'easy-widget-columns' ) => 'left bottom',
    325                                 __( 'Right Top', 'easy-widget-columns' ) => 'right top',
    326                                 __( 'Right Center', 'easy-widget-columns' ) => 'right center',
    327                                 __( 'Right Bottom', 'easy-widget-columns' ) => 'right bottom',
    328                                 __( 'Center Top', 'easy-widget-columns' ) => 'center top',
    329                                 __( 'Center', 'easy-widget-columns' ) => 'center center',
    330                                 __( 'Center Bottom', 'easy-widget-columns' ) => 'center bottom',
    331                             );
    332                             foreach ( $position_options as $key => $value ) {
    333                                 echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_position'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
     532                           
     533                        </ul> <?php
     534                           
     535                        if ( 0 != count( $instance['preset_classes'] ) ) {
     536                           
     537                            if ( 1 == count( $instance['preset_classes'] ) ) {
     538                                $count_message = ' class checked above';
     539                            } else {
     540                                $count_message = ' classes checked above';
    334541                            } ?>
    335                         </select>
    336                     </p>
    337                    
    338                     <p class="image-properties-dropdown">
    339                         <label for="<?php echo $this->get_field_id( 'background_size' ); ?>"><?php _e( 'Scale:' ); ?></label><br />
    340                         <select id="<?php echo $this->get_field_id( 'background_size' ); ?>" name="<?php echo $this->get_field_name( 'background_size' ); ?>"> <?php
    341                             $size_options = array(
    342                                 __( 'None', 'easy-widget-columns' ) => 'none',
    343                                 __( 'Cover', 'easy-widget-columns' ) => 'cover',
    344                                 __( 'Contain', 'easy-widget-columns' ) => 'contain',
    345                             );
    346                             foreach ( $size_options as $key => $value ) {
    347                                 echo '<option value="' . $value . '" id="' . $value . '"', $instance['background_size'] == $value ? ' selected="selected"' : '', '>', $key, '</option>';
    348                             } ?>
    349                         </select>
    350                     </p>
    351                    
    352                 </span>
    353                
    354                 <hr>
    355                
    356                 <label class="ewc-section-label" style="margin-top:7px;"><?php _e('Row margin', 'easy-widget-columns'); ?></label>
    357                
    358                 <table class="ewc-widget-table">
    359                     <tr>
    360                         <td class="row-content">
    361                             <label class="row-label" for="<?php echo $this->get_field_id( 'margin_top' ); ?>"><?php _e( 'top:', 'easy-widget-columns' ); ?></label>
    362                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_top' ); ?>" name="<?php echo $this->get_field_name( 'margin_top' ); ?>" value="<?php echo $instance['margin_top']; ?>" style="width:50px;" />
    363                             <label for="<?php echo $this->get_field_id( 'margin_top' ); ?>">px</label>
    364                         </td>
    365                         <td class="row-content">
    366                             <label class="row-label" for="<?php echo $this->get_field_id( 'margin_right' ); ?>"><?php _e( 'right:', 'easy-widget-columns' ); ?></label>
    367                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_right' ); ?>" name="<?php echo $this->get_field_name( 'margin_right' ); ?>" value="<?php echo $instance['margin_right']; ?>" style="width:50px;" />
    368                             <label for="<?php echo $this->get_field_id( 'margin_right' ); ?>">px</label>
    369                         </td>
    370                     </tr>
    371                     <tr>
    372                         <td class="row-content">
    373                             <label class="row-label" for="<?php echo $this->get_field_id( 'margin_bottom' ); ?>"><?php _e( 'btm:', 'easy-widget-columns' ); ?></label>
    374                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_bottom' ); ?>" name="<?php echo $this->get_field_name( 'margin_bottom' ); ?>" value="<?php echo $instance['margin_bottom']; ?>" style="width:50px;" />
    375                             <label for="<?php echo $this->get_field_id( 'margin_bottom' ); ?>">px</label>
    376                         </td>
    377                         <td class="row-content">
    378                             <label class="row-label" for="<?php echo $this->get_field_id( 'margin_left' ); ?>"><?php _e( 'left:', 'easy-widget-columns' ); ?></label>
    379                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'margin_left' ); ?>" name="<?php echo $this->get_field_name( 'margin_left' ); ?>" value="<?php echo $instance['margin_left']; ?>" style="width:50px;" />
    380                             <label for="<?php echo $this->get_field_id( 'margin_left' ); ?>">px</label>
    381                         </td>
    382                     </tr>
    383                 </table>
    384                
    385                 <hr><label class="ewc-section-label" style="margin-top:7px;"><?php _e( 'Row padding', 'easy-widget-columns' ); ?></label>
    386                
    387                 <table class="ewc-widget-table">
    388                     <tr>
    389                         <td class="row-content">
    390                             <label class="row-label" for="<?php echo $this->get_field_id( 'padding_top' ); ?>"><?php _e( 'top:', 'easy-widget-columns' ); ?></label>
    391                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_top' ); ?>" name="<?php echo $this->get_field_name( 'padding_top' ); ?>" value="<?php echo $instance['padding_top']; ?>" style="width:50px;" />
    392                             <label for="<?php echo $this->get_field_id( 'padding_top' ); ?>">px</label>
    393                         </td>
    394                         <td class="row-content">
    395                             <label class="row-label" for="<?php echo $this->get_field_id( 'padding_right' ); ?>"><?php _e( 'right:', 'easy-widget-columns' ); ?></label>
    396                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_right' ); ?>" name="<?php echo $this->get_field_name( 'padding_right' ); ?>" value="<?php echo $instance['padding_right']; ?>" style="width:50px;" />
    397                             <label for="<?php echo $this->get_field_id( 'padding_right' ); ?>">px</label>
    398                         </td>
    399                     </tr>
    400                     <tr>
    401                         <td class="row-content">
    402                             <label class="row-label" for="<?php echo $this->get_field_id( 'padding_bottom' ); ?>"><?php _e( 'btm:', 'easy-widget-columns' ); ?></label>
    403                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_bottom' ); ?>" name="<?php echo $this->get_field_name( 'padding_bottom' ); ?>" value="<?php echo $instance['padding_bottom']; ?>" style="width:50px;" />
    404                             <label for="<?php echo $this->get_field_id( 'padding_bottom' ); ?>">px</label>
    405                         </td>
    406                         <td class="row-content">
    407                             <label class="row-label" for="<?php echo $this->get_field_id( 'padding_left' ); ?>"><?php _e( 'left:', 'easy-widget-columns' ); ?></label>
    408                             <input type="number" step="1" min="0" id="<?php echo $this->get_field_id( 'padding_left' ); ?>" name="<?php echo $this->get_field_name( 'padding_left' ); ?>" value="<?php echo $instance['padding_left']; ?>" style="width:50px;" />
    409                             <label for="<?php echo $this->get_field_id( 'padding_left' ); ?>">px</label>
    410                         </td>
    411                     </tr>
    412                 </table>
    413                
    414                 <hr>
    415                
    416                 <p>
    417                     <label class="ewc-section-label" for="<?php echo $this->get_field_id( 'custom_classes' ); ?>"><?php _e( 'Custom classes', 'easy-widget-columns' ); ?></label>
    418                     <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'custom_classes' ); ?>" name="<?php echo $this->get_field_name( 'custom_classes' ); ?>" value="<?php echo $instance['custom_classes']; ?>" />
    419                     <span class="description" style="padding-left:2px;"><em><?php _e( 'Separate classes by a space.', 'easy-widget-columns' ) ?></em></span>
    420                 </p>
     542                       
     543                            <p class="checked-count description" style="padding-bottom:0;">
     544                                <?php echo count( $instance['preset_classes'] ) . $count_message; ?>
     545                            </p> <?php
     546                       
     547                        }
     548                       
     549                    } ?>
     550                </div>
     551               
     552                <hr> <?php
     553               
     554                } ?>
    421555                               
    422556            </div> <?php
  • easy-widget-columns/trunk/widgets/js/image-upload.js

    r1610881 r1712728  
    55 * in the Row Divider widget.
    66 *
    7  * @since      1.1.5
     7 * @since   1.1.5
    88 *
    99 */
     
    1616        var media_frame;
    1717       
     18        // Prepare the variable that holds our custom input field ID.
     19        var target_input;
     20       
    1821        // Bind to our click event in order to open up the new media experience.
    19         $( document.body ).on( 'click.ewcOpenMediaManager', '.custom-media-button', function( e ) {
     22        $( document.body ).on( 'click.ajvOpenMediaManager', '.custom-media-button', function( e ) {
    2023           
    2124            // Prevent the default action from occuring.
    2225            e.preventDefault();
    23    
    24             // If the frame already exists, re-open it.
    25             if ( media_frame ) {
    26                 media_frame.open();
    27                 return;
    28             }
    29    
    30             //Create custom media frame. Refer to the wp-includes/js/media-views.js file for more default options.
     26           
     27            // Get our custom input field ID.
     28            var target_input = $( this ).prev().attr( 'id' );
     29           
     30            // Create custom media frame. Refer to the wp-includes/js/media-views.js file for more default options.
    3131            media_frame = wp.media.frames.media_frame = wp.media( {
    3232               
    3333                // Custom class name for our media frame.
    34                 className: 'media-frame ewc-media-frame',
     34                className: 'media-frame ajv-media-frame',
    3535                // Assign 'select' workflow since we only want to upload an image. Use the 'post' workflow for posts.
    3636                frame: 'select',
    3737                // Allow mutiple file uploads.
    3838                multiple: false,
    39                 // Set custom media workflow title using the localized script object 'widget_script_handle'.
    40                 title: 'Choose or Upload Image',
     39                // Set custom media workflow title using the localized script object 'ajv_image_upload'.
     40                title: ajv_image_upload.frame_title,
    4141                // Limit media library access to images only.
    4242                library: {
    4343                    type: 'image'
    4444                },
    45                 // Set custom button text using the localized script object 'widget_script_handle'.
     45                // Set custom button text using the localized script object 'ajv_image_upload'.
    4646                button: {
    47                     text:'Insert Image'
     47                    text: ajv_image_upload.frame_button
    4848                }
    4949               
    5050            } );
    5151   
    52             media_frame.on('select', function() {
     52            media_frame.on( 'select', function() {
    5353               
    5454                // Grab our attachment selection and construct a JSON representation of the model.
     
    5656               
    5757                // Send the attachment URL to our custom input field via jQuery.
    58                 $( '.custom-media-url' ).val( media_attachment.url );
    59                 $( '.custom-media-url' ).trigger( 'change' ); // Necessary to trigger refresh in Customizer.
     58                $( '#' + target_input ).val( media_attachment.url );
     59                $( '#' + target_input ).trigger( 'change' ); // Necessary to trigger refresh in Customizer.
    6060               
    6161            } );
  • easy-widget-columns/trunk/widgets/js/image-upload.min.js

    r1610881 r1712728  
    1 (function($){$(document).ready(function(){var media_frame;$(document.body).on('click.ewcOpenMediaManager','.custom-media-button',function(e){e.preventDefault();if(media_frame){media_frame.open();return;}media_frame=wp.media.frames.media_frame=wp.media({className:'media-frame ewc-media-frame',frame:'select',multiple:false,title:'Choose or Upload Image',library:{type:'image'},button:{text:'Insert Image'}});media_frame.on('select',function(){var media_attachment=media_frame.state().get('selection').first().toJSON();$('.custom-media-url').val(media_attachment.url);$('.custom-media-url').trigger('change');});media_frame.open();});});})(jQuery);
     1(function($){$(document).ready(function(){var media_frame;var target_input;$(document.body).on('click.ajvOpenMediaManager','.custom-media-button',function(e){e.preventDefault();var target_input=$(this).prev().attr('id');media_frame=wp.media.frames.media_frame=wp.media({className:'media-frame ajv-media-frame',frame:'select',multiple:false,title:ajv_image_upload.frame_title,library:{type:'image'},button:{text:ajv_image_upload.frame_button}});media_frame.on('select',function(){var media_attachment=media_frame.state().get('selection').first().toJSON();$('#'+target_input).val(media_attachment.url);$('#'+target_input).trigger('change');});media_frame.open();});});})(jQuery);
Note: See TracChangeset for help on using the changeset viewer.