Changeset 1712728
- Timestamp:
- 08/13/2017 07:06:44 AM (9 years ago)
- Location:
- easy-widget-columns
- Files:
-
- 22 edited
- 30 copied
-
assets/screenshot-2.png (modified) (previous)
-
tags/1.1.8 (copied) (copied from easy-widget-columns/trunk)
-
tags/1.1.8/LICENSE.txt (copied) (copied from easy-widget-columns/trunk/LICENSE.txt)
-
tags/1.1.8/README.txt (copied) (copied from easy-widget-columns/trunk/README.txt)
-
tags/1.1.8/admin (copied) (copied from easy-widget-columns/trunk/admin)
-
tags/1.1.8/admin/css/easy-widget-columns-admin.css (copied) (copied from easy-widget-columns/trunk/admin/css/easy-widget-columns-admin.css)
-
tags/1.1.8/admin/css/easy-widget-columns-admin.min.css (copied) (copied from easy-widget-columns/trunk/admin/css/easy-widget-columns-admin.min.css)
-
tags/1.1.8/easy-widget-columns.php (copied) (copied from easy-widget-columns/trunk/easy-widget-columns.php)
-
tags/1.1.8/includes (copied) (copied from easy-widget-columns/trunk/includes)
-
tags/1.1.8/includes/class-easy-widget-columns.php (copied) (copied from easy-widget-columns/trunk/includes/class-easy-widget-columns.php)
-
tags/1.1.8/index.php (copied) (copied from easy-widget-columns/trunk/index.php)
-
tags/1.1.8/languages (copied) (copied from easy-widget-columns/trunk/languages)
-
tags/1.1.8/public (copied) (copied from easy-widget-columns/trunk/public)
-
tags/1.1.8/uninstall.php (copied) (copied from easy-widget-columns/trunk/uninstall.php)
-
tags/1.1.8/widgets (copied) (copied from easy-widget-columns/trunk/widgets)
-
tags/1.1.8/widgets/class-widget-row-divider.php (copied) (copied from easy-widget-columns/trunk/widgets/class-widget-row-divider.php)
-
tags/1.2.0 (copied) (copied from easy-widget-columns/trunk)
-
tags/1.2.0/LICENSE.txt (copied) (copied from easy-widget-columns/trunk/LICENSE.txt)
-
tags/1.2.0/README.txt (copied) (copied from easy-widget-columns/trunk/README.txt) (9 diffs)
-
tags/1.2.0/admin (copied) (copied from easy-widget-columns/trunk/admin)
-
tags/1.2.0/admin/class-easy-widget-columns-control.php (modified) (3 diffs)
-
tags/1.2.0/admin/css/easy-widget-columns-admin.css (copied) (copied from easy-widget-columns/trunk/admin/css/easy-widget-columns-admin.css) (4 diffs)
-
tags/1.2.0/admin/css/easy-widget-columns-admin.min.css (copied) (copied from easy-widget-columns/trunk/admin/css/easy-widget-columns-admin.min.css) (1 diff)
-
tags/1.2.0/easy-widget-columns.php (copied) (copied from easy-widget-columns/trunk/easy-widget-columns.php) (1 diff)
-
tags/1.2.0/includes (copied) (copied from easy-widget-columns/trunk/includes)
-
tags/1.2.0/includes/class-easy-widget-columns-i18n.php (modified) (2 diffs)
-
tags/1.2.0/includes/class-easy-widget-columns.php (copied) (copied from easy-widget-columns/trunk/includes/class-easy-widget-columns.php) (1 diff)
-
tags/1.2.0/index.php (copied) (copied from easy-widget-columns/trunk/index.php)
-
tags/1.2.0/languages (copied) (copied from easy-widget-columns/trunk/languages)
-
tags/1.2.0/languages/easy-widget-columns.pot (modified) (4 diffs)
-
tags/1.2.0/public (copied) (copied from easy-widget-columns/trunk/public)
-
tags/1.2.0/public/class-easy-widget-columns-public.php (modified) (1 diff)
-
tags/1.2.0/uninstall.php (copied) (copied from easy-widget-columns/trunk/uninstall.php) (1 diff)
-
tags/1.2.0/widgets (copied) (copied from easy-widget-columns/trunk/widgets)
-
tags/1.2.0/widgets/class-easy-widget-columns-widgets.php (modified) (3 diffs)
-
tags/1.2.0/widgets/class-widget-row-divider.php (copied) (copied from easy-widget-columns/trunk/widgets/class-widget-row-divider.php) (16 diffs)
-
tags/1.2.0/widgets/js/image-upload.js (modified) (3 diffs)
-
tags/1.2.0/widgets/js/image-upload.min.js (modified) (1 diff)
-
trunk/README.txt (modified) (9 diffs)
-
trunk/admin/class-easy-widget-columns-control.php (modified) (3 diffs)
-
trunk/admin/css/easy-widget-columns-admin.css (modified) (4 diffs)
-
trunk/admin/css/easy-widget-columns-admin.min.css (modified) (1 diff)
-
trunk/easy-widget-columns.php (modified) (1 diff)
-
trunk/includes/class-easy-widget-columns-i18n.php (modified) (2 diffs)
-
trunk/includes/class-easy-widget-columns.php (modified) (1 diff)
-
trunk/languages/easy-widget-columns.pot (modified) (4 diffs)
-
trunk/public/class-easy-widget-columns-public.php (modified) (1 diff)
-
trunk/uninstall.php (modified) (1 diff)
-
trunk/widgets/class-easy-widget-columns-widgets.php (modified) (3 diffs)
-
trunk/widgets/class-widget-row-divider.php (modified) (16 diffs)
-
trunk/widgets/js/image-upload.js (modified) (3 diffs)
-
trunk/widgets/js/image-upload.min.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
easy-widget-columns/tags/1.2.0/README.txt
r1624214 r1712728 1 1 === Easy Widget Columns === 2 2 Contributors: ajvillegas 3 Donate link: 3 Donate link: 4 4 Tags: widget, admin, columns, layout, widget columns 5 5 Requires at least: 4.5 6 6 Tested up to: 4.8 7 Stable tag: 1. 1.87 Stable tag: 1.2.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 15 15 Easy 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. 16 16 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.17 You 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. 18 18 19 19 > **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. … … 29 29 **Filters for Developers** 30 30 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: 31 The 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 42 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. 43 44 The examples below demonstrate how you can implement these filters on your theme. 39 45 40 46 `add_filter( 'ewc_include_widgets', 'myprefix_add_ewc_control' ); … … 49 55 $ewc_widgets = array( 50 56 'meta', // WP Meta widget 51 //'nav_menu', // WP Custom Menu widget52 57 'archives', // WP Archives widget 53 58 'calendar', // WP Calendar widget 54 59 'categories', // WP Categories widget 55 //'links', // WP Links widget56 //'pages', // WP Pages widget57 //'recent-comments', // WP Recent Comments widget58 //'recent-posts', // WP Recent Posts widget59 //'rss', // WP RSS widget60 //'search', // WP Search widget61 //'tag_cloud', // WP Tag Cloud widget62 //'text', // WP Text widget63 60 ); 64 61 … … 77 74 78 75 $ewc_widgets = array( 79 //'meta', // WP Meta widget80 //'nav_menu', // WP Custom Menu widget81 'archives', // WP Archives widget82 'calendar', // WP Calendar widget83 'categories', // WP Categories widget84 'links', // WP Links widget85 //'pages', // WP Pages widget86 76 'recent-comments', // WP Recent Comments widget 87 77 'recent-posts', // WP Recent Posts widget 88 78 'rss', // WP RSS widget 89 //'search', // WP Search widget90 79 'tag_cloud', // WP Tag Cloud widget 91 //'text', // WP Text widget92 80 ); 93 81 … … 96 84 }` 97 85 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 88 This 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 90 The example below demonstrates how you can implement this filter on your theme. 101 91 102 92 `add_filter( 'ewc_color_palette', 'myprefix_ewc_color_palette' ); … … 122 112 }` 123 113 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 116 This filter allows you assign preset CSS classes that display as a checkbox list in the 'Widget Row' widget. 117 118 The 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 */ 127 function 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 142 This 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 144 The following example demonstrates how to completely remove all advanced options. 145 146 `// Remove all advanced options from the Widget Row widget 129 147 add_filter( 'ewc_advanced_options', '__return_false' );` 148 149 The 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 */ 158 function 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 }` 130 182 131 183 == Installation == … … 169 221 170 222 To 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 224 To 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. 171 225 172 226 **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. … … 184 238 == Changelog == 185 239 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 186 251 = 1.1.8 = 187 252 * 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 141 141 142 142 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 ) ) ) { 144 144 return; 145 145 } 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 ) ) ) { 147 147 return; 148 148 } … … 221 221 // Get the widget's position in the sidebar 222 222 $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 } 224 239 225 240 // 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 ) ) ) { 227 247 $first = 'first '; 228 248 } else { … … 231 251 232 252 // Determine last widget in sidebar and assign closing row markup 233 if ( ( end( $sidebar s_widgets[$params[0]['id']]) == $params[0]['widget_id'] ) ) {253 if ( ( end( $sidebar_id ) == $params[0]['widget_id'] ) ) { 234 254 $wrap_close = '</div></div>'; 235 255 } else { -
easy-widget-columns/tags/1.2.0/admin/css/easy-widget-columns-admin.css
r1611642 r1712728 185 185 .select2-container--ewc-select .select2-results { 186 186 display: block; 187 max-height: 300px; 188 padding: 0; 189 margin: 0; 187 190 } 188 191 … … 545 548 display: block; 546 549 } 550 551 input[type=checkbox].ewc-label-checkbox { 552 display: none; 553 } 554 555 input[type=checkbox].ewc-background-checkbox ~ .ewc-background-settings, 556 input[type=checkbox].ewc-margin-checkbox ~ .ewc-margin-settings, 557 input[type=checkbox].ewc-padding-checkbox ~ .ewc-padding-settings, 558 input[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 565 input[type=checkbox].ewc-background-checkbox:checked ~ .ewc-background-settings, 566 input[type=checkbox].ewc-margin-checkbox:checked ~ .ewc-margin-settings, 567 input[type=checkbox].ewc-padding-checkbox:checked ~ .ewc-padding-settings, 568 input[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 } 547 573 548 574 .ewc-row-styles { 575 position: relative; 549 576 border: 1px solid #eee; 550 padding: 0 10px;577 padding: 7px 10px 5px; 551 578 background: #fcfcfc; 552 579 margin-bottom: 15px; 553 580 } 554 581 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 555 591 .ewc-section-label { 556 592 display: inline-block; 557 margin -bottom: 5px;593 margin: 7px 0; 558 594 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 609 input[type=checkbox].ewc-label-checkbox:checked + .ewc-section-label:after { 610 content: "\f142"; 563 611 } 564 612 … … 579 627 .wp-customizer .ewc-widget-table .row-label { 580 628 width: 30px; 629 } 630 631 .button.custom-media-button { 632 margin: 5px 0 8px; 633 } 634 635 input.custom-media-url:invalid ~ .ewc-image-properties { 636 display: none; 637 } 638 639 .ewc-image-properties { 640 margin-top: 8px; 581 641 } 582 642 … … 600 660 .image-properties-dropdown select { 601 661 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 17 17 * Plugin URI: http://www.alexisvillegas.com/plugins/easy-widget-columns 18 18 * Description: Easily display widgets in rows of columns. 19 * Version: 1. 1.819 * Version: 1.2.0 20 20 * Author: Alexis J. Villegas 21 21 * Author URI: http://www.alexisvillegas.com -
easy-widget-columns/tags/1.2.0/includes/class-easy-widget-columns-i18n.php
r1610881 r1712728 27 27 class Easy_Widget_Columns_i18n { 28 28 29 30 29 /** 31 30 * Load the plugin text domain for translation. … … 43 42 } 44 43 45 46 47 44 } -
easy-widget-columns/tags/1.2.0/includes/class-easy-widget-columns.php
r1611687 r1712728 70 70 71 71 $this->plugin_name = 'easy-widget-columns'; 72 $this->version = '1. 1.8';72 $this->version = '1.2.0'; 73 73 $this->load_dependencies(); 74 74 $this->set_locale(); -
easy-widget-columns/tags/1.2.0/languages/easy-widget-columns.pot
r1610881 r1712728 4 4 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" 5 5 "Project-Id-Version: Easy Widget Columns\n" 6 "POT-Creation-Date: 2017-0 2-22 15:47-0800\n"7 "PO-Revision-Date: 2017-0 2-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" 8 8 "Last-Translator: \n" 9 9 "Language-Team: \n" … … 11 11 "Content-Type: text/plain; charset=UTF-8\n" 12 12 "Content-Transfer-Encoding: 8bit\n" 13 "X-Generator: Poedit 1.8.12\n"13 "X-Generator: Poedit 2.0.3\n" 14 14 "X-Poedit-Basepath: ..\n" 15 "X-Poedit-Flags-xgettext: --add-comments=translators:\n" 15 16 "X-Poedit-WPHeader: easy-widget-columns.php\n" 16 17 "X-Poedit-SourceCharset: UTF-8\n" … … 92 93 93 94 #: admin/partials/easy-widget-columns-widget-form.php:17 94 #: widgets/class-widget-row-divider.php: 33495 #: widgets/class-widget-row-divider.php:415 95 96 msgid "None" 96 97 msgstr "" … … 128 129 msgstr "" 129 130 131 #: widgets/class-easy-widget-columns-widgets.php:107 132 msgid "Choose or Upload Image" 133 msgstr "" 134 135 #: widgets/class-easy-widget-columns-widgets.php:108 136 msgid "Insert Image" 137 msgstr "" 138 130 139 #: widgets/class-widget-row-divider.php:27 131 #: widgets/class-widget-row-divider.php: 259140 #: widgets/class-widget-row-divider.php:336 132 141 msgid "Use this widget to start or close a new row of widget columns." 133 142 msgstr "" 134 143 135 #: widgets/class-widget-row-divider.php: 35144 #: widgets/class-widget-row-divider.php:57 136 145 msgid "Widget Row" 137 146 msgstr "" 138 147 139 #: widgets/class-widget-row-divider.php: 264148 #: widgets/class-widget-row-divider.php:341 140 149 msgid "Advanced options" 141 150 msgstr "" 142 151 143 #: widgets/class-widget-row-divider.php: 269152 #: widgets/class-widget-row-divider.php:348 144 153 msgid "Row background" 145 154 msgstr "" 146 155 147 #: widgets/class-widget-row-divider.php: 270156 #: widgets/class-widget-row-divider.php:353 148 157 msgid "Color:" 149 158 msgstr "" 150 159 151 #: widgets/class-widget-row-divider.php: 275160 #: widgets/class-widget-row-divider.php:357 152 161 msgid "Image:" 153 162 msgstr "" 154 163 155 #: widgets/class-widget-row-divider.php: 276164 #: widgets/class-widget-row-divider.php:358 156 165 msgid "Enter URL or select image" 157 166 msgstr "" 158 167 159 #: widgets/class-widget-row-divider.php:283 168 #: widgets/class-widget-row-divider.php:359 169 msgid "Select Image" 170 msgstr "" 171 172 #: widgets/class-widget-row-divider.php:364 160 173 msgid "Repeat:" 161 174 msgstr "" 162 175 163 #: widgets/class-widget-row-divider.php: 286176 #: widgets/class-widget-row-divider.php:367 164 177 msgid "Tile" 165 178 msgstr "" 166 179 167 #: widgets/class-widget-row-divider.php: 287180 #: widgets/class-widget-row-divider.php:368 168 181 msgid "Horizontal" 169 182 msgstr "" 170 183 171 #: widgets/class-widget-row-divider.php: 288184 #: widgets/class-widget-row-divider.php:369 172 185 msgid "Vertical" 173 186 msgstr "" 174 187 175 #: widgets/class-widget-row-divider.php: 289188 #: widgets/class-widget-row-divider.php:370 176 189 msgid "No Repeat" 177 190 msgstr "" 178 191 179 #: widgets/class-widget-row-divider.php: 298192 #: widgets/class-widget-row-divider.php:379 180 193 msgid "Attachment:" 181 194 msgstr "" 182 195 183 #: widgets/class-widget-row-divider.php:3 01196 #: widgets/class-widget-row-divider.php:382 184 197 msgid "Scroll" 185 198 msgstr "" 186 199 187 #: widgets/class-widget-row-divider.php:3 02200 #: widgets/class-widget-row-divider.php:383 188 201 msgid "Fixed" 189 202 msgstr "" 190 203 191 #: widgets/class-widget-row-divider.php:3 11204 #: widgets/class-widget-row-divider.php:392 192 205 msgid "Position:" 193 206 msgstr "" 194 207 195 #: widgets/class-widget-row-divider.php:3 14208 #: widgets/class-widget-row-divider.php:395 196 209 msgid "Left Top" 197 210 msgstr "" 198 211 199 #: widgets/class-widget-row-divider.php:3 15212 #: widgets/class-widget-row-divider.php:396 200 213 msgid "Left Center" 201 214 msgstr "" 202 215 203 #: widgets/class-widget-row-divider.php:3 16216 #: widgets/class-widget-row-divider.php:397 204 217 msgid "Left Bottom" 205 218 msgstr "" 206 219 207 #: widgets/class-widget-row-divider.php:3 17220 #: widgets/class-widget-row-divider.php:398 208 221 msgid "Right Top" 209 222 msgstr "" 210 223 211 #: widgets/class-widget-row-divider.php:3 18224 #: widgets/class-widget-row-divider.php:399 212 225 msgid "Right Center" 213 226 msgstr "" 214 227 215 #: widgets/class-widget-row-divider.php: 319228 #: widgets/class-widget-row-divider.php:400 216 229 msgid "Right Bottom" 217 230 msgstr "" 218 231 219 #: widgets/class-widget-row-divider.php: 320232 #: widgets/class-widget-row-divider.php:401 220 233 msgid "Center Top" 221 234 msgstr "" 222 235 223 #: widgets/class-widget-row-divider.php: 321236 #: widgets/class-widget-row-divider.php:402 224 237 msgid "Center" 225 238 msgstr "" 226 239 227 #: widgets/class-widget-row-divider.php: 322240 #: widgets/class-widget-row-divider.php:403 228 241 msgid "Center Bottom" 229 242 msgstr "" 230 243 231 #: widgets/class-widget-row-divider.php: 331244 #: widgets/class-widget-row-divider.php:412 232 245 msgid "Scale:" 233 246 msgstr "" 234 247 235 #: widgets/class-widget-row-divider.php: 335248 #: widgets/class-widget-row-divider.php:416 236 249 msgid "Cover" 237 250 msgstr "" 238 251 239 #: widgets/class-widget-row-divider.php: 336252 #: widgets/class-widget-row-divider.php:417 240 253 msgid "Contain" 241 254 msgstr "" 242 255 243 #: widgets/class-widget-row-divider.php: 348256 #: widgets/class-widget-row-divider.php:436 244 257 msgid "Row margin" 245 258 msgstr "" 246 259 247 #: widgets/class-widget-row-divider.php: 353248 #: widgets/class-widget-row-divider.php: 382260 #: widgets/class-widget-row-divider.php:442 261 #: widgets/class-widget-row-divider.php:480 249 262 msgid "top:" 250 263 msgstr "" 251 264 252 #: widgets/class-widget-row-divider.php: 358253 #: widgets/class-widget-row-divider.php: 387265 #: widgets/class-widget-row-divider.php:447 266 #: widgets/class-widget-row-divider.php:485 254 267 msgid "right:" 255 268 msgstr "" 256 269 257 #: widgets/class-widget-row-divider.php: 365258 #: widgets/class-widget-row-divider.php: 394270 #: widgets/class-widget-row-divider.php:454 271 #: widgets/class-widget-row-divider.php:492 259 272 msgid "btm:" 260 273 msgstr "" 261 274 262 #: widgets/class-widget-row-divider.php: 370263 #: widgets/class-widget-row-divider.php: 399275 #: widgets/class-widget-row-divider.php:459 276 #: widgets/class-widget-row-divider.php:497 264 277 msgid "left:" 265 278 msgstr "" 266 279 267 #: widgets/class-widget-row-divider.php: 377280 #: widgets/class-widget-row-divider.php:474 268 281 msgid "Row padding" 269 282 msgstr "" 270 283 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 285 msgid "CSS classes" 286 msgstr "" 287 288 #: widgets/class-widget-row-divider.php:515 289 msgid "Enter custom classes" 290 msgstr "" 291 292 #: widgets/class-widget-subrow-divider.php:28 293 #: widgets/class-widget-subrow-divider.php:72 294 msgid "Use this widget to start a new sub-row of widget columns." 295 msgstr "" 296 297 #: widgets/class-widget-subrow-divider.php:36 298 msgid "sub-row" 277 299 msgstr "" 278 300 -
easy-widget-columns/tags/1.2.0/public/class-easy-widget-columns-public.php
r1610881 r1712728 87 87 // Check if current locale is RTL (Right To Left) 88 88 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%;}'; 90 90 } 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%;}'; 92 92 } 93 93 -
easy-widget-columns/tags/1.2.0/uninstall.php
r1611000 r1712728 34 34 35 35 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 ); 37 37 38 38 delete_option( 'easy-widget-columns' ); -
easy-widget-columns/tags/1.2.0/widgets/class-easy-widget-columns-widgets.php
r1610881 r1712728 63 63 64 64 /** 65 * The class responsible for defining the Row Dividerwidget.65 * The class responsible for defining the Widget Row widget. 66 66 */ 67 67 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'; 68 73 69 74 } … … 97 102 // Image uploader 98 103 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' ); 100 112 101 113 } … … 159 171 public function register_widgets() { 160 172 161 // Register the Row Dividerwidget173 // Register the Widget Row widget 162 174 register_widget( 'EWC_Row_Divider' ); 175 176 // Register the Sub-Row widget 177 register_widget( 'EWC_Sub_Row_Divider' ); 163 178 164 179 } -
easy-widget-columns/tags/1.2.0/widgets/class-widget-row-divider.php
r1611687 r1712728 33 33 ); 34 34 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 35 57 parent::__construct( 'ewc-row-divider', '— ' . __( 'Widget Row', 'easy-widget-columns' ) . ' —', $widget_ops, $control_ops ); 36 58 … … 67 89 68 90 // 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'] ) ) { 70 93 $background_color = $instance['background_color']; 71 94 } else { … … 74 97 75 98 // 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'] ) ) { 77 101 $background_image = ' ' . "url('" . $instance['background_image'] . "')"; 78 102 } else { … … 81 105 82 106 // 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'] ) ) { 84 109 $background_repeat = ' ' . $instance['background_repeat']; 85 110 } else { … … 88 113 89 114 // 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'] ) ) { 91 117 $background_attachment = ' ' . $instance['background_attachment']; 92 118 } else { … … 95 121 96 122 // 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'] ) ) { 98 125 $background_position = ' ' . $instance['background_position']; 99 126 } else { … … 102 129 103 130 // 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'] ) ) { 105 133 $background_size = 'background-size:' . $instance['background_size'] . ';'; 106 134 } else { … … 113 141 $padding_bottom = $instance['padding_bottom']; 114 142 $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 120 152 // Margin 121 153 $margin_top = $instance['margin_top']; … … 123 155 $margin_bottom = $instance['margin_bottom']; 124 156 $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 } 129 165 130 166 // Inline styles … … 145 181 146 182 // 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 149 199 } else { 150 200 $custom_classes = ''; … … 163 213 164 214 // 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' ) ) ) { 166 217 167 218 // Get widget above options … … 183 234 184 235 // 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' ) ) ) { 186 238 187 239 // Get widget below options … … 218 270 $instance = $old_instance; 219 271 $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'] ); 220 276 $instance['background_color'] = strip_tags( sanitize_hex_color( $new_instance['background_color'] ) ); 221 277 $instance['background_image'] = esc_url( $new_instance['background_image'] ); … … 232 288 $instance['margin_bottom'] = absint( $new_instance['margin_bottom'] ); 233 289 $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'] ); 235 292 236 293 return $instance; … … 245 302 public function form( $instance ) { 246 303 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 247 311 $defaults = array( 248 312 'show_options' => 0, 313 'show_background' => $show_background, 314 'show_margin' => $show_margin, 315 'show_padding' => $show_padding, 316 'show_class' => $show_class, 249 317 'background_color' => '', 250 318 'background_image' => '', … … 262 330 'margin_left' => 0, 263 331 'custom_classes' => '', 332 'preset_classes' => array(), 264 333 ); 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> <?php334 $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 268 337 269 338 if ( apply_filters( 'ewc_advanced_options', true ) ) { ?> 270 339 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'] ); ?>/> 272 341 <label class="ewc-options-label" for="<?php echo $this->get_field_id( 'show_options' ); ?>"><?php _e( 'Advanced options', 'easy-widget-columns' ); ?></label> 273 342 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=""/> 303 355 </p> 304 356 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 314 531 } ?> 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'; 334 541 } ?> 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 } ?> 421 555 422 556 </div> <?php -
easy-widget-columns/tags/1.2.0/widgets/js/image-upload.js
r1610881 r1712728 5 5 * in the Row Divider widget. 6 6 * 7 * @since 1.1.57 * @since 1.1.5 8 8 * 9 9 */ … … 16 16 var media_frame; 17 17 18 // Prepare the variable that holds our custom input field ID. 19 var target_input; 20 18 21 // 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 ) { 20 23 21 24 // Prevent the default action from occuring. 22 25 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. 31 31 media_frame = wp.media.frames.media_frame = wp.media( { 32 32 33 33 // Custom class name for our media frame. 34 className: 'media-frame ewc-media-frame',34 className: 'media-frame ajv-media-frame', 35 35 // Assign 'select' workflow since we only want to upload an image. Use the 'post' workflow for posts. 36 36 frame: 'select', 37 37 // Allow mutiple file uploads. 38 38 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, 41 41 // Limit media library access to images only. 42 42 library: { 43 43 type: 'image' 44 44 }, 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'. 46 46 button: { 47 text: 'Insert Image'47 text: ajv_image_upload.frame_button 48 48 } 49 49 50 50 } ); 51 51 52 media_frame.on( 'select', function() {52 media_frame.on( 'select', function() { 53 53 54 54 // Grab our attachment selection and construct a JSON representation of the model. … … 56 56 57 57 // 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. 60 60 61 61 } ); -
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 1 1 === Easy Widget Columns === 2 2 Contributors: ajvillegas 3 Donate link: 3 Donate link: 4 4 Tags: widget, admin, columns, layout, widget columns 5 5 Requires at least: 4.5 6 6 Tested up to: 4.8 7 Stable tag: 1. 1.87 Stable tag: 1.2.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 15 15 Easy 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. 16 16 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.17 You 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. 18 18 19 19 > **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. … … 29 29 **Filters for Developers** 30 30 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: 31 The 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 42 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. 43 44 The examples below demonstrate how you can implement these filters on your theme. 39 45 40 46 `add_filter( 'ewc_include_widgets', 'myprefix_add_ewc_control' ); … … 49 55 $ewc_widgets = array( 50 56 'meta', // WP Meta widget 51 //'nav_menu', // WP Custom Menu widget52 57 'archives', // WP Archives widget 53 58 'calendar', // WP Calendar widget 54 59 'categories', // WP Categories widget 55 //'links', // WP Links widget56 //'pages', // WP Pages widget57 //'recent-comments', // WP Recent Comments widget58 //'recent-posts', // WP Recent Posts widget59 //'rss', // WP RSS widget60 //'search', // WP Search widget61 //'tag_cloud', // WP Tag Cloud widget62 //'text', // WP Text widget63 60 ); 64 61 … … 77 74 78 75 $ewc_widgets = array( 79 //'meta', // WP Meta widget80 //'nav_menu', // WP Custom Menu widget81 'archives', // WP Archives widget82 'calendar', // WP Calendar widget83 'categories', // WP Categories widget84 'links', // WP Links widget85 //'pages', // WP Pages widget86 76 'recent-comments', // WP Recent Comments widget 87 77 'recent-posts', // WP Recent Posts widget 88 78 'rss', // WP RSS widget 89 //'search', // WP Search widget90 79 'tag_cloud', // WP Tag Cloud widget 91 //'text', // WP Text widget92 80 ); 93 81 … … 96 84 }` 97 85 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 88 This 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 90 The example below demonstrates how you can implement this filter on your theme. 101 91 102 92 `add_filter( 'ewc_color_palette', 'myprefix_ewc_color_palette' ); … … 122 112 }` 123 113 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 116 This filter allows you assign preset CSS classes that display as a checkbox list in the 'Widget Row' widget. 117 118 The 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 */ 127 function 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 142 This 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 144 The following example demonstrates how to completely remove all advanced options. 145 146 `// Remove all advanced options from the Widget Row widget 129 147 add_filter( 'ewc_advanced_options', '__return_false' );` 148 149 The 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 */ 158 function 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 }` 130 182 131 183 == Installation == … … 169 221 170 222 To 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 224 To 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. 171 225 172 226 **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. … … 184 238 == Changelog == 185 239 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 186 251 = 1.1.8 = 187 252 * 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 141 141 142 142 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 ) ) ) { 144 144 return; 145 145 } 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 ) ) ) { 147 147 return; 148 148 } … … 221 221 // Get the widget's position in the sidebar 222 222 $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 } 224 239 225 240 // 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 ) ) ) { 227 247 $first = 'first '; 228 248 } else { … … 231 251 232 252 // Determine last widget in sidebar and assign closing row markup 233 if ( ( end( $sidebar s_widgets[$params[0]['id']]) == $params[0]['widget_id'] ) ) {253 if ( ( end( $sidebar_id ) == $params[0]['widget_id'] ) ) { 234 254 $wrap_close = '</div></div>'; 235 255 } else { -
easy-widget-columns/trunk/admin/css/easy-widget-columns-admin.css
r1611642 r1712728 185 185 .select2-container--ewc-select .select2-results { 186 186 display: block; 187 max-height: 300px; 188 padding: 0; 189 margin: 0; 187 190 } 188 191 … … 545 548 display: block; 546 549 } 550 551 input[type=checkbox].ewc-label-checkbox { 552 display: none; 553 } 554 555 input[type=checkbox].ewc-background-checkbox ~ .ewc-background-settings, 556 input[type=checkbox].ewc-margin-checkbox ~ .ewc-margin-settings, 557 input[type=checkbox].ewc-padding-checkbox ~ .ewc-padding-settings, 558 input[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 565 input[type=checkbox].ewc-background-checkbox:checked ~ .ewc-background-settings, 566 input[type=checkbox].ewc-margin-checkbox:checked ~ .ewc-margin-settings, 567 input[type=checkbox].ewc-padding-checkbox:checked ~ .ewc-padding-settings, 568 input[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 } 547 573 548 574 .ewc-row-styles { 575 position: relative; 549 576 border: 1px solid #eee; 550 padding: 0 10px;577 padding: 7px 10px 5px; 551 578 background: #fcfcfc; 552 579 margin-bottom: 15px; 553 580 } 554 581 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 555 591 .ewc-section-label { 556 592 display: inline-block; 557 margin -bottom: 5px;593 margin: 7px 0; 558 594 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 609 input[type=checkbox].ewc-label-checkbox:checked + .ewc-section-label:after { 610 content: "\f142"; 563 611 } 564 612 … … 579 627 .wp-customizer .ewc-widget-table .row-label { 580 628 width: 30px; 629 } 630 631 .button.custom-media-button { 632 margin: 5px 0 8px; 633 } 634 635 input.custom-media-url:invalid ~ .ewc-image-properties { 636 display: none; 637 } 638 639 .ewc-image-properties { 640 margin-top: 8px; 581 641 } 582 642 … … 600 660 .image-properties-dropdown select { 601 661 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 17 17 * Plugin URI: http://www.alexisvillegas.com/plugins/easy-widget-columns 18 18 * Description: Easily display widgets in rows of columns. 19 * Version: 1. 1.819 * Version: 1.2.0 20 20 * Author: Alexis J. Villegas 21 21 * Author URI: http://www.alexisvillegas.com -
easy-widget-columns/trunk/includes/class-easy-widget-columns-i18n.php
r1610881 r1712728 27 27 class Easy_Widget_Columns_i18n { 28 28 29 30 29 /** 31 30 * Load the plugin text domain for translation. … … 43 42 } 44 43 45 46 47 44 } -
easy-widget-columns/trunk/includes/class-easy-widget-columns.php
r1611687 r1712728 70 70 71 71 $this->plugin_name = 'easy-widget-columns'; 72 $this->version = '1. 1.8';72 $this->version = '1.2.0'; 73 73 $this->load_dependencies(); 74 74 $this->set_locale(); -
easy-widget-columns/trunk/languages/easy-widget-columns.pot
r1610881 r1712728 4 4 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" 5 5 "Project-Id-Version: Easy Widget Columns\n" 6 "POT-Creation-Date: 2017-0 2-22 15:47-0800\n"7 "PO-Revision-Date: 2017-0 2-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" 8 8 "Last-Translator: \n" 9 9 "Language-Team: \n" … … 11 11 "Content-Type: text/plain; charset=UTF-8\n" 12 12 "Content-Transfer-Encoding: 8bit\n" 13 "X-Generator: Poedit 1.8.12\n"13 "X-Generator: Poedit 2.0.3\n" 14 14 "X-Poedit-Basepath: ..\n" 15 "X-Poedit-Flags-xgettext: --add-comments=translators:\n" 15 16 "X-Poedit-WPHeader: easy-widget-columns.php\n" 16 17 "X-Poedit-SourceCharset: UTF-8\n" … … 92 93 93 94 #: admin/partials/easy-widget-columns-widget-form.php:17 94 #: widgets/class-widget-row-divider.php: 33495 #: widgets/class-widget-row-divider.php:415 95 96 msgid "None" 96 97 msgstr "" … … 128 129 msgstr "" 129 130 131 #: widgets/class-easy-widget-columns-widgets.php:107 132 msgid "Choose or Upload Image" 133 msgstr "" 134 135 #: widgets/class-easy-widget-columns-widgets.php:108 136 msgid "Insert Image" 137 msgstr "" 138 130 139 #: widgets/class-widget-row-divider.php:27 131 #: widgets/class-widget-row-divider.php: 259140 #: widgets/class-widget-row-divider.php:336 132 141 msgid "Use this widget to start or close a new row of widget columns." 133 142 msgstr "" 134 143 135 #: widgets/class-widget-row-divider.php: 35144 #: widgets/class-widget-row-divider.php:57 136 145 msgid "Widget Row" 137 146 msgstr "" 138 147 139 #: widgets/class-widget-row-divider.php: 264148 #: widgets/class-widget-row-divider.php:341 140 149 msgid "Advanced options" 141 150 msgstr "" 142 151 143 #: widgets/class-widget-row-divider.php: 269152 #: widgets/class-widget-row-divider.php:348 144 153 msgid "Row background" 145 154 msgstr "" 146 155 147 #: widgets/class-widget-row-divider.php: 270156 #: widgets/class-widget-row-divider.php:353 148 157 msgid "Color:" 149 158 msgstr "" 150 159 151 #: widgets/class-widget-row-divider.php: 275160 #: widgets/class-widget-row-divider.php:357 152 161 msgid "Image:" 153 162 msgstr "" 154 163 155 #: widgets/class-widget-row-divider.php: 276164 #: widgets/class-widget-row-divider.php:358 156 165 msgid "Enter URL or select image" 157 166 msgstr "" 158 167 159 #: widgets/class-widget-row-divider.php:283 168 #: widgets/class-widget-row-divider.php:359 169 msgid "Select Image" 170 msgstr "" 171 172 #: widgets/class-widget-row-divider.php:364 160 173 msgid "Repeat:" 161 174 msgstr "" 162 175 163 #: widgets/class-widget-row-divider.php: 286176 #: widgets/class-widget-row-divider.php:367 164 177 msgid "Tile" 165 178 msgstr "" 166 179 167 #: widgets/class-widget-row-divider.php: 287180 #: widgets/class-widget-row-divider.php:368 168 181 msgid "Horizontal" 169 182 msgstr "" 170 183 171 #: widgets/class-widget-row-divider.php: 288184 #: widgets/class-widget-row-divider.php:369 172 185 msgid "Vertical" 173 186 msgstr "" 174 187 175 #: widgets/class-widget-row-divider.php: 289188 #: widgets/class-widget-row-divider.php:370 176 189 msgid "No Repeat" 177 190 msgstr "" 178 191 179 #: widgets/class-widget-row-divider.php: 298192 #: widgets/class-widget-row-divider.php:379 180 193 msgid "Attachment:" 181 194 msgstr "" 182 195 183 #: widgets/class-widget-row-divider.php:3 01196 #: widgets/class-widget-row-divider.php:382 184 197 msgid "Scroll" 185 198 msgstr "" 186 199 187 #: widgets/class-widget-row-divider.php:3 02200 #: widgets/class-widget-row-divider.php:383 188 201 msgid "Fixed" 189 202 msgstr "" 190 203 191 #: widgets/class-widget-row-divider.php:3 11204 #: widgets/class-widget-row-divider.php:392 192 205 msgid "Position:" 193 206 msgstr "" 194 207 195 #: widgets/class-widget-row-divider.php:3 14208 #: widgets/class-widget-row-divider.php:395 196 209 msgid "Left Top" 197 210 msgstr "" 198 211 199 #: widgets/class-widget-row-divider.php:3 15212 #: widgets/class-widget-row-divider.php:396 200 213 msgid "Left Center" 201 214 msgstr "" 202 215 203 #: widgets/class-widget-row-divider.php:3 16216 #: widgets/class-widget-row-divider.php:397 204 217 msgid "Left Bottom" 205 218 msgstr "" 206 219 207 #: widgets/class-widget-row-divider.php:3 17220 #: widgets/class-widget-row-divider.php:398 208 221 msgid "Right Top" 209 222 msgstr "" 210 223 211 #: widgets/class-widget-row-divider.php:3 18224 #: widgets/class-widget-row-divider.php:399 212 225 msgid "Right Center" 213 226 msgstr "" 214 227 215 #: widgets/class-widget-row-divider.php: 319228 #: widgets/class-widget-row-divider.php:400 216 229 msgid "Right Bottom" 217 230 msgstr "" 218 231 219 #: widgets/class-widget-row-divider.php: 320232 #: widgets/class-widget-row-divider.php:401 220 233 msgid "Center Top" 221 234 msgstr "" 222 235 223 #: widgets/class-widget-row-divider.php: 321236 #: widgets/class-widget-row-divider.php:402 224 237 msgid "Center" 225 238 msgstr "" 226 239 227 #: widgets/class-widget-row-divider.php: 322240 #: widgets/class-widget-row-divider.php:403 228 241 msgid "Center Bottom" 229 242 msgstr "" 230 243 231 #: widgets/class-widget-row-divider.php: 331244 #: widgets/class-widget-row-divider.php:412 232 245 msgid "Scale:" 233 246 msgstr "" 234 247 235 #: widgets/class-widget-row-divider.php: 335248 #: widgets/class-widget-row-divider.php:416 236 249 msgid "Cover" 237 250 msgstr "" 238 251 239 #: widgets/class-widget-row-divider.php: 336252 #: widgets/class-widget-row-divider.php:417 240 253 msgid "Contain" 241 254 msgstr "" 242 255 243 #: widgets/class-widget-row-divider.php: 348256 #: widgets/class-widget-row-divider.php:436 244 257 msgid "Row margin" 245 258 msgstr "" 246 259 247 #: widgets/class-widget-row-divider.php: 353248 #: widgets/class-widget-row-divider.php: 382260 #: widgets/class-widget-row-divider.php:442 261 #: widgets/class-widget-row-divider.php:480 249 262 msgid "top:" 250 263 msgstr "" 251 264 252 #: widgets/class-widget-row-divider.php: 358253 #: widgets/class-widget-row-divider.php: 387265 #: widgets/class-widget-row-divider.php:447 266 #: widgets/class-widget-row-divider.php:485 254 267 msgid "right:" 255 268 msgstr "" 256 269 257 #: widgets/class-widget-row-divider.php: 365258 #: widgets/class-widget-row-divider.php: 394270 #: widgets/class-widget-row-divider.php:454 271 #: widgets/class-widget-row-divider.php:492 259 272 msgid "btm:" 260 273 msgstr "" 261 274 262 #: widgets/class-widget-row-divider.php: 370263 #: widgets/class-widget-row-divider.php: 399275 #: widgets/class-widget-row-divider.php:459 276 #: widgets/class-widget-row-divider.php:497 264 277 msgid "left:" 265 278 msgstr "" 266 279 267 #: widgets/class-widget-row-divider.php: 377280 #: widgets/class-widget-row-divider.php:474 268 281 msgid "Row padding" 269 282 msgstr "" 270 283 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 285 msgid "CSS classes" 286 msgstr "" 287 288 #: widgets/class-widget-row-divider.php:515 289 msgid "Enter custom classes" 290 msgstr "" 291 292 #: widgets/class-widget-subrow-divider.php:28 293 #: widgets/class-widget-subrow-divider.php:72 294 msgid "Use this widget to start a new sub-row of widget columns." 295 msgstr "" 296 297 #: widgets/class-widget-subrow-divider.php:36 298 msgid "sub-row" 277 299 msgstr "" 278 300 -
easy-widget-columns/trunk/public/class-easy-widget-columns-public.php
r1610881 r1712728 87 87 // Check if current locale is RTL (Right To Left) 88 88 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%;}'; 90 90 } 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%;}'; 92 92 } 93 93 -
easy-widget-columns/trunk/uninstall.php
r1611000 r1712728 34 34 35 35 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 ); 37 37 38 38 delete_option( 'easy-widget-columns' ); -
easy-widget-columns/trunk/widgets/class-easy-widget-columns-widgets.php
r1610881 r1712728 63 63 64 64 /** 65 * The class responsible for defining the Row Dividerwidget.65 * The class responsible for defining the Widget Row widget. 66 66 */ 67 67 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'; 68 73 69 74 } … … 97 102 // Image uploader 98 103 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' ); 100 112 101 113 } … … 159 171 public function register_widgets() { 160 172 161 // Register the Row Dividerwidget173 // Register the Widget Row widget 162 174 register_widget( 'EWC_Row_Divider' ); 175 176 // Register the Sub-Row widget 177 register_widget( 'EWC_Sub_Row_Divider' ); 163 178 164 179 } -
easy-widget-columns/trunk/widgets/class-widget-row-divider.php
r1611687 r1712728 33 33 ); 34 34 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 35 57 parent::__construct( 'ewc-row-divider', '— ' . __( 'Widget Row', 'easy-widget-columns' ) . ' —', $widget_ops, $control_ops ); 36 58 … … 67 89 68 90 // 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'] ) ) { 70 93 $background_color = $instance['background_color']; 71 94 } else { … … 74 97 75 98 // 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'] ) ) { 77 101 $background_image = ' ' . "url('" . $instance['background_image'] . "')"; 78 102 } else { … … 81 105 82 106 // 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'] ) ) { 84 109 $background_repeat = ' ' . $instance['background_repeat']; 85 110 } else { … … 88 113 89 114 // 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'] ) ) { 91 117 $background_attachment = ' ' . $instance['background_attachment']; 92 118 } else { … … 95 121 96 122 // 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'] ) ) { 98 125 $background_position = ' ' . $instance['background_position']; 99 126 } else { … … 102 129 103 130 // 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'] ) ) { 105 133 $background_size = 'background-size:' . $instance['background_size'] . ';'; 106 134 } else { … … 113 141 $padding_bottom = $instance['padding_bottom']; 114 142 $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 120 152 // Margin 121 153 $margin_top = $instance['margin_top']; … … 123 155 $margin_bottom = $instance['margin_bottom']; 124 156 $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 } 129 165 130 166 // Inline styles … … 145 181 146 182 // 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 149 199 } else { 150 200 $custom_classes = ''; … … 163 213 164 214 // 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' ) ) ) { 166 217 167 218 // Get widget above options … … 183 234 184 235 // 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' ) ) ) { 186 238 187 239 // Get widget below options … … 218 270 $instance = $old_instance; 219 271 $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'] ); 220 276 $instance['background_color'] = strip_tags( sanitize_hex_color( $new_instance['background_color'] ) ); 221 277 $instance['background_image'] = esc_url( $new_instance['background_image'] ); … … 232 288 $instance['margin_bottom'] = absint( $new_instance['margin_bottom'] ); 233 289 $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'] ); 235 292 236 293 return $instance; … … 245 302 public function form( $instance ) { 246 303 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 247 311 $defaults = array( 248 312 'show_options' => 0, 313 'show_background' => $show_background, 314 'show_margin' => $show_margin, 315 'show_padding' => $show_padding, 316 'show_class' => $show_class, 249 317 'background_color' => '', 250 318 'background_image' => '', … … 262 330 'margin_left' => 0, 263 331 'custom_classes' => '', 332 'preset_classes' => array(), 264 333 ); 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> <?php334 $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 268 337 269 338 if ( apply_filters( 'ewc_advanced_options', true ) ) { ?> 270 339 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'] ); ?>/> 272 341 <label class="ewc-options-label" for="<?php echo $this->get_field_id( 'show_options' ); ?>"><?php _e( 'Advanced options', 'easy-widget-columns' ); ?></label> 273 342 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=""/> 303 355 </p> 304 356 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 314 531 } ?> 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'; 334 541 } ?> 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 } ?> 421 555 422 556 </div> <?php -
easy-widget-columns/trunk/widgets/js/image-upload.js
r1610881 r1712728 5 5 * in the Row Divider widget. 6 6 * 7 * @since 1.1.57 * @since 1.1.5 8 8 * 9 9 */ … … 16 16 var media_frame; 17 17 18 // Prepare the variable that holds our custom input field ID. 19 var target_input; 20 18 21 // 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 ) { 20 23 21 24 // Prevent the default action from occuring. 22 25 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. 31 31 media_frame = wp.media.frames.media_frame = wp.media( { 32 32 33 33 // Custom class name for our media frame. 34 className: 'media-frame ewc-media-frame',34 className: 'media-frame ajv-media-frame', 35 35 // Assign 'select' workflow since we only want to upload an image. Use the 'post' workflow for posts. 36 36 frame: 'select', 37 37 // Allow mutiple file uploads. 38 38 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, 41 41 // Limit media library access to images only. 42 42 library: { 43 43 type: 'image' 44 44 }, 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'. 46 46 button: { 47 text: 'Insert Image'47 text: ajv_image_upload.frame_button 48 48 } 49 49 50 50 } ); 51 51 52 media_frame.on( 'select', function() {52 media_frame.on( 'select', function() { 53 53 54 54 // Grab our attachment selection and construct a JSON representation of the model. … … 56 56 57 57 // 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. 60 60 61 61 } ); -
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.