Widget CSS Classes - Version 1.5.0

Version Description

  • Feature: Option to try and fix the widget parameters if they are invalid. #24
  • Feature: Option to remove duplicate classes. #25
  • Enhancement: Sort classes based on the predefined classes on the frontend by default. #19
  • Enhancement: Classes filter for frontend (for sorting or modifications). #19
    • widget_css_classes: modify all classes added by this plugin.
    • widget_css_classes_custom: modify custom input classes.
  • Enhancement: Plugin settings filter (widget_css_classes_set_settings), overwrites user settings. #16
  • Enhancement: Plugin default settings filter (widget_css_classes_default_settings). #4
  • Enhancement: Capability filters for form fields. #21
    • widget_css_classes_id_input_capability: ID input
    • widget_css_classes_class_input_capability: classes input
    • widget_css_classes_class_select_capability: predefined classes select (also hides classes input if invalid)
  • Compatibility: WP External Links. #17, thanks to Victor @freelancephp
  • Fix: Form wrapper div style. #18, thanks to Chuck Reynolds @ryno267
  • Fix: Enable sortable input selection (IE-11 fix). #20
  • UI: Enhance setting page JavaScript and remove relCopy library dependency.
  • i18n: Remove Dutch and Russian languages from plugin distribution (available on translate.wordpress.org). #23
  • Started using TravisCI and CodeClimate. #15

Detailed info: PR on GitHub

Download this release

Release Info

Developer keraweb
Plugin Icon 128x128 Widget CSS Classes
Version 1.5.0
Comparing to
See all releases

Code changes from version 1.4.0 to 1.5.0

README.md CHANGED
@@ -1,5 +1,13 @@
1
  # Widget CSS Classes
2
 
 
 
 
 
 
 
 
 
3
  **Version:** see [widget-css-classes.php](/widget-css-classes.php)
4
  **Description:** Add custom, first, last, even, odd, and numbered classes to your widgets.
5
  **Author:** C.M. Kendrick
1
  # Widget CSS Classes
2
 
3
+ [![WordPress Plugin version](https://img.shields.io/wordpress/plugin/v/widget-css-classes.svg?style=flat)](https://wordpress.org/plugins/widget-css-classes/)
4
+ [![WordPress Plugin WP tested version](https://img.shields.io/wordpress/v/widget-css-classes.svg?style=flat)](https://wordpress.org/plugins/widget-css-classes/)
5
+ [![WordPress Plugin downloads](https://img.shields.io/wordpress/plugin/dt/widget-css-classes.svg?style=flat)](https://wordpress.org/plugins/widget-css-classes/)
6
+ [![WordPress Plugin rating](https://img.shields.io/wordpress/plugin/r/widget-css-classes.svg?style=flat)](https://wordpress.org/plugins/widget-css-classes/)
7
+ [![License](https://img.shields.io/badge/license-GPL--2.0%2B-green.svg)](https://github.com/cleverness/widget-css-classes/blob/master/license.txt)
8
+ [![Travis](https://secure.travis-ci.org/cleverness/widget-css-classes.png?branch=master)](http://travis-ci.org/cleverness/widget-css-classes)
9
+ [![Code Climate](https://codeclimate.com/github/cleverness/widget-css-classes/badges/gpa.svg)](https://codeclimate.com/github/cleverness/widget-css-classes)
10
+
11
  **Version:** see [widget-css-classes.php](/widget-css-classes.php)
12
  **Description:** Add custom, first, last, even, odd, and numbered classes to your widgets.
13
  **Author:** C.M. Kendrick
includes/widget-css-classes-library.class.php CHANGED
@@ -5,7 +5,7 @@
5
  * Method library
6
  * @author C.M. Kendrick <cindy@cleverness.org>
7
  * @package widget-css-classes
8
- * @version 1.3.0
9
  */
10
 
11
  /**
@@ -15,20 +15,48 @@
15
  */
16
  class WCSSC_Lib {
17
 
 
 
 
 
 
 
 
 
 
18
  /**
19
- * Add Settings link to plugin's entry on the Plugins page
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  * @static
21
- * @param $links
22
- * @param $file
23
  * @return array
24
- * @since 1.0
25
  */
26
  public static function add_settings_link( $links, $file ) {
27
  static $this_plugin;
28
- if ( !$this_plugin ) $this_plugin = WCSSC_BASENAME;
 
 
29
 
30
- if ( $file == $this_plugin ) {
31
- $settings_link = '<a href="'.admin_url( 'options-general.php?page=widget-css-classes-settings' ).'">'.esc_attr__( 'Settings', 'widget-css-classes' ).'</a>';
32
  array_unshift( $links, $settings_link );
33
  }
34
 
@@ -36,19 +64,24 @@ class WCSSC_Lib {
36
  }
37
 
38
  /**
39
- * Add plugin info to admin footer
 
40
  * @static
41
  * @since 1.0
42
  */
43
  public static function admin_footer() {
44
  $plugin_data = get_plugin_data( WCSSC_FILE );
45
- echo $plugin_data['Title'].' | '.esc_attr__( 'Version', 'widget-css-classes' ).' '.esc_html( $plugin_data['Version'] ).' | '.$plugin_data['Author'].
46
- ' | <a href="http://codebrainmedia.com">CodeBrain Media</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=cindy@cleverness.org">'.esc_attr__( 'Donate', 'widget-css-classes' ).'</a>
 
 
 
47
  <br />';
48
  }
49
 
50
  /**
51
- * Run install function to see if upgrade is needed
 
52
  * @static
53
  * @since 1.0
54
  */
@@ -62,60 +95,256 @@ class WCSSC_Lib {
62
  }
63
 
64
  // check if the db version is the same as the db version constant
65
- if ( $installed_version != WCSSC_DB_VERSION ) {
66
  // update options
67
- self::set_options( $installed_version );
68
  update_option( 'WCSSC_db_version', WCSSC_DB_VERSION );
69
  }
70
 
71
  }
72
 
73
  /**
74
- * Install or Upgrade Options
 
75
  * @static
76
  * @param $version
77
  * @since 1.0
78
  */
79
- public static function set_options( $version ) {
 
 
80
 
81
- if ( $version == 0 ) {
82
  // add default options
83
- $options = array(
84
- 'show_id' => 0,
85
- 'type' => 1,
86
- 'defined_classes' => '',
87
- 'show_number' => 1,
88
- 'show_location' => 1,
89
- 'show_evenodd' => 1,
90
- );
91
-
92
- add_option( 'WCSSC_options', $options );
93
  add_option( 'WCSSC_db_version', WCSSC_DB_VERSION );
 
 
94
 
95
- } else {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
- if ( $version < 1.2 ) {
98
- $general_options = get_option( 'WCSSC_options' );
99
- $general_options['show_number'] = 1;
100
- $general_options['show_location'] = 1;
101
- $general_options['show_evenodd'] = 1;
102
- update_option( 'WCSSC_options', $general_options );
 
 
 
 
 
 
103
  }
104
- if ( $version < 1.3 ) {
105
- $general_options = get_option( 'WCSSC_options' );
106
- // Hide option is now 0 instead of 3
107
- if ( isset( $general_options['type'] ) && $general_options['type'] == 3 ) {
108
- $general_options['type'] = 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  }
110
- // dropdown settings are renamed to defined_classes
111
- if ( ! isset( $general_options['dropdown'] ) ) {
112
- $general_options['dropdown'] = '';
113
  }
114
- $general_options['defined_classes'] = $general_options['dropdown'];
115
- unset( $general_options['dropdown'] );
116
- update_option( 'WCSSC_options', $general_options );
117
  }
 
 
 
118
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  }
120
 
121
  }
5
  * Method library
6
  * @author C.M. Kendrick <cindy@cleverness.org>
7
  * @package widget-css-classes
8
+ * @version 1.5.0
9
  */
10
 
11
  /**
15
  */
16
  class WCSSC_Lib {
17
 
18
+ const DOMAIN = 'widget-css-classes';
19
+
20
+ /**
21
+ * The plugin settings option key.
22
+ * @var string
23
+ * @since 1.5.0
24
+ */
25
+ public static $settings_key = 'WCSSC_options';
26
+
27
  /**
28
+ * The current plugin settings.
29
+ * @see WCSSC_Lib::set_settings()
30
+ * @var array
31
+ * @since 1.5.0
32
+ */
33
+ private static $settings = array();
34
+
35
+ /**
36
+ * The default plugin settings.
37
+ * @see WCSSC_Lib::get_default_settings()
38
+ * @var array
39
+ * @since 1.5.0
40
+ */
41
+ private static $default_settings = null;
42
+
43
+ /**
44
+ * Add Settings link to plugin's entry on the Plugins page.
45
+ *
46
  * @static
47
+ * @param array $links
48
+ * @param string $file
49
  * @return array
50
+ * @since 1.0
51
  */
52
  public static function add_settings_link( $links, $file ) {
53
  static $this_plugin;
54
+ if ( ! $this_plugin ) {
55
+ $this_plugin = WCSSC_BASENAME;
56
+ }
57
 
58
+ if ( $file === $this_plugin ) {
59
+ $settings_link = '<a href="' . admin_url( 'options-general.php?page=widget-css-classes-settings' ) . '">' . esc_attr__( 'Settings', WCSSC_Lib::DOMAIN ) . '</a>';
60
  array_unshift( $links, $settings_link );
61
  }
62
 
64
  }
65
 
66
  /**
67
+ * Add plugin info to admin footer.
68
+ *
69
  * @static
70
  * @since 1.0
71
  */
72
  public static function admin_footer() {
73
  $plugin_data = get_plugin_data( WCSSC_FILE );
74
+ echo $plugin_data['Title'] // @codingStandardsIgnoreLine >> no valid esc function.
75
+ . ' | ' . esc_attr__( 'Version', WCSSC_Lib::DOMAIN ) . ' ' . esc_html( $plugin_data['Version'] )
76
+ . ' | ' . $plugin_data['Author'] // @codingStandardsIgnoreLine >> no valid esc function.
77
+ . ' | <a href="http://codebrainmedia.com">CodeBrain Media</a>'
78
+ . ' | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=cindy@cleverness.org">' . esc_attr__( 'Donate', WCSSC_Lib::DOMAIN ) . '</a>
79
  <br />';
80
  }
81
 
82
  /**
83
+ * Run install function to see if upgrade is needed.
84
+ *
85
  * @static
86
  * @since 1.0
87
  */
95
  }
96
 
97
  // check if the db version is the same as the db version constant
98
+ if ( (string) WCSSC_DB_VERSION !== (string) $installed_version ) {
99
  // update options
100
+ self::update( $installed_version );
101
  update_option( 'WCSSC_db_version', WCSSC_DB_VERSION );
102
  }
103
 
104
  }
105
 
106
  /**
107
+ * Install or Upgrade Options.
108
+ *
109
  * @static
110
  * @param $version
111
  * @since 1.0
112
  */
113
+ private static function update( $version ) {
114
+
115
+ $settings = get_option( self::$settings_key );
116
 
117
+ if ( empty( $settings ) ) {
118
  // add default options
119
+ self::update_settings( array() );
 
 
 
 
 
 
 
 
 
120
  add_option( 'WCSSC_db_version', WCSSC_DB_VERSION );
121
+ return;
122
+ }
123
 
124
+ if ( version_compare( $version, '1.2', '<' ) ) {
125
+ $settings['show_number'] = 1;
126
+ $settings['show_location'] = 1;
127
+ $settings['show_evenodd'] = 1;
128
+ }
129
+
130
+ if ( version_compare( $version, '1.3', '<' ) ) {
131
+ // Hide option is now 0 instead of 3
132
+ if ( isset( $settings['type'] ) && 3 === (int) $settings['type'] ) {
133
+ $settings['type'] = 0;
134
+ }
135
+ // dropdown settings are renamed to defined_classes
136
+ if ( ! isset( $settings['dropdown'] ) ) {
137
+ $settings['dropdown'] = '';
138
+ }
139
+ $settings['defined_classes'] = $settings['dropdown'];
140
+ unset( $settings['dropdown'] );
141
+ }
142
+
143
+ self::update_settings( $settings );
144
+ }
145
 
146
+ /**
147
+ * Get plugin settings.
148
+ *
149
+ * @static
150
+ * @param string|int $key
151
+ * @return mixed
152
+ * @since 1.5.0
153
+ */
154
+ public static function get_settings( $key = null ) {
155
+ if ( null !== $key ) {
156
+ if ( isset( self::$settings[ $key ] ) ) {
157
+ return self::$settings[ $key ];
158
  }
159
+ return null;
160
+ }
161
+ return self::$settings;
162
+ }
163
+
164
+ /**
165
+ * Set plugin settings. All setting changes should run through this function.
166
+ *
167
+ * @static
168
+ * @param mixed $settings
169
+ * @param string|int $key
170
+ * @return bool
171
+ * @since 1.5.0
172
+ */
173
+ public static function set_settings( $settings, $key = null ) {
174
+
175
+ if ( null !== $key ) {
176
+ // This plugin only has string type array keys.
177
+ if ( ! is_string( $key ) ) {
178
+ return false;
179
+ }
180
+ self::$settings = (array) self::$settings;
181
+ self::$settings[ $key ] = $settings;
182
+ $settings = self::$settings;
183
+ }
184
+ elseif ( ! is_array( $settings ) ) {
185
+ return false;
186
+ }
187
+
188
+ // Pre-validate to make sure the user get's the correct formatted data according to the docs.
189
+ $settings = self::validate_settings( $settings, false );
190
+
191
+ /**
192
+ * Modify the plugin settings. Overwrites the DB values.
193
+ * IMPORTANT: Do not change the variable types of the values! Type casting will be overruled.
194
+ *
195
+ * @since 1.5.0
196
+ * @param array $settings {
197
+ * @type bool $fix_widget_params
198
+ * @type bool $show_id
199
+ * @type int $type
200
+ * @type array|string $defined_classes Array of predefined classes.
201
+ * Optionally allows a delimiter separated string.
202
+ * See WCSSC_Lib::parse_defined_classes().
203
+ * @type bool $show_number
204
+ * @type bool $show_location
205
+ * @type bool $show_evenodd
206
+ * }
207
+ * @return array
208
+ */
209
+ $settings = apply_filters( 'widget_css_classes_set_settings', $settings );
210
+
211
+ // Full settings validation.
212
+ $settings = self::validate_settings( $settings, true );
213
+
214
+ self::$settings = $settings;
215
+ return true;
216
+ }
217
+
218
+ /**
219
+ * Update plugin settings. Also sets the current settings.
220
+ *
221
+ * @static
222
+ * @param mixed $settings
223
+ * @param string|int $key
224
+ * @return bool
225
+ * @since 1.5.0
226
+ */
227
+ public static function update_settings( $settings, $key = null ) {
228
+ self::set_settings( $settings, $key );
229
+ return update_option( self::$settings_key, self::get_settings() );
230
+ }
231
+
232
+ /**
233
+ * Validate plugin settings.
234
+ *
235
+ * @static
236
+ * @param array $settings
237
+ * @param bool $parse
238
+ * @return array
239
+ * @since 1.5.0
240
+ */
241
+ private static function validate_settings( $settings, $parse = true ) {
242
+
243
+ $defaults = self::get_default_settings();
244
+
245
+ // Make sure all keys are there and remove invalid keys.
246
+ $settings = shortcode_atts( $defaults, $settings );
247
+
248
+ if ( $parse ) {
249
+ // Parse all settings.
250
+ foreach ( $settings as $key => $value ) {
251
+
252
+ if ( 'defined_classes' === $key ) {
253
+ // Parse defined_classes to array.
254
+ $settings['defined_classes'] = self::parse_defined_classes( $value );
255
+ continue;
256
  }
257
+
258
+ if ( is_string( $value ) ) {
259
+ $settings[ $key ] = strip_tags( stripslashes( $value ) );
260
  }
261
+
262
+ // Validate var types.
263
+ settype( $settings[ $key ], gettype( $defaults[ $key ] ) );
264
  }
265
+ } else {
266
+ // Only apply typecasting to defined classes.
267
+ $settings['defined_classes'] = (array) $settings['defined_classes'];
268
  }
269
+
270
+ return $settings;
271
+ }
272
+
273
+ /**
274
+ * Parse defined_classes to array.
275
+ *
276
+ * @static
277
+ * @param array|string $classes
278
+ * @return array
279
+ * @since 1.5.0
280
+ */
281
+ private static function parse_defined_classes( $classes ) {
282
+ $replace = array( ';', ' ', '|' );
283
+
284
+ // Parse defined_classes to array.
285
+ if ( ! is_array( $classes ) ) {
286
+ // Convert to comma separated list.
287
+ $classes = str_replace( $replace, ',', (string) $classes );
288
+ // Convert to array and remove empty and duplicate values.
289
+ return array_unique( array_filter( explode( ',', $classes ) ) );
290
+ }
291
+
292
+ $new_classes = array();
293
+ // Parse each value the same way.
294
+ foreach ( $classes as $key => $class ) {
295
+ $class = self::parse_defined_classes( $class );
296
+ $new_classes = array_merge( $new_classes, $class );
297
+ }
298
+
299
+ $new_classes = array_unique( array_filter( $new_classes ) );
300
+ $new_classes = array_map( 'stripslashes', $new_classes );
301
+ $new_classes = array_map( 'strip_tags', $new_classes );
302
+
303
+ return $new_classes;
304
+ }
305
+
306
+ /**
307
+ * Get the default settings for this plugin.
308
+ *
309
+ * @static
310
+ * @return array
311
+ * @since 1.5.0
312
+ */
313
+ public static function get_default_settings() {
314
+
315
+ // Only run filters once.
316
+ if ( self::$default_settings ) {
317
+ return self::$default_settings;
318
+ }
319
+
320
+ self::$default_settings = array(
321
+ 'show_id' => false,
322
+ 'type' => 1,
323
+ 'defined_classes' => array(),
324
+ 'show_number' => true,
325
+ 'show_location' => true,
326
+ 'show_evenodd' => true,
327
+ 'fix_widget_params' => false,
328
+ 'filter_unique' => false,
329
+ );
330
+
331
+ // Prevent passing by reference.
332
+ $default_settings = self::$default_settings;
333
+
334
+ /**
335
+ * Modify the plugin default settings. Doesn't change the DB values.
336
+ * IMPORTANT: Do not change the variable types of the values! Type casting will be overruled.
337
+ *
338
+ * @since 1.5.0
339
+ * @param array $default_settings See `widget_css_classes_set_settings` filter for parameters.
340
+ * @return array
341
+ */
342
+ $default_settings = apply_filters( 'widget_css_classes_default_settings', $default_settings );
343
+
344
+ // Validate default settings against the original defaults.
345
+ self::$default_settings = self::validate_settings( $default_settings, true );
346
+
347
+ return self::$default_settings;
348
  }
349
 
350
  }
includes/widget-css-classes-loader.class.php CHANGED
@@ -1,67 +1,59 @@
1
  <?php
2
  /**
3
- * Widget CSS Classes Plugin Loader
4
  *
5
  * Loader
6
  * @author C.M. Kendrick <cindy@cleverness.org>
7
  * @package widget-css-classes
8
- * @version 1.3.0
9
  */
10
 
11
  /**
12
- * Loader class
13
  * @package widget-css-classes
14
  * @subpackage includes
15
  */
16
  class WCSSC_Loader {
17
- public static $settings;
18
 
19
  /**
20
- * Plugin Loader init
21
  * @static
22
  * @since 1.0
23
  */
24
  public static function init() {
25
  self::check_for_upgrade();
26
- self::$settings = ( get_option( 'WCSSC_options' ) ? get_option( 'WCSSC_options' ) : array() );
27
  self::include_files();
28
- self::call_wp_hooks();
 
 
29
  new WCSSC_Settings();
30
  }
31
 
32
  /**
33
- * Check to see if plugin has an upgrade
34
  * @static
35
  * @since 1.0
36
  */
37
  private static function check_for_upgrade() {
38
- global $wp_version;
39
-
40
- $exit_msg = esc_html__( 'Widget CSS Classes requires WordPress 3.3 or newer. <a href="http://codex.wordpress.org/Upgrading_WordPress">Please update.</a>', 'widget-css-classes' );
41
- if ( version_compare( $wp_version, "3.3", "<" ) ) {
42
- exit( $exit_msg );
43
- }
44
-
45
  widget_css_classes_activation();
46
  }
47
 
48
  /**
49
- * Calls the plugin files for inclusion
50
  * @static
51
  * @since 1.0
52
  */
53
  private static function include_files() {
54
- include_once WCSSC_PLUGIN_DIR.'includes/widget-css-classes-library.class.php';
55
- include_once WCSSC_PLUGIN_DIR.'includes/widget-css-classes-settings.class.php';
56
- include_once WCSSC_PLUGIN_DIR.'includes/widget-css-classes.class.php';
57
  }
58
 
59
  /**
60
- * Adds WordPress hooks for actions and filters
61
  * @static
62
  * @since 1.0
63
  */
64
- private static function call_wp_hooks() {
65
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_scripts_styles' ) );
66
  add_action( 'in_widget_form', array( 'WCSSC', 'extend_widget_form' ), 10, 3 );
67
  add_filter( 'widget_update_callback', array( 'WCSSC', 'update_widget' ), 10, 2 );
@@ -69,23 +61,18 @@ class WCSSC_Loader {
69
  }
70
 
71
  /**
72
- * Load the plugin CSS, JS and Help tab
73
  * @static
74
  * @since 1.0
75
  */
76
  public static function enqueue_scripts_styles() {
77
  $screen = get_current_screen();
78
 
79
- // if on the settings page
80
- if ( $screen->id == 'settings_page_widget-css-classes-settings' ) {
81
- wp_enqueue_style( 'widget-css-classes_css', WCSSC_PLUGIN_URL.'/css/widget-css-classes.css' );
82
-
83
- wp_register_script( 'widget-css-classes_js', WCSSC_PLUGIN_URL.'/js/widget-css-classes.js', array( 'jquery' ), '1.0' );
84
- wp_register_script( 'relcopy_js', WCSSC_PLUGIN_URL.'/js/relCopy.min.js', array( 'jquery' ), '1.0' );
85
- wp_enqueue_script( 'widget-css-classes_js' );
86
- wp_enqueue_script( 'relcopy_js' );
87
  }
88
-
89
  }
90
 
91
  }
1
  <?php
2
  /**
3
+ * Widget CSS Classes Plugin Loader.
4
  *
5
  * Loader
6
  * @author C.M. Kendrick <cindy@cleverness.org>
7
  * @package widget-css-classes
8
+ * @version 1.5.0
9
  */
10
 
11
  /**
12
+ * Loader class.
13
  * @package widget-css-classes
14
  * @subpackage includes
15
  */
16
  class WCSSC_Loader {
 
17
 
18
  /**
19
+ * Plugin Loader init.
20
  * @static
21
  * @since 1.0
22
  */
23
  public static function init() {
24
  self::check_for_upgrade();
 
25
  self::include_files();
26
+ self::add_wp_hooks();
27
+
28
+ // Instantiate settings (admin) class.
29
  new WCSSC_Settings();
30
  }
31
 
32
  /**
33
+ * Check to see if plugin has an upgrade.
34
  * @static
35
  * @since 1.0
36
  */
37
  private static function check_for_upgrade() {
 
 
 
 
 
 
 
38
  widget_css_classes_activation();
39
  }
40
 
41
  /**
42
+ * Calls the plugin files for inclusion.
43
  * @static
44
  * @since 1.0
45
  */
46
  private static function include_files() {
47
+ include_once WCSSC_PLUGIN_DIR . 'includes/widget-css-classes-settings.class.php';
48
+ include_once WCSSC_PLUGIN_DIR . 'includes/widget-css-classes.class.php';
 
49
  }
50
 
51
  /**
52
+ * Adds WordPress hooks for actions and filters.
53
  * @static
54
  * @since 1.0
55
  */
56
+ private static function add_wp_hooks() {
57
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_scripts_styles' ) );
58
  add_action( 'in_widget_form', array( 'WCSSC', 'extend_widget_form' ), 10, 3 );
59
  add_filter( 'widget_update_callback', array( 'WCSSC', 'update_widget' ), 10, 2 );
61
  }
62
 
63
  /**
64
+ * Load the plugin CSS, JS and Help tab.
65
  * @static
66
  * @since 1.0
67
  */
68
  public static function enqueue_scripts_styles() {
69
  $screen = get_current_screen();
70
 
71
+ // if on the settings page.
72
+ if ( 'settings_page_widget-css-classes-settings' === $screen->id ) {
73
+ wp_enqueue_style( 'widget-css-classes_css', WCSSC_PLUGIN_URL . '/css/widget-css-classes.css', array(), WCSSC_PLUGIN_VERSION );
74
+ wp_enqueue_script( 'widget-css-classes_js', WCSSC_PLUGIN_URL . '/js/widget-css-classes.js', array( 'jquery' ), WCSSC_PLUGIN_VERSION );
 
 
 
 
75
  }
 
76
  }
77
 
78
  }
includes/widget-css-classes-settings.class.php CHANGED
@@ -5,7 +5,7 @@
5
  * Settings
6
  * @author C.M. Kendrick <cindy@cleverness.org>
7
  * @package widget-css-classes
8
- * @version 1.3.0
9
  */
10
 
11
  /**
@@ -16,10 +16,11 @@
16
  */
17
  class WCSSC_Settings {
18
 
19
- private $general_key = 'WCSSC_options';
20
- private $plugin_key = 'widget-css-classes-settings';
21
- private $plugin_tabs = array();
22
- private $general_settings = array();
 
23
 
24
  public function __construct() {
25
  add_action( 'admin_init', array( $this, 'load_settings' ) );
@@ -29,93 +30,88 @@ class WCSSC_Settings {
29
  }
30
 
31
  public function load_settings() {
32
- $this->general_settings = get_option( $this->general_key );
 
33
  }
34
 
35
  public function section_general_desc() {
36
  }
37
 
38
  public function register_general_settings() {
39
- $this->plugin_tabs[$this->general_key] = esc_attr__( 'Widget CSS Classes Settings', 'widget-css-classes' );
 
 
40
 
41
  register_setting( $this->general_key, $this->general_key, array( $this, 'validate_input' ) );
42
- add_settings_section( 'section_general', esc_attr__( 'Widget CSS Classes Settings', 'widget-css-classes' ), array( $this, 'section_general_desc' ), $this->general_key );
43
- add_settings_field( 'show_number', esc_attr__( 'Add Widget Number Classes', 'widget-css-classes' ), array( $this, 'show_number_option' ), $this->general_key, 'section_general' );
44
- add_settings_field( 'show_location', esc_attr__( 'Add First/Last Classes', 'widget-css-classes' ), array( $this, 'show_location_option' ), $this->general_key, 'section_general' );
45
- add_settings_field( 'show_evenodd', esc_attr__( 'Add Even/Odd Classes', 'widget-css-classes' ), array( $this, 'show_evenodd_option' ), $this->general_key, 'section_general' );
46
- add_settings_field( 'show_id', esc_attr__( 'Show Additional Field for ID', 'widget-css-classes' ), array( $this, 'show_id_option' ), $this->general_key, 'section_general' );
47
- add_settings_field( 'type', esc_attr__( 'Class Field Type', 'widget-css-classes' ), array( $this, 'type_option' ), $this->general_key, 'section_general' );
48
- add_settings_field( 'defined_classes', esc_attr__( 'Predefined Classes', 'widget-css-classes' ), array( $this, 'defined_classes_option' ), $this->general_key, 'section_general' );
 
 
 
 
 
 
 
 
49
  do_action( 'widget_css_classes_settings' );
50
  }
51
 
52
- public function show_number_option() { ?>
53
- <input type="radio" name="<?php echo esc_attr( $this->general_key ).'[show_number]'; ?>" value="1" <?php checked( $this->general_settings['show_number'], 1 ); ?> /> <?php esc_attr_e( 'Yes', 'widget-css-classes' ); ?>&nbsp;&nbsp;
54
- <input type="radio" name="<?php echo esc_attr( $this->general_key ).'[show_number]'; ?>" value="0" <?php checked( $this->general_settings['show_number'], 0 ); ?> /> <?php esc_attr_e( 'No', 'widget-css-classes' ); ?>
55
- <?php
56
- }
57
-
58
- public function show_location_option() {
59
- ?>
60
- <input type="radio" name="<?php echo esc_attr( $this->general_key ).'[show_location]'; ?>" value="1" <?php checked( $this->general_settings['show_location'], 1 ); ?> /> <?php esc_attr_e( 'Yes', 'widget-css-classes' ); ?>&nbsp;&nbsp;
61
- <input type="radio" name="<?php echo esc_attr( $this->general_key ).'[show_location]'; ?>" value="0" <?php checked( $this->general_settings['show_location'], 0 ); ?> /> <?php esc_attr_e( 'No', 'widget-css-classes' ); ?>
62
- <?php
63
- }
64
-
65
- public function show_evenodd_option() {
66
- ?>
67
- <input type="radio" name="<?php echo esc_attr( $this->general_key ).'[show_evenodd]'; ?>" value="1" <?php checked( $this->general_settings['show_evenodd'], 1 ); ?> /> <?php esc_attr_e( 'Yes', 'widget-css-classes' ); ?>&nbsp;&nbsp;
68
- <input type="radio" name="<?php echo esc_attr( $this->general_key ).'[show_evenodd]'; ?>" value="0" <?php checked( $this->general_settings['show_evenodd'], 0 ); ?> /> <?php esc_attr_e( 'No', 'widget-css-classes' ); ?>
69
- <?php
70
- }
71
-
72
- public function show_id_option() {
73
  ?>
74
- <input type="radio" name="<?php echo esc_attr( $this->general_key ).'[show_id]'; ?>" value="1" <?php checked( $this->general_settings['show_id'], 1 ); ?> /> <?php esc_attr_e( 'Yes', 'widget-css-classes' ); ?>&nbsp;&nbsp;
75
- <input type="radio" name="<?php echo esc_attr( $this->general_key ).'[show_id]'; ?>" value="0" <?php checked( $this->general_settings['show_id'], 0 ); ?> /> <?php esc_attr_e( 'No', 'widget-css-classes' ); ?>
76
- <?php
 
 
 
77
  }
78
 
79
  public function type_option() {
80
  ?>
81
- <input type="radio" name="<?php echo esc_attr( $this->general_key ).'[type]'; ?>" value="1" <?php checked( $this->general_settings['type'], 1 ); ?> /> <?php esc_attr_e( 'Text', 'widget-css-classes' ); ?>&nbsp;&nbsp;
82
- <input type="radio" name="<?php echo esc_attr( $this->general_key ).'[type]'; ?>" value="2" <?php checked( $this->general_settings['type'], 2 ); ?> /> <?php esc_attr_e( 'Predefined', 'widget-css-classes' ); ?>&nbsp;&nbsp;
83
- <input type="radio" name="<?php echo esc_attr( $this->general_key ).'[type]'; ?>" value="3" <?php checked( $this->general_settings['type'], 3 ); ?> /> <?php esc_attr_e( 'Both', 'widget-css-classes' ); ?>&nbsp;&nbsp;
84
- <input type="radio" name="<?php echo esc_attr( $this->general_key ).'[type]'; ?>" value="0" <?php checked( $this->general_settings['type'], 0 ); ?> /> <?php esc_attr_e( 'Hide', 'widget-css-classes' ); ?>
85
- <?php
86
  }
87
 
88
  public function defined_classes_option() {
89
  wp_enqueue_script( 'jquery-ui-sortable' );
90
- $presets = explode( ';', $this->general_settings['defined_classes'] );
91
  ?>
92
  <div class="wcssc_sortable">
93
  <?php
94
  if ( count( $presets ) > 1 ) {
95
  foreach ( $presets as $key => $preset ) {
96
- if ( $preset != '' ) {
97
- ?>
98
- <p class="wcssc_defined_classes">
99
- <a class="wcssc_sort" href="#"><span class="dashicons dashicons-sort"></span></a>
100
- <input type="text" name="<?php echo esc_attr( $this->general_key ).'[defined_classes]['.esc_attr( $key ).']'; ?>" value="<?php echo esc_attr( $preset ); ?>" />
101
- <a class="wcssc_remove" href="#"><span class="dashicons dashicons-dismiss"></span></a>
102
- </p>
103
- <?php
104
- }
105
  }
106
  ?>
107
  <p class="wcssc_defined_classes wcssc_sort_fixed">
108
  <a class="wcssc_sort" href="#"><span class="dashicons dashicons-sort"></span></a>
109
- <input type="text" name="<?php echo esc_attr( $this->general_key ).'[defined_classes][]'; ?>" value="" />
110
  <a href="#" class="wcssc_copy" rel=".wcssc_defined_classes"><span class="dashicons dashicons-plus-alt"></span></a>
111
  <a class="wcssc_remove" href="#"><span class="dashicons dashicons-dismiss"></span></a>
112
  </p>
113
  <?php
114
  } else {
 
115
  ?>
116
  <p class="wcssc_defined_classes wcssc_sort_fixed">
117
  <a class="wcssc_sort" href="#"><span class="dashicons dashicons-sort"></span></a>
118
- <input type="text" name="<?php echo esc_attr( $this->general_key ).'[defined_classes][]'; ?>" value="<?php echo esc_attr( $this->general_settings['defined_classes'] ); ?>" />
119
  <a href="#" class="wcssc_copy" rel=".wcssc_defined_classes"><span class="dashicons dashicons-plus-alt"></span></a>
120
  <a class="wcssc_remove" href="#"><span class="dashicons dashicons-dismiss"></span></a>
121
  </p>
@@ -128,103 +124,85 @@ class WCSSC_Settings {
128
 
129
  public function register_importexport_settings() {
130
 
131
- if ( current_user_can('manage_options' ) ) {
132
-
133
- $this->plugin_tabs['importexport'] = esc_attr__( 'Import/Export', 'widget-css-classes' );
134
 
135
- if ( isset( $_GET['wcssc_message'] ) ) {
136
- switch ( $_GET['wcssc_message'] ) {
137
- case 1:
138
- $wcssc_message_class = 'updated';
139
- $wcssc_message = esc_attr__( 'Settings Imported', 'widget-css-classes' );
140
- break;
141
- case 2:
142
- $wcssc_message_class = 'error';
143
- $wcssc_message = esc_attr__( 'Invalid Settings File', 'widget-css-classes' );
144
- break;
145
- case 3:
146
- $wcssc_message_class = 'error';
147
- $wcssc_message = esc_attr__( 'No Settings File Selected', 'widget-css-classes' );
148
- break;
149
- default:
150
- $wcssc_message_class = '';
151
- $wcssc_message = '';
152
- break;
153
- }
154
  }
 
155
 
156
- if ( isset( $wcssc_message ) && $wcssc_message != '' ) {
157
- echo '<div class=" ' . $wcssc_message_class . ' "><p>' . esc_html( $wcssc_message ) . '</p></div>';
158
- }
159
 
160
- // export settings
161
- if ( isset( $_GET['widget-css-classes-settings-export'] ) ) {
162
- header( "Content-Disposition: attachment; filename=widget-css-classes-settings.txt" );
163
- header( 'Content-Type: text/plain; charset=utf-8' );
164
- $general = get_option( 'WCSSC_options' );
165
 
166
- echo "[START=WCSSC SETTINGS]\n";
167
- foreach ( $general as $id => $text ) {
168
- echo "$id\t" . json_encode( $text ) . "\n";
169
- }
170
- echo "[STOP=WCSSC SETTINGS]";
171
- exit;
172
  }
 
 
 
173
 
174
- // import settings
175
- if ( isset( $_POST['widget-css-classes-settings-import'] ) ) {
176
- $wcssc_message = '';
177
- if ( $_FILES['widget-css-classes-settings-import-file']['tmp_name'] ) {
178
- $import = explode( "\n",
179
- file_get_contents( $_FILES['widget-css-classes-settings-import-file']['tmp_name'] ) );
180
- if ( array_shift( $import ) == "[START=WCSSC SETTINGS]" && array_pop( $import ) == "[STOP=WCSSC SETTINGS]" ) {
181
- foreach ( $import as $import_option ) {
182
- list( $key, $value ) = explode( "\t", $import_option );
183
- $options[ $key ] = json_decode( sanitize_text_field( $value ) );
184
- if ( $options['dropdown'] ) { // Update for 1.3.0
185
- $options['defined_classes'] = $options['dropdown'];
186
- unset( $options['dropdown'] );
187
- }
 
 
188
  }
189
- update_option( 'WCSSC_options', $options );
190
- $wcssc_message = 1;
191
- } else {
192
- $wcssc_message = 2;
193
  }
194
- } else {
195
- $wcssc_message = 3;
196
  }
197
-
198
- wp_redirect( admin_url( '/options-general.php?page=widget-css-classes-settings&tab=importexport&wcssc_message=' . esc_attr( $wcssc_message ) ) );
199
- exit;
200
  }
201
 
 
 
202
  }
203
  }
204
 
205
  public function validate_input( $input ) {
206
- $output = array();
207
-
208
- foreach ( $input as $key => $value ) {
209
-
210
- if ( isset( $input[$key] ) ) {
211
- if ( $key == 'defined_classes' ) {
212
- if ( is_array( $value ) ) {
213
- $output[$key] = implode( ';', $input[$key] );
214
- } else {
215
- $output[$key] = strip_tags( stripslashes( $input[$key] ) );
216
- }
217
- } else {
218
- $output[$key] = strip_tags( stripslashes( $input[$key] ) );
219
- }
220
- }
221
- }
222
-
223
- return $output;
224
  }
225
 
226
  public function add_admin_menus() {
227
- add_options_page( esc_attr__( 'Widget CSS Classes', 'widget-css-classes' ), esc_attr__( 'Widget CSS Classes', 'widget-css-classes' ), 'manage_options', 'widget-css-classes-settings', array( $this, 'plugin_options_page' ) );
228
  }
229
 
230
  /*
@@ -234,16 +212,15 @@ class WCSSC_Settings {
234
  * to render the tabs.
235
  */
236
  public function plugin_options_page() {
237
- $tab = isset( $_GET['tab'] ) ? $_GET['tab'] : $this->general_key;
238
  ?>
239
  <div class="wrap">
240
  <?php $this->plugin_options_tabs(); ?>
241
  <form method="post" action="options.php" enctype="multipart/form-data">
242
- <?php wp_nonce_field( 'update-options' ); ?>
243
  <?php settings_fields( $tab ); ?>
244
  <?php do_settings_sections( $tab ); ?>
245
- <?php if ( $tab == 'importexport' ) $this->importexport_fields(); ?>
246
- <?php if ( $tab != 'importexport' ) submit_button(); ?>
247
  </form>
248
  </div>
249
  <?php
@@ -257,28 +234,26 @@ class WCSSC_Settings {
257
  * plugin_options_page method.
258
  */
259
  public function plugin_options_tabs() {
260
- $current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : $this->general_key;
261
 
262
  echo '<h1 class="nav-tab-wrapper">';
263
  foreach ( $this->plugin_tabs as $tab_key => $tab_caption ) {
264
- $active = $current_tab == $tab_key ? 'nav-tab-active' : '';
265
- echo '<a class="nav-tab '.esc_attr( $active ).'" href="?page='.esc_attr( $this->plugin_key ).'&amp;tab='.esc_attr( $tab_key ).'">'.esc_html( $tab_caption ).'</a>';
266
  }
267
  echo '</h1>';
268
  }
269
 
270
  public function importexport_fields() {
271
- ?>
272
- <h3><?php esc_html_e( 'Import/Export Settings', 'widget-css-classes' ); ?></h3>
273
-
274
- <p><a class="submit button" href="?widget-css-classes-settings-export"><?php esc_attr_e( 'Export Settings', 'widget-css-classes' ); ?></a></p>
275
 
276
- <p>
277
- <input type="hidden" name="widget-css-classes-settings-import" id="widget-css-classes-settings-import" value="true" />
278
- <?php submit_button( esc_attr__( 'Import Settings', 'widget-css-classes' ), 'button', 'widget-css-classes-settings-submit', false ); ?>
279
- <input type="file" name="widget-css-classes-settings-import-file" id="widget-css-classes-settings-import-file" />
280
- </p>
281
 
 
 
 
 
 
282
  <?php
283
  }
284
  }
5
  * Settings
6
  * @author C.M. Kendrick <cindy@cleverness.org>
7
  * @package widget-css-classes
8
+ * @version 1.5.0
9
  */
10
 
11
  /**
16
  */
17
  class WCSSC_Settings {
18
 
19
+ protected $general_key = '';
20
+ protected $plugin_key = 'widget-css-classes-settings';
21
+ protected $plugin_tabs = array();
22
+ protected $general_settings = array();
23
+ protected $current_tab = '';
24
 
25
  public function __construct() {
26
  add_action( 'admin_init', array( $this, 'load_settings' ) );
30
  }
31
 
32
  public function load_settings() {
33
+ $this->general_settings = WCSSC_Lib::get_settings();
34
+ $this->general_key = WCSSC_Lib::$settings_key;
35
  }
36
 
37
  public function section_general_desc() {
38
  }
39
 
40
  public function register_general_settings() {
41
+ $this->plugin_tabs[ $this->general_key ] = esc_attr__( 'Widget CSS Classes Settings', WCSSC_Lib::DOMAIN );
42
+ // @codingStandardsIgnoreLine >> yeah yeah, I know...
43
+ $this->current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : $this->general_key;
44
 
45
  register_setting( $this->general_key, $this->general_key, array( $this, 'validate_input' ) );
46
+ add_settings_section( 'section_general', esc_attr__( 'Widget CSS Classes Settings', WCSSC_Lib::DOMAIN ), array( $this, 'section_general_desc' ), $this->general_key );
47
+ add_settings_field( 'show_number', esc_attr__( 'Add Widget Number Classes', WCSSC_Lib::DOMAIN ), array( $this, 'show_yes_no_option' ), $this->general_key, 'section_general', array( 'key' => 'show_number' ) );
48
+ add_settings_field( 'show_location', esc_attr__( 'Add First/Last Classes', WCSSC_Lib::DOMAIN ), array( $this, 'show_yes_no_option' ), $this->general_key, 'section_general', array( 'key' => 'show_location' ) );
49
+ add_settings_field( 'show_evenodd', esc_attr__( 'Add Even/Odd Classes', WCSSC_Lib::DOMAIN ), array( $this, 'show_yes_no_option' ), $this->general_key, 'section_general', array( 'key' => 'show_evenodd' ) );
50
+ add_settings_field( 'show_id', esc_attr__( 'Show Additional Field for ID', WCSSC_Lib::DOMAIN ), array( $this, 'show_yes_no_option' ), $this->general_key, 'section_general', array( 'key' => 'show_id' ) );
51
+ add_settings_field( 'type', esc_attr__( 'Class Field Type', WCSSC_Lib::DOMAIN ), array( $this, 'type_option' ), $this->general_key, 'section_general' );
52
+ add_settings_field( 'defined_classes', esc_attr__( 'Predefined Classes', WCSSC_Lib::DOMAIN ), array( $this, 'defined_classes_option' ), $this->general_key, 'section_general' );
53
+ add_settings_field( 'fix_widget_params', esc_attr__( 'Fix widget parameters', WCSSC_Lib::DOMAIN ), array( $this, 'show_yes_no_option' ), $this->general_key, 'section_general', array(
54
+ 'key' => 'fix_widget_params',
55
+ 'desc' => esc_html__( 'Wrap widget in a <div> element if the parameters are invalid.', WCSSC_Lib::DOMAIN ),
56
+ ) );
57
+ add_settings_field( 'filter_unique', esc_attr__( 'Remove duplicate classes', WCSSC_Lib::DOMAIN ), array( $this, 'show_yes_no_option' ), $this->general_key, 'section_general', array(
58
+ 'key' => 'filter_unique',
59
+ 'desc' => esc_html__( 'Plugins that run after this plugin could still add duplicates.', WCSSC_Lib::DOMAIN ),
60
+ ) );
61
  do_action( 'widget_css_classes_settings' );
62
  }
63
 
64
+ public function show_yes_no_option( $args ) {
65
+ if ( ! $args['key'] ) return;
66
+ $key = esc_attr( $args['key'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  ?>
68
+ <label><input type="radio" name="<?php echo esc_attr( $this->general_key . '[' . $key . ']' ); ?>" value="1" <?php checked( $this->general_settings[ $key ], true ); ?> /> <?php esc_attr_e( 'Yes', WCSSC_Lib::DOMAIN ); ?></label> &nbsp;
69
+ <label><input type="radio" name="<?php echo esc_attr( $this->general_key . '[' . $key . ']' ); ?>" value="0" <?php checked( $this->general_settings[ $key ], false ); ?> /> <?php esc_attr_e( 'No', WCSSC_Lib::DOMAIN ); ?></label>
70
+ <?php
71
+ if ( ! empty( $args['desc'] ) ) {
72
+ echo WCSSC::do_description( $args['desc'] ); // @codingStandardsIgnoreLine >> no valid esc function.
73
+ }
74
  }
75
 
76
  public function type_option() {
77
  ?>
78
+ <label><input type="radio" class="wcssc_type" name="<?php echo esc_attr( $this->general_key ) . '[type]'; ?>" value="1" <?php checked( $this->general_settings['type'], 1 ); ?> /> <?php esc_attr_e( 'Text', WCSSC_Lib::DOMAIN ); ?></label> &nbsp;
79
+ <label><input type="radio" class="wcssc_type" name="<?php echo esc_attr( $this->general_key ) . '[type]'; ?>" value="2" <?php checked( $this->general_settings['type'], 2 ); ?> /> <?php esc_attr_e( 'Predefined', WCSSC_Lib::DOMAIN ); ?></label> &nbsp;
80
+ <label><input type="radio" class="wcssc_type" name="<?php echo esc_attr( $this->general_key ) . '[type]'; ?>" value="3" <?php checked( $this->general_settings['type'], 3 ); ?> /> <?php esc_attr_e( 'Both', WCSSC_Lib::DOMAIN ); ?></label> &nbsp;
81
+ <label><input type="radio" class="wcssc_type" name="<?php echo esc_attr( $this->general_key ) . '[type]'; ?>" value="0" <?php checked( $this->general_settings['type'], 0 ); ?> /> <?php esc_attr_e( 'None', WCSSC_Lib::DOMAIN ); ?></label>
82
+ <?php
83
  }
84
 
85
  public function defined_classes_option() {
86
  wp_enqueue_script( 'jquery-ui-sortable' );
87
+ $presets = $this->general_settings['defined_classes'];
88
  ?>
89
  <div class="wcssc_sortable">
90
  <?php
91
  if ( count( $presets ) > 1 ) {
92
  foreach ( $presets as $key => $preset ) {
93
+ ?>
94
+ <p class="wcssc_defined_classes">
95
+ <a class="wcssc_sort" href="#"><span class="dashicons dashicons-sort"></span></a>
96
+ <input type="text" name="<?php echo esc_attr( $this->general_key ) . '[defined_classes][' . esc_attr( $key ) . ']'; ?>" value="<?php echo esc_attr( $preset ); ?>" />
97
+ <a class="wcssc_remove" href="#"><span class="dashicons dashicons-dismiss"></span></a>
98
+ </p>
99
+ <?php
 
 
100
  }
101
  ?>
102
  <p class="wcssc_defined_classes wcssc_sort_fixed">
103
  <a class="wcssc_sort" href="#"><span class="dashicons dashicons-sort"></span></a>
104
+ <input type="text" name="<?php echo esc_attr( $this->general_key ) . '[defined_classes][]'; ?>" value="" />
105
  <a href="#" class="wcssc_copy" rel=".wcssc_defined_classes"><span class="dashicons dashicons-plus-alt"></span></a>
106
  <a class="wcssc_remove" href="#"><span class="dashicons dashicons-dismiss"></span></a>
107
  </p>
108
  <?php
109
  } else {
110
+ $value = ( ! empty( $this->general_settings['defined_classes'][0] ) ) ? $this->general_settings['defined_classes'][0] : '';
111
  ?>
112
  <p class="wcssc_defined_classes wcssc_sort_fixed">
113
  <a class="wcssc_sort" href="#"><span class="dashicons dashicons-sort"></span></a>
114
+ <input type="text" name="<?php echo esc_attr( $this->general_key ) . '[defined_classes][]'; ?>" value="<?php echo esc_attr( $value ); ?>" />
115
  <a href="#" class="wcssc_copy" rel=".wcssc_defined_classes"><span class="dashicons dashicons-plus-alt"></span></a>
116
  <a class="wcssc_remove" href="#"><span class="dashicons dashicons-dismiss"></span></a>
117
  </p>
124
 
125
  public function register_importexport_settings() {
126
 
127
+ if ( ! current_user_can( 'manage_options' ) ) {
128
+ return;
129
+ }
130
 
131
+ $this->plugin_tabs['importexport'] = esc_attr__( 'Import/Export', WCSSC_Lib::DOMAIN );
132
+
133
+ $wcssc_message_class = '';
134
+ $wcssc_message = '';
135
+ if ( isset( $_GET['wcssc_message'] ) ) {
136
+ switch ( $_GET['wcssc_message'] ) {
137
+ case 1:
138
+ $wcssc_message_class = 'updated';
139
+ $wcssc_message = esc_attr__( 'Settings Imported', WCSSC_Lib::DOMAIN );
140
+ break;
141
+ case 2:
142
+ $wcssc_message_class = 'error';
143
+ $wcssc_message = esc_attr__( 'Invalid Settings File', WCSSC_Lib::DOMAIN );
144
+ break;
145
+ case 3:
146
+ $wcssc_message_class = 'error';
147
+ $wcssc_message = esc_attr__( 'No Settings File Selected', WCSSC_Lib::DOMAIN );
148
+ break;
 
149
  }
150
+ }
151
 
152
+ if ( ! empty( $wcssc_message ) ) {
153
+ echo '<div class=" ' . $wcssc_message_class . ' "><p>' . esc_html( $wcssc_message ) . '</p></div>';
154
+ }
155
 
156
+ // export settings
157
+ if ( isset( $_GET['widget-css-classes-settings-export'] ) ) {
158
+ header( 'Content-Disposition: attachment; filename=widget-css-classes-settings.txt' );
159
+ header( 'Content-Type: text/plain; charset=utf-8' );
160
+ $general = get_option( 'WCSSC_options' );
161
 
162
+ echo "[START=WCSSC SETTINGS]\n";
163
+ foreach ( $general as $id => $text ) {
164
+ // @codingStandardsIgnoreLine >> wp_json_encode is WP 4.1+
165
+ echo "$id\t" . json_encode( $text ) . "\n";
 
 
166
  }
167
+ echo "[STOP=WCSSC SETTINGS]";
168
+ exit;
169
+ }
170
 
171
+ // import settings
172
+ if ( isset( $_POST['widget-css-classes-settings-import'] ) ) {
173
+ $wcssc_message = 3;
174
+ if ( $_FILES['widget-css-classes-settings-import-file']['tmp_name'] ) {
175
+ $wcssc_message = 2;
176
+ $import = explode( "\n",
177
+ // @codingStandardsIgnoreLine >> yeah yeah, I know...
178
+ file_get_contents( $_FILES['widget-css-classes-settings-import-file']['tmp_name'] ) );
179
+ if ( array_shift( $import ) === '[START=WCSSC SETTINGS]' && array_pop( $import ) === '[STOP=WCSSC SETTINGS]' ) {
180
+ $options = WCSSC_Lib::get_settings();
181
+ foreach ( $import as $import_option ) {
182
+ list( $key, $value ) = explode( "\t", $import_option );
183
+ $options[ $key ] = json_decode( sanitize_text_field( $value ) );
184
+ if ( $options['dropdown'] ) { // Update for 1.3.0
185
+ $options['defined_classes'] = $options['dropdown'];
186
+ unset( $options['dropdown'] );
187
  }
 
 
 
 
188
  }
189
+ WCSSC_Lib::update_settings( $options );
190
+ $wcssc_message = 1;
191
  }
 
 
 
192
  }
193
 
194
+ wp_redirect( admin_url( '/options-general.php?page=widget-css-classes-settings&tab=importexport&wcssc_message=' . esc_attr( $wcssc_message ) ) );
195
+ exit;
196
  }
197
  }
198
 
199
  public function validate_input( $input ) {
200
+ WCSSC_Lib::set_settings( $input );
201
+ return WCSSC_Lib::get_settings();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  }
203
 
204
  public function add_admin_menus() {
205
+ add_options_page( esc_attr__( 'Widget CSS Classes', WCSSC_Lib::DOMAIN ), esc_attr__( 'Widget CSS Classes', WCSSC_Lib::DOMAIN ), 'manage_options', 'widget-css-classes-settings', array( $this, 'plugin_options_page' ) );
206
  }
207
 
208
  /*
212
  * to render the tabs.
213
  */
214
  public function plugin_options_page() {
215
+ $tab = $this->current_tab;
216
  ?>
217
  <div class="wrap">
218
  <?php $this->plugin_options_tabs(); ?>
219
  <form method="post" action="options.php" enctype="multipart/form-data">
 
220
  <?php settings_fields( $tab ); ?>
221
  <?php do_settings_sections( $tab ); ?>
222
+ <?php if ( 'importexport' === $tab ) $this->importexport_fields(); ?>
223
+ <?php if ( 'importexport' !== $tab ) submit_button(); ?>
224
  </form>
225
  </div>
226
  <?php
234
  * plugin_options_page method.
235
  */
236
  public function plugin_options_tabs() {
 
237
 
238
  echo '<h1 class="nav-tab-wrapper">';
239
  foreach ( $this->plugin_tabs as $tab_key => $tab_caption ) {
240
+ $active = $this->current_tab === $tab_key ? 'nav-tab-active' : '';
241
+ echo '<a class="nav-tab ' . esc_attr( $active ) . '" href="?page=' . esc_attr( $this->plugin_key ) . '&amp;tab=' . esc_attr( $tab_key ) . '">' . esc_html( $tab_caption ) . '</a>';
242
  }
243
  echo '</h1>';
244
  }
245
 
246
  public function importexport_fields() {
247
+ ?>
248
+ <h3><?php esc_html_e( 'Import/Export Settings', WCSSC_Lib::DOMAIN ); ?></h3>
 
 
249
 
250
+ <p><a class="submit button" href="?widget-css-classes-settings-export"><?php esc_attr_e( 'Export Settings', WCSSC_Lib::DOMAIN ); ?></a></p>
 
 
 
 
251
 
252
+ <p>
253
+ <input type="hidden" name="widget-css-classes-settings-import" id="widget-css-classes-settings-import" value="true" />
254
+ <?php submit_button( esc_attr__( 'Import Settings', WCSSC_Lib::DOMAIN ), 'button', 'widget-css-classes-settings-submit', false ); ?>
255
+ <input type="file" name="widget-css-classes-settings-import-file" id="widget-css-classes-settings-import-file" />
256
+ </p>
257
  <?php
258
  }
259
  }
includes/widget-css-classes.class.php CHANGED
@@ -5,7 +5,7 @@
5
  * Loader
6
  * @author C.M. Kendrick <cindy@cleverness.org>
7
  * @package widget-css-classes
8
- * @version 1.3.0
9
  */
10
 
11
  /**
@@ -14,245 +14,698 @@
14
  */
15
  class WCSSC {
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  /**
18
  * Adds form fields to Widget
19
  * @static
20
- * @param $widget
21
- * @param $return
22
- * @param $instance
23
  * @return array
24
- * @since 1.0
25
  */
26
  public static function extend_widget_form( $widget, $return, $instance ) {
27
- if ( !isset( $instance['classes'] ) ) $instance['classes'] = null;
28
- if ( !isset( $instance['classes-defined'] ) ) $instance['classes-defined'] = array();
 
 
 
 
 
 
 
 
 
 
 
29
 
30
  $fields = '';
31
 
32
- if ( WCSSC_Loader::$settings['show_id'] == 1 || WCSSC_Loader::$settings['type'] > 0 ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  //$fields .= "<div class='wcssc' style='border: 1px solid #ddd; padding: 5px; background: #fafafa; margin: 1em 0; line-height: 1.5;'>\n";
34
- $fields .= "<div class='wcssc'>\n";
 
35
 
36
- // show id field
37
- if ( WCSSC_Loader::$settings['show_id'] == 1 ) {
38
- if ( !isset( $instance['ids'] ) ) $instance['ids'] = null;
39
- $fields .= "\t<p><label for='widget-{$widget->id_base}-{$widget->number}-ids'>".apply_filters( 'widget_css_classes_id', esc_html__( 'CSS ID', 'widget-css-classes' ) ).":</label>
40
- <input type='text' name='widget-{$widget->id_base}[{$widget->number}][ids]' id='widget-{$widget->id_base}-{$widget->number}-ids' value='{$instance['ids']}' class='widefat' /></p>\n";
41
- }
 
 
42
 
43
- // show text field only
44
- if ( WCSSC_Loader::$settings['type'] == 1 ) {
45
- $fields .= "\t<p><label for='widget-{$widget->id_base}-{$widget->number}-classes'>".apply_filters( 'widget_css_classes_class', esc_html__( 'CSS Classes', 'widget-css-classes' ) ).":</label>
46
- <input type='text' name='widget-{$widget->id_base}[{$widget->number}][classes]' id='widget-{$widget->id_base}-{$widget->number}-classes' value='{$instance['classes']}' class='widefat' /></p>\n";
47
- }
48
 
49
- // show predefined
50
- if ( WCSSC_Loader::$settings['type'] == 2 || WCSSC_Loader::$settings['type'] == 3 ) {
51
-
52
- // Merge input classes with predefined classes
53
- $predefined_classes = explode( ';', WCSSC_Loader::$settings['defined_classes'] );
54
- if ( isset( $instance['classes'] ) ) {
55
- $text_classes = explode( ' ', $instance['classes'] );
56
- foreach ( $text_classes as $key => $value ) {
57
- if ( in_array( $value, $predefined_classes ) ) {
58
- if ( ! in_array( $value, $instance['classes-defined'] ) ) {
59
- $instance['classes-defined'][] = $value;
60
- }
61
- unset( $text_classes[ $key ] );
62
- }
63
- }
64
- $instance['classes'] = implode( ' ', $text_classes );
65
- }
 
 
 
 
 
 
 
 
 
66
 
67
- $fields .= "\t<p><label for='widget-{$widget->id_base}-{$widget->number}-classes'>".apply_filters( 'widget_css_classes_class', esc_html__( 'CSS Classes', 'widget-css-classes' ) ).":</label>\n";
68
- if ( WCSSC_Loader::$settings['type'] == 3 ) {
69
- // show text field
70
- $fields .= "\t<input type='text' name='widget-{$widget->id_base}[{$widget->number}][classes]' id='widget-{$widget->id_base}-{$widget->number}-classes' value='{$instance['classes']}' class='widefat' style='margin-bottom: .5em;' />\n";
71
- }
72
- $fields .= "\t<ul id='widget-{$widget->id_base}-{$widget->number}-classes-defined' style='padding: 5px; max-height: 70px; overflow: hidden; overflow-y: auto; margin: -10px 0 0 0; border: 1px solid #ddd; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) inset; color: #32373c;'>\n";
73
- foreach ( $predefined_classes as $preset ) {
74
- if ( $preset != '' ) {
75
- $preset_checked = '';
76
- if ( in_array( $preset, $instance['classes-defined'] ) ) {
77
- $preset_checked = 'checked="checked"';
78
- }
79
- $id = 'widget-'.$widget->id_base.'-'.$widget->number.'-classes-defined-'.$preset;
80
- $fields .= "\t<li><input id='{$id}' name='widget-{$widget->id_base}[{$widget->number}][classes-defined][]' type='checkbox' value='".$preset."' ".$preset_checked."> <label for='{$id}'>".$preset."</label></li>\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  }
 
82
  }
83
- $fields .= "\t</ul></p>\n";
84
  }
 
 
85
 
86
- $fields .= "</div>\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  }
88
 
89
- do_action( 'widget_css_classes_form', $fields, $instance );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
 
91
- echo $fields;
92
- return $instance;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  }
94
 
95
  /**
96
  * Updates the Widget with the classes
97
  * @static
98
- * @param $instance
99
- * @param $new_instance
100
  * @return array
101
- * @since 1.0
102
  */
103
  public static function update_widget( $instance, $new_instance ) {
104
- if ( !isset( $new_instance['classes'] ) ) $new_instance['classes'] = null;
105
- if ( !isset( $new_instance['classes-defined'] ) ) $new_instance['classes-defined'] = array();
106
- $instance['classes'] = $new_instance['classes'];
107
- $instance['classes-defined'] = $new_instance['classes-defined'];
108
- if (WCSSC_Loader::$settings['show_id'] == 1) {
109
- $instance['ids'] = $new_instance['ids'];
 
 
110
  }
111
- if ( ! empty( $instance['classes-defined'] ) && is_array( $instance['classes-defined'] ) ) {
112
- // Merge predefined classes with input classes
113
- $text_classes = explode( ' ', $instance['classes'] );
114
- foreach ( $instance['classes-defined'] as $key => $value ) {
115
- if ( ! in_array( $value, $text_classes ) ) {
116
- $text_classes[] = $value;
117
- }
 
 
 
 
 
 
 
 
118
  }
119
- $instance['classes'] = implode( ' ', $text_classes );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  }
 
121
  // Do not store predefined array in widget, no need
122
  unset( $instance['classes-defined'] );
123
 
124
  do_action( 'widget_css_classes_update', $instance, $new_instance );
 
125
  return $instance;
126
  }
127
 
128
  /**
129
  * Adds the classes to the widget in the front-end
 
 
 
 
130
  * @static
131
- * @param $params
132
  * @return mixed
133
- * @since 1.0
134
  */
135
  public static function add_widget_classes( $params ) {
136
 
137
- global $wp_registered_widgets, $widget_number;
138
-
139
  if ( ! isset( $params[0] ) ) {
140
  return $params;
141
  }
142
-
143
  $arr_registered_widgets = wp_get_sidebars_widgets(); // Get an array of ALL registered widgets
144
  $this_id = $params[0]['id']; // Get the id for the current sidebar we're processing
145
  $widget_id = $params[0]['widget_id'];
146
- $widget_obj = $wp_registered_widgets[$widget_id];
147
  $widget_num = $widget_obj['params'][0]['number'];
148
- $widget_css_classes = ( get_option( 'WCSSC_options' ) ? get_option( 'WCSSC_options' ) : array() );
149
- $widget_opt = null;
150
 
151
- // If Widget Logic plugin is enabled, use it's callback
152
- if ( in_array( 'widget-logic/widget_logic.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
153
- $widget_logic_options = get_option( 'widget_logic' );
154
- if ( isset( $widget_logic_options['widget_logic-options-filter'] ) && 'checked' == $widget_logic_options['widget_logic-options-filter'] ) {
155
- $widget_opt = get_option( $widget_obj['callback_wl_redirect'][0]->option_name );
156
- } else {
157
- $widget_opt = get_option( $widget_obj['callback'][0]->option_name );
158
- }
159
-
160
- // If Widget Context plugin is enabled, use it's callback
161
- } elseif ( in_array( 'widget-context/widget-context.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
162
- $callback = isset($widget_obj['callback_original_wc']) ? $widget_obj['callback_original_wc'] : null;
163
- $callback = !$callback && isset($widget_obj['callback']) ? $widget_obj['callback'] : null;
164
-
165
- if ($callback && is_array($widget_obj['callback'])) {
166
- $widget_opt = get_option( $callback[0]->option_name );
167
- }
168
  }
169
 
170
- // Default callback
171
- else {
172
- // Check if WP Page Widget is in use
173
- global $post;
174
- $id = ( isset( $post->ID ) ? get_the_ID() : NULL );
175
- if ( isset( $id ) && get_post_meta( $id, '_customize_sidebars' ) ) {
176
- $custom_sidebarcheck = get_post_meta( $id, '_customize_sidebars' );
177
- }
178
- if ( isset( $custom_sidebarcheck[0] ) && ( $custom_sidebarcheck[0] == 'yes' ) ) {
179
- $widget_opt = get_option( 'widget_'.$id.'_'.substr($widget_obj['callback'][0]->option_name, 7) );
180
- } elseif ( isset( $widget_obj['callback'][0]->option_name ) ) {
181
- $widget_opt = get_option( $widget_obj['callback'][0]->option_name );
182
- }
183
  }
 
 
 
 
 
184
 
 
 
185
 
186
- // Add classes
187
- if ( isset( $widget_opt[$widget_num]['classes'] ) && !empty( $widget_opt[$widget_num]['classes'] ) ) {
188
 
189
- if ( $widget_css_classes['type'] == 1 || $widget_css_classes['type'] == 3 ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  // Add all classes
191
- $params[0]['before_widget'] = preg_replace( '/class="/', "class=\"{$widget_opt[$widget_num]['classes']} ", $params[0]['before_widget'], 1 );
192
- } else if ( $widget_css_classes['type'] == 2 ) {
193
  // Only add predefined classes
194
- $predefined_classes = explode( ';', $widget_css_classes['defined_classes'] );
195
- $classes = explode( ' ', $widget_opt[$widget_num]['classes'] );
196
- foreach ( $classes as $key => $value ) {
197
- if ( in_array( $value, $predefined_classes ) ) {
198
- $value = esc_attr( $value );
199
- $params[0]['before_widget'] = preg_replace( '/class="/', "class=\"{$value} ", $params[0]['before_widget'], 1 );
200
  }
201
  }
202
  }
203
- }
204
 
205
- // Add id
206
- if ( $widget_css_classes['show_id'] == 1 ) {
207
- if ( isset( $widget_opt[$widget_num]['ids'] ) && !empty( $widget_opt[$widget_num]['ids'] ) )
208
- $params[0]['before_widget'] = preg_replace( '/id="[^"]*/', "id=\"{$widget_opt[$widget_num]['ids']}", $params[0]['before_widget'], 1 );
209
- }
210
 
211
- // Add first, last, even, and odd classes
212
- if ( $widget_css_classes['show_number'] == 1 || $widget_css_classes['show_location'] == 1 || $widget_css_classes['show_evenodd'] == 1 ) {
213
- if ( !$widget_number ) {
214
- $widget_number = array();
215
  }
216
 
217
- if ( !isset( $arr_registered_widgets[$this_id] ) || !is_array( $arr_registered_widgets[$this_id] ) ) {
218
- return $params;
 
 
219
  }
220
 
221
- if ( isset( $widget_number[$this_id] ) ) {
222
- $widget_number[$this_id]++;
223
- } else {
224
- $widget_number[$this_id] = 1;
225
  }
226
 
227
- $class = 'class="';
 
 
 
 
 
 
 
 
 
 
 
 
228
 
229
- if ( $widget_css_classes['show_number'] == 1 ) {
230
- $class .= apply_filters( 'widget_css_classes_number', esc_attr__( 'widget-', 'widget-css-classes' ) ).$widget_number[$this_id].' ';
 
 
 
231
  }
232
 
233
- if ( $widget_css_classes['show_location'] == 1 ) {
234
- $widget_first = apply_filters( 'widget_css_classes_first', esc_attr__( 'widget-first', 'widget-css-classes' ) );
235
- $widget_last = apply_filters( 'widget_css_classes_last', esc_attr__( 'widget-last', 'widget-css-classes' ) );
236
- if ( $widget_number[$this_id] == 1 ) {
237
- $class .= $widget_first.' ';
238
- }
239
- if ( $widget_number[$this_id] == count( $arr_registered_widgets[$this_id] ) ) {
240
- $class .= $widget_last.' ';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  }
242
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
 
244
- if ( $widget_css_classes['show_evenodd'] == 1 ) {
245
- $widget_even = apply_filters( 'widget_css_classes_even', esc_attr__( 'widget-even', 'widget-css-classes' ) );
246
- $widget_odd = apply_filters( 'widget_css_classes_odd', esc_attr__( 'widget-odd', 'widget-css-classes' ) );
247
- $class .= ( ( $widget_number[$this_id] % 2 ) ? $widget_odd.' ' : $widget_even.' ' );
 
 
 
 
248
  }
 
 
 
 
 
249
 
250
- $params[0]['before_widget'] = str_replace( 'class="', $class, $params[0]['before_widget'] );
 
 
 
 
 
 
 
251
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  }
253
 
254
- do_action( 'widget_css_classes_add_classes', $params, $widget_id, $widget_number, $widget_opt, $widget_obj );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
 
 
 
 
 
 
256
  return $params;
257
  }
258
 
5
  * Loader
6
  * @author C.M. Kendrick <cindy@cleverness.org>
7
  * @package widget-css-classes
8
+ * @version 1.5.0
9
  */
10
 
11
  /**
14
  */
15
  class WCSSC {
16
 
17
+ /**
18
+ * Counter variable for the number of widgets per sidebar ID.
19
+ * @static
20
+ * @since 1.5.0
21
+ * @var array
22
+ */
23
+ public static $widget_counter = array();
24
+
25
+ /**
26
+ * Default capabilities to display the WCC form in widgets.
27
+ * @static
28
+ * @since 1.5.0
29
+ * @var array
30
+ */
31
+ private static $caps = array(
32
+ 'ids' => 'edit_theme_options',
33
+ 'classes' => 'edit_theme_options',
34
+ 'defined' => 'edit_theme_options',
35
+ );
36
+
37
+ public static function init() {
38
+ static $done;
39
+ if ( $done ) return;
40
+
41
+ /**
42
+ * Change the capability to access the CSS ID field.
43
+ *
44
+ * @since 1.5.0
45
+ * @param string
46
+ * @return string
47
+ */
48
+ self::$caps['ids'] = apply_filters( 'widget_css_classes_id_input_capability', self::$caps['ids'] );
49
+
50
+ /**
51
+ * Change the capability to access the CSS Classes field.
52
+ *
53
+ * @since 1.5.0
54
+ * @param string
55
+ * @return string
56
+ */
57
+ self::$caps['classes'] = apply_filters( 'widget_css_classes_class_input_capability', self::$caps['classes'] );
58
+
59
+ /**
60
+ * Change the capability to access the predefined CSS Classes select field.
61
+ * NOTE: If the user cannot access the predefined classes the regular input field is disabled as well.
62
+ *
63
+ * @since 1.5.0
64
+ * @param string
65
+ * @param string
66
+ * @return string
67
+ */
68
+ self::$caps['defined'] = apply_filters( 'widget_css_classes_class_select_capability', self::$caps['defined'], self::$caps['classes'] );
69
+
70
+ $done = true;
71
+ }
72
+
73
  /**
74
  * Adds form fields to Widget
75
  * @static
76
+ * @param WP_Widget $widget
77
+ * @param mixed $return
78
+ * @param array $instance
79
  * @return array
80
+ * @since 1.0
81
  */
82
  public static function extend_widget_form( $widget, $return, $instance ) {
83
+ self::init();
84
+ $instance = wp_parse_args( $instance, array(
85
+ 'ids' => '',
86
+ 'classes' => '',
87
+ 'classes-defined' => array(),
88
+ ) );
89
+
90
+ $access_id = current_user_can( self::$caps['ids'] );
91
+ $access_class = current_user_can( self::$caps['classes'] );
92
+ $access_predefined = current_user_can( self::$caps['defined'] );
93
+ if ( ! $access_predefined ) {
94
+ $access_class = false;
95
+ }
96
 
97
  $fields = '';
98
 
99
+ // show id field.
100
+ if ( WCSSC_Lib::get_settings( 'show_id' ) ) {
101
+ if ( $access_id ) {
102
+ $fields .= self::do_id_field( $widget, $instance );
103
+ } else {
104
+ $fields .= self::do_hidden( $widget->get_field_name( 'ids' ), $instance['ids'] );
105
+ }
106
+ }
107
+
108
+ switch ( WCSSC_Lib::get_settings( 'type' ) ) {
109
+ case 1:
110
+ // show classes text field only.
111
+ if ( $access_class ) {
112
+ $fields .= self::do_class_field( $widget, $instance );
113
+ } else {
114
+ $fields .= self::do_hidden( $widget->get_field_name( 'classes' ), $instance['classes'] );
115
+ }
116
+ break;
117
+ case 2:
118
+ // show classes predefined only.
119
+ if ( $access_predefined ) {
120
+ $fields .= self::do_predefined_field( $widget, $instance, null );
121
+ } else {
122
+ $fields .= self::do_hidden( $widget->get_field_name( 'classes' ), $instance['classes'] );
123
+ }
124
+ break;
125
+ case 3:
126
+ // show both.
127
+ if ( $access_predefined ) {
128
+ $fields .= self::do_predefined_field( $widget, $instance, $access_class );
129
+ } else {
130
+ $fields .= self::do_hidden( $widget->get_field_name( 'classes' ), $instance['classes'] );
131
+ }
132
+ break;
133
+ }
134
+
135
+ if ( $fields ) {
136
  //$fields .= "<div class='wcssc' style='border: 1px solid #ddd; padding: 5px; background: #fafafa; margin: 1em 0; line-height: 1.5;'>\n";
137
+ $fields = '<div class="wcssc" style="clear: both; margin: 1em 0;">' . $fields . '</div>';
138
+ }
139
 
140
+ /**
141
+ * Add extra fields to the widget form.
142
+ *
143
+ * @param string $fields Current HTML.
144
+ * @param array $instance The widget instance.
145
+ * @return string
146
+ */
147
+ do_action( 'widget_css_classes_form', $fields, $instance );
148
 
149
+ echo $fields;
150
+ return $return;
151
+ }
 
 
152
 
153
+ /**
154
+ * Get the HTML for the ID input field.
155
+ * @static
156
+ * @since 1.5.0
157
+ * @param WP_Widget $widget
158
+ * @param array $instance
159
+ * @return string
160
+ */
161
+ private static function do_id_field( $widget, $instance ) {
162
+ $field = '';
163
+ $id = $widget->get_field_id( 'ids' );
164
+ $name = $widget->get_field_name( 'ids' );
165
+ /**
166
+ * Change the label for the CSS ID form field.
167
+ *
168
+ * @param string
169
+ * @return string
170
+ */
171
+ $label = apply_filters( 'widget_css_classes_id', esc_html__( 'CSS ID', WCSSC_Lib::DOMAIN ) );
172
+
173
+ $field .= self::do_label( $label, $id );
174
+ $field .= "<input type='text' name='{$name}' id='{$id}' value='{$instance['ids']}' class='widefat' />";
175
+
176
+ $field = '<p>' . $field . '</p>';
177
+ return $field;
178
+ }
179
 
180
+ /**
181
+ * Get the HTML for the class input field.
182
+ * @static
183
+ * @since 1.5.0
184
+ * @param WP_Widget $widget
185
+ * @param array $instance
186
+ * @return string
187
+ */
188
+ private static function do_class_field( $widget, $instance ) {
189
+ $field = '';
190
+ $id = $widget->get_field_id( 'classes' );
191
+ $name = $widget->get_field_name( 'classes' );
192
+
193
+ /**
194
+ * Change the label for the CSS Classes form field.
195
+ *
196
+ * @param string
197
+ * @return string
198
+ */
199
+ $label = apply_filters( 'widget_css_classes_class', esc_html__( 'CSS Classes', WCSSC_Lib::DOMAIN ) );
200
+ $field .= self::do_label( $label, $id );
201
+
202
+ $field .= "<input type='text' name='{$name}' id='{$id}' value='{$instance['classes']}' class='widefat' />";
203
+
204
+ $field = '<p>' . $field . '</p>';
205
+ return $field;
206
+ }
207
+
208
+ /**
209
+ * Get the HTML for the class input field.
210
+ * @static
211
+ * @since 1.5.0
212
+ * @param WP_Widget $widget
213
+ * @param array $instance
214
+ * @param bool $do_class_field Will echo a class input field if not null. Pass false for a hidden field.
215
+ * @return string
216
+ */
217
+ private static function do_predefined_field( $widget, $instance, $do_class_field = null ) {
218
+
219
+ $field = '';
220
+ $id = $widget->get_field_id( 'classes-defined' );
221
+ $name = $widget->get_field_name( 'classes-defined' );
222
+
223
+ /**
224
+ * @see WCSSC::do_class_field()
225
+ */
226
+ $label = apply_filters( 'widget_css_classes_class', esc_html__( 'CSS Classes', WCSSC_Lib::DOMAIN ) );
227
+
228
+ // Merge input classes with predefined classes.
229
+ $predefined_classes = WCSSC_Lib::get_settings( 'defined_classes' );
230
+
231
+ // Do we have existing classes and is the user allowed to select defined classes?
232
+ if ( ! empty( $instance['classes'] ) ) {
233
+ $text_classes = explode( ' ', $instance['classes'] );
234
+ foreach ( $text_classes as $key => $value ) {
235
+ if ( in_array( $value, $predefined_classes, true ) ) {
236
+ if ( ! in_array( $value, $instance['classes-defined'], true ) ) {
237
+ $instance['classes-defined'][] = $value;
238
  }
239
+ unset( $text_classes[ $key ] );
240
  }
 
241
  }
242
+ $instance['classes'] = implode( ' ', $text_classes );
243
+ }
244
 
245
+ $style = array(
246
+ 'padding' => 'padding: 5px;',
247
+ 'max-height' => 'max-height: 70px;',
248
+ 'overflow' => 'overflow: hidden;',
249
+ 'overflow-y' => 'overflow-y: auto;',
250
+ 'border' => 'border: 1px solid #ddd;',
251
+ 'box-shadow' => 'box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) inset;',
252
+ 'color' => 'color: #32373c;',
253
+ 'margin-top' => 'margin-top: 1px;',
254
+ );
255
+
256
+ if ( null !== $do_class_field ) {
257
+ if ( $do_class_field ) {
258
+ $field .= self::do_class_field( $widget, $instance );
259
+ $style['margin-top'] = 'margin-top: -10px;';
260
+ } else {
261
+ $field .= self::do_hidden( $widget->get_field_name( 'classes' ), $instance['classes'] );
262
+ $field .= self::do_label( $label, $id );
263
+ }
264
+ } else {
265
+ $field .= self::do_label( $label, $id );
266
  }
267
 
268
+ $style = implode( ' ', $style );
269
+ $field .= "<ul id='{$id}' style='{$style}'>";
270
+ foreach ( $predefined_classes as $preset ) {
271
+ $preset_checked = '';
272
+ if ( in_array( $preset, $instance['classes-defined'], true ) ) {
273
+ $preset_checked = ' checked="checked"';
274
+ }
275
+ $option_id = $id . '-' . esc_attr( $preset );
276
+ $option = "<label for='{$option_id}'>";
277
+ $option .= "<input id='{$option_id}' name='{$name}[]' type='checkbox' value='{$preset}' {$preset_checked} />";
278
+ $option .= ' ' . $preset . '</label>';
279
+ $field .= "<li>{$option}</li>";
280
+ }
281
+ $field .= '</ul>';
282
+ return $field;
283
+ }
284
 
285
+ /**
286
+ * Get the HTML for a hidden field.
287
+ * @static
288
+ * @since 1.5.0
289
+ * @param string $name
290
+ * @param string $value
291
+ * @return string
292
+ */
293
+ public static function do_hidden( $name, $value ) {
294
+ return '<input type="hidden" name="' . esc_attr( $name ) . '" value="' . esc_attr( $value ) . '" />';
295
+ }
296
+
297
+ /**
298
+ * Get the HTML for a field label. Label gets appended with a colon (:).
299
+ * @static
300
+ * @since 1.5.0
301
+ * @param string $label
302
+ * @param string $for
303
+ * @return string
304
+ */
305
+ public static function do_label( $label, $for ) {
306
+ return '<label for="' . esc_attr( $for ) . '">' . $label . ':</label>';
307
+ }
308
+
309
+ /**
310
+ * Get the HTML for a field description paragraph.
311
+ * @static
312
+ * @since 1.5.0
313
+ * @param string $text
314
+ * @return string
315
+ */
316
+ public static function do_description( $text ) {
317
+ return '<p class="description">' . $text . '</p>';
318
  }
319
 
320
  /**
321
  * Updates the Widget with the classes
322
  * @static
323
+ * @param $instance
324
+ * @param $new_instance
325
  * @return array
326
+ * @since 1.0
327
  */
328
  public static function update_widget( $instance, $new_instance ) {
329
+ self::init();
330
+ $new_instance = wp_parse_args( $new_instance, array(
331
+ 'classes' => null,
332
+ 'classes-defined' => array(),
333
+ ) );
334
+
335
+ if ( current_user_can( self::$caps['ids'] ) && WCSSC_Lib::get_settings( 'show_id' ) ) {
336
+ $instance['ids'] = sanitize_text_field( $new_instance['ids'] );
337
  }
338
+
339
+ $access_class = current_user_can( self::$caps['classes'] );
340
+ $access_predefined = current_user_can( self::$caps['defined'] );
341
+ if ( ! $access_predefined ) {
342
+ $access_class = false;
343
+ }
344
+
345
+ if ( ( $access_class || $access_predefined ) && WCSSC_Lib::get_settings( 'type' ) ) {
346
+
347
+ // Get the new predefined classes.
348
+ $new_classes = (array) $new_instance['classes-defined'];
349
+
350
+ // Merge predefined classes with input classes. Overwrite existing.
351
+ if ( $access_class ) {
352
+ $new_classes = array_merge( explode( ' ', (string) $new_instance['classes'] ), $new_classes );
353
  }
354
+ // User can only set predefined classes, use the original and append the new classes with validation.
355
+ else {
356
+ // Get the available predefined classes.
357
+ $defined_classes = WCSSC_Lib::get_settings( 'defined_classes' );
358
+ // Remove values that don't exist as predefined.
359
+ $new_classes = array_intersect( $new_classes, $defined_classes );
360
+ // Get the classes existing in the original instance, removing the ones that are predefined.
361
+ $cur_classes = array_diff( explode( ' ', (string) $instance['classes'] ), $defined_classes );
362
+ // Merge with the new predefined selection.
363
+ $new_classes = array_merge( $cur_classes, $new_classes );
364
+ }
365
+
366
+ // Remove empty and duplicate values and overwrite the original instance.
367
+ $new_classes = array_filter( array_unique( $new_classes ) );
368
+ $instance['classes'] = sanitize_text_field( implode( ' ', $new_classes ) );
369
  }
370
+
371
  // Do not store predefined array in widget, no need
372
  unset( $instance['classes-defined'] );
373
 
374
  do_action( 'widget_css_classes_update', $instance, $new_instance );
375
+
376
  return $instance;
377
  }
378
 
379
  /**
380
  * Adds the classes to the widget in the front-end
381
+ *
382
+ * // Disable variable check because of global $wp_registered_widgets.
383
+ * @SuppressWarnings(PHPMD.LongVariables)
384
+ *
385
  * @static
386
+ * @param $params
387
  * @return mixed
388
+ * @since 1.0
389
  */
390
  public static function add_widget_classes( $params ) {
391
 
392
+ global $wp_registered_widgets;
393
+
394
  if ( ! isset( $params[0] ) ) {
395
  return $params;
396
  }
397
+
398
  $arr_registered_widgets = wp_get_sidebars_widgets(); // Get an array of ALL registered widgets
399
  $this_id = $params[0]['id']; // Get the id for the current sidebar we're processing
400
  $widget_id = $params[0]['widget_id'];
401
+ $widget_obj = $wp_registered_widgets[ $widget_id ];
402
  $widget_num = $widget_obj['params'][0]['number'];
403
+ $widget_opt = self::get_widget_opt( $widget_obj );
 
404
 
405
+ // If set, try to fix invalid sidebar parameters.
406
+ if ( WCSSC_Lib::get_settings( 'fix_widget_params' ) ) {
407
+ $params[0] = self::fix_widget_params( $params[0] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
408
  }
409
 
410
+ // Add id.
411
+ if ( WCSSC_Lib::get_settings( 'show_id' ) && ! empty( $widget_opt[ $widget_num ]['ids'] ) ) {
412
+ $params[0]['before_widget'] = preg_replace(
413
+ '/id="[^"]*/',
414
+ "id=\"{$widget_opt[ $widget_num ]['ids']}",
415
+ $params[0]['before_widget'],
416
+ 1
417
+ );
 
 
 
 
 
418
  }
419
+ // Remove empty ID attr.
420
+ $params[0]['before_widget'] = str_replace( 'id="" ', '', $params[0]['before_widget'] );
421
+
422
+ // All classes array.
423
+ $classes = array();
424
 
425
+ // Add custom and predefined classes.
426
+ if ( ! empty( $widget_opt[ $widget_num ]['classes'] ) ) {
427
 
428
+ $custom_classes = explode( ' ', (string) $widget_opt[ $widget_num ]['classes'] );
429
+ $defined_classes = WCSSC_Lib::get_settings( 'defined_classes' );
430
 
431
+ // Order classes by predefined classes order and append the other (custom) classes.
432
+ if ( ! empty( $defined_classes ) ) {
433
+ // Order classes selection by predefined classes order and append the other (custom) classes.
434
+ $custom_classes = array_filter( array_unique( array_merge( array_intersect( $defined_classes, $custom_classes ), $custom_classes ) ) );
435
+ }
436
+
437
+ /**
438
+ * Modify the list of custom CSS classes.
439
+ * Can also be used for ordering etc.
440
+ *
441
+ * @since 1.5.0
442
+ * @param array $custom_classes
443
+ * @param string $widget_id
444
+ * @param int $widget_num
445
+ * @param array $widget_opt
446
+ * @param WP_Widget $widget_obj
447
+ * @return array
448
+ */
449
+ $custom_classes = (array) apply_filters( 'widget_css_classes_custom', $custom_classes, $widget_id, $widget_num, $widget_opt, $widget_obj );
450
+
451
+ $type = WCSSC_Lib::get_settings( 'type' );
452
+
453
+ if ( 1 === (int) $type || 3 === (int) $type ) {
454
  // Add all classes
455
+ $classes = array_merge( $classes, $custom_classes );
456
+ } elseif ( 2 === (int) $type ) {
457
  // Only add predefined classes
458
+ foreach ( $custom_classes as $key => $value ) {
459
+ if ( in_array( $value, $defined_classes, true ) ) {
460
+ $classes[] = $value;
 
 
 
461
  }
462
  }
463
  }
464
+ } // End if().
465
 
466
+ // Add first, last, even, and odd classes.
467
+ if ( WCSSC_Lib::get_settings( 'show_number' ) ||
468
+ WCSSC_Lib::get_settings( 'show_location' ) ||
469
+ WCSSC_Lib::get_settings( 'show_evenodd' )
470
+ ) {
471
 
472
+ if ( ! self::$widget_counter ) {
473
+ self::$widget_counter = array();
 
 
474
  }
475
 
476
+ if ( isset( self::$widget_counter[ $this_id ] ) ) {
477
+ self::$widget_counter[ $this_id ]++;
478
+ } else {
479
+ self::$widget_counter[ $this_id ] = 1;
480
  }
481
 
482
+ if ( WCSSC_Lib::get_settings( 'show_number' ) ) {
483
+ $class = apply_filters( 'widget_css_classes_number', esc_attr__( 'widget-', WCSSC_Lib::DOMAIN ) ) . self::$widget_counter[ $this_id ];
484
+ array_unshift( $classes, $class );
 
485
  }
486
 
487
+ if ( WCSSC_Lib::get_settings( 'show_location' ) &&
488
+ isset( $arr_registered_widgets[ $this_id ] ) &&
489
+ is_array( $arr_registered_widgets[ $this_id ] )
490
+ ) {
491
+ $widget_first = apply_filters( 'widget_css_classes_first', esc_attr__( 'widget-first', WCSSC_Lib::DOMAIN ) );
492
+ $widget_last = apply_filters( 'widget_css_classes_last', esc_attr__( 'widget-last', WCSSC_Lib::DOMAIN ) );
493
+ if ( 1 === (int) self::$widget_counter[ $this_id ] ) {
494
+ array_unshift( $classes, $widget_first );
495
+ }
496
+ if ( count( $arr_registered_widgets[ $this_id ] ) === (int) self::$widget_counter[ $this_id ] ) {
497
+ array_unshift( $classes, $widget_last );
498
+ }
499
+ }
500
 
501
+ if ( WCSSC_Lib::get_settings( 'show_evenodd' ) ) {
502
+ $widget_even = apply_filters( 'widget_css_classes_even', esc_attr__( 'widget-even', WCSSC_Lib::DOMAIN ) );
503
+ $widget_odd = apply_filters( 'widget_css_classes_odd', esc_attr__( 'widget-odd', WCSSC_Lib::DOMAIN ) );
504
+ $class = ( ( self::$widget_counter[ $this_id ] % 2 ) ? $widget_odd : $widget_even );
505
+ array_unshift( $classes, $class );
506
  }
507
 
508
+ } // End if().
509
+
510
+ /**
511
+ * Modify the list of extra CSS classes.
512
+ * Can also be used for ordering etc.
513
+ *
514
+ * @since 1.5.0
515
+ * @param array $classes
516
+ * @param string $widget_id
517
+ * @param int $widget_num
518
+ * @param array $widget_opt
519
+ * @param WP_Widget $widget_obj
520
+ * @return array
521
+ */
522
+ $classes = (array) apply_filters( 'widget_css_classes', $classes, $widget_id, $widget_num, $widget_opt, $widget_obj );
523
+
524
+ // Only unique, non-empty values, separated by space, escaped for HTML attributes.
525
+ $classes = esc_attr( implode( ' ', array_filter( array_unique( $classes ) ) ) );
526
+
527
+ if ( ! empty( $classes ) ) {
528
+ // Add the classes.
529
+ $params[0]['before_widget'] = self::append_to_attribute(
530
+ $params[0]['before_widget'],
531
+ 'class',
532
+ $classes,
533
+ (boolean) WCSSC_Lib::get_settings( 'filter_unique' )
534
+ );
535
+ }
536
+
537
+ /**
538
+ * Modify the widget parameters, normally to add extra classes.
539
+ *
540
+ * @param array $params
541
+ * @param string $widget_id
542
+ * @param int $widget_num
543
+ * @param array $widget_opt
544
+ * @param WP_Widget $widget_obj
545
+ * @return array
546
+ */
547
+ do_action( 'widget_css_classes_add_classes', $params, $widget_id, $widget_num, $widget_opt, $widget_obj );
548
+
549
+ return $params;
550
+ }
551
+
552
+ /**
553
+ * Find an attribute and add the data as a HTML string.
554
+ *
555
+ * @see WCC_Genesis_Widget_Column_Classes::append_to_attribute()
556
+ * @link https://github.com/JoryHogeveen/genesis-widget-column-classes/blob/master/genesis-widget-column-classes.php
557
+ *
558
+ * @static
559
+ * @since 1.5.0
560
+ *
561
+ * @param string $str The HTML string.
562
+ * @param string $attr The attribute to find.
563
+ * @param string $content_extra The content that needs to be appended.
564
+ * @param bool $unique Do we need to filter for unique values?
565
+ *
566
+ * @return string
567
+ */
568
+ public static function append_to_attribute( $str, $attr, $content_extra, $unique = false ) {
569
+
570
+ // Check if attribute has single or double quotes.
571
+ // @codingStandardsIgnoreLine
572
+ if ( $start = stripos( $str, $attr . '="' ) ) {
573
+ // Double.
574
+ $quote = '"';
575
+
576
+ // @codingStandardsIgnoreLine
577
+ } elseif ( $start = stripos( $str, $attr . "='" ) ) {
578
+ // Single.
579
+ $quote = "'";
580
+
581
+ } else {
582
+ // Not found
583
+ return $str;
584
+ }
585
+
586
+ // Add quote (for filtering purposes).
587
+ $attr .= '=' . $quote;
588
+
589
+ $content_extra = trim( $content_extra );
590
+
591
+ if ( $unique ) {
592
+
593
+ // Set start pointer to after the quote.
594
+ $start += strlen( $attr );
595
+ // Find first quote after the start pointer.
596
+ $end = strpos( $str, $quote, $start );
597
+ // Get the current content.
598
+ $content = explode( ' ', substr( $str, $start, $end - $start ) );
599
+ // Get our extra content.
600
+ $content_extra = explode( ' ', $content_extra );
601
+ foreach ( $content_extra as $class ) {
602
+ if ( ! empty( $class ) && ! in_array( $class, $content, true ) ) {
603
+ // This one can be added!
604
+ $content[] = $class;
605
  }
606
  }
607
+ // Remove duplicates and empty values.
608
+ $content = array_filter( array_unique( $content ) );
609
+ // Convert to space separated string.
610
+ $content = implode( ' ', $content );
611
+ // Get HTML before content.
612
+ $before_content = substr( $str, 0, $start );
613
+ // Get HTML after content.
614
+ $after_content = substr( $str, $end );
615
+
616
+ // Combine the string again.
617
+ $str = $before_content . $content . $after_content;
618
+
619
+ } else {
620
+ $str = preg_replace(
621
+ '/' . preg_quote( $attr, '/' ) . '/',
622
+ $attr . $content_extra . ' ' ,
623
+ $str,
624
+ 1
625
+ );
626
+ } // End if().
627
+
628
+ // Return full HTML string.
629
+ return $str;
630
+ }
631
+
632
+ /**
633
+ * Get the widget option value. Also handles third party plugin compatibility.
634
+ *
635
+ * // Disable complexity check because of third part plugin handling.
636
+ * @SuppressWarnings(PHPMD.CyclomaticComplexity)
637
+ *
638
+ * @static
639
+ * @since 1.5.0
640
+ * @param array $widget_obj
641
+ * @return mixed
642
+ */
643
+ private static function get_widget_opt( $widget_obj ) {
644
+ $widget_opt = null;
645
 
646
+ $active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) );
647
+ // If Widget Logic plugin is enabled, use it's callback
648
+ if ( in_array( 'widget-logic/widget_logic.php', $active_plugins, true ) ) {
649
+ $widget_logic_options = get_option( 'widget_logic' );
650
+ if ( isset( $widget_logic_options['widget_logic-options-filter'] ) && 'checked' === $widget_logic_options['widget_logic-options-filter'] ) {
651
+ $widget_opt = get_option( $widget_obj['callback_wl_redirect'][0]->option_name );
652
+ } else {
653
+ $widget_opt = get_option( $widget_obj['callback'][0]->option_name );
654
  }
655
+ }
656
+ // If Widget Context plugin is enabled, use it's callback
657
+ elseif ( in_array( 'widget-context/widget-context.php', $active_plugins, true ) ) {
658
+ $callback = isset( $widget_obj['callback_original_wc'] ) ? $widget_obj['callback_original_wc'] : null;
659
+ $callback = ! $callback && isset( $widget_obj['callback'] ) ? $widget_obj['callback'] : null;
660
 
661
+ if ( $callback && is_array( $widget_obj['callback'] ) ) {
662
+ $widget_opt = get_option( $callback[0]->option_name );
663
+ }
664
+ }
665
+ // If Widget Output filter is enabled (f.e. by WP External Links plugin), don't use it's callback but the original callback
666
+ elseif ( isset( $widget_obj['_wo_original_callback'] ) ) {
667
+ $widget_opt = get_option( $widget_obj['_wo_original_callback'][0]->option_name );
668
+ }
669
 
670
+ // Default callback
671
+ else {
672
+ // Check if WP Page Widget is in use
673
+ global $post;
674
+ $id = ( isset( $post->ID ) ? get_the_ID() : null );
675
+ if ( isset( $id ) && get_post_meta( $id, '_customize_sidebars' ) ) {
676
+ $custom_sidebarcheck = get_post_meta( $id, '_customize_sidebars' );
677
+ }
678
+ if ( isset( $custom_sidebarcheck[0] ) && ( 'yes' === $custom_sidebarcheck[0] ) ) {
679
+ $widget_opt = get_option( 'widget_' . $id . '_' . substr( $widget_obj['callback'][0]->option_name, 7 ) );
680
+ } elseif ( isset( $widget_obj['callback'][0]->option_name ) ) {
681
+ // Default
682
+ $widget_opt = get_option( $widget_obj['callback'][0]->option_name );
683
+ }
684
  }
685
 
686
+ return $widget_opt;
687
+ }
688
+
689
+ /**
690
+ * Try to fix the widget parameters if they are invalid.
691
+ * @static
692
+ * @since 1.5.0
693
+ * @param array $params
694
+ * @return array
695
+ */
696
+ private static function fix_widget_params( $params ) {
697
+ if ( empty( $params['before_widget'] ) || ! strpos( $params['before_widget'], 'class="' ) ) {
698
+
699
+ if ( empty( $params['before_widget'] ) ) {
700
+ $params['before_widget'] = '';
701
+ }
702
+ $params['before_widget'] = '<div id="" class="">' . $params['before_widget'];
703
 
704
+ if ( empty( $params['after_widget'] ) ) {
705
+ $params['after_widget'] = '';
706
+ }
707
+ $params['after_widget'] = $params['after_widget'] . '</div>';
708
+ }
709
  return $params;
710
  }
711
 
js/relCopy.min.js DELETED
@@ -1,2 +0,0 @@
1
- (function(a){a.fn.relCopy=function(e){var b=jQuery.extend({excludeSelector:".exclude",emptySelector:".empty",copyClass:"copy",append:"",clearInputs:!0,limit:0},e);b.limit=parseInt(b.limit);this.each(function(){a(this).click(function(){var f=a(this).attr("rel"),d=a(f).length;if(0!=b.limit&&d>=b.limit)return!1;var c=a(f+":first"),e=a(c).parent(),c=a(c).clone(!0).addClass(b.copyClass+d).append(b.append);b.excludeSelector&&a(c).find(b.excludeSelector).remove();b.emptySelector&&a(c).find(b.emptySelector).empty();
2
- if(a(c).attr("id")){var g=a(c).attr("id")+(d+1);a(c).attr("id",g)}a(c).find("[id]").each(function(){var b=a(this).attr("id")+(d+1);a(this).attr("id",b)});b.clearInputs&&a(c).find(":input").each(function(){switch(a(this).attr("type")){case "button":break;case "reset":break;case "submit":break;case "checkbox":a(this).attr("checked","");break;default:a(this).val("")}});a(e).find(f+":last").after(c);return!1})});return this}})(jQuery);
 
 
js/widget-css-classes.js CHANGED
@@ -1,20 +1,45 @@
1
- jQuery( document ).ready( function ( $ ) {
2
-
3
- $( '.wcssc_copy' ).relCopy( {} );
4
-
5
- $( 'p' ).on( 'click', '.wcssc_remove', function(e) {
6
- e.preventDefault();
7
- $( this ).parent().slideUp( function () {
8
- $( this ).remove();
9
- } );
10
- } );
11
-
12
- if ( $.isFunction( $.fn.sortable ) ) {
13
- $('.wcssc_sortable .wcssc_sort').show();
14
- $('.wcssc_sortable').sortable({
15
- items: 'p:not(.wcssc_sort_fixed)',
16
- placeholder: 'wcssc_drop_placeholder'
17
- }).disableSelection();
18
- }
19
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  } );
1
+ /**
2
+ * Widget CSS Classes Plugin
3
+ *
4
+ * @author C.M. Kendrick <cindy@cleverness.org>
5
+ * @package widget-css-classes
6
+ * @version 1.5.0
7
+ */
8
+
9
+ jQuery( document ).ready( function ( $ ) {
10
+
11
+ // Change opacity if predefined classes is disabled.
12
+ $( 'input.wcssc_type' ).on( 'change', function() {
13
+ var val = $(this).val();
14
+ if ( '2' === val || '3' === val ) {
15
+ $('.wcssc_defined_classes').parents('tr').css({'opacity':''});
16
+ } else {
17
+ $('.wcssc_defined_classes').parents('tr').css({'opacity':'.5'});
18
+ }
19
+ } ).filter(':checked').trigger('change');
20
+
21
+ // Defined classes new and delete handlers.
22
+ $( document ).on( 'click', '.wcssc_defined_classes.wcssc_sort_fixed .wcssc_copy', function(e) {
23
+ e.preventDefault();
24
+ var elem = $( this ).parents('.wcssc_defined_classes');
25
+ var clone = elem.clone().hide().insertBefore( elem );
26
+ clone.removeClass('wcssc_sort_fixed').find('.wcssc_copy').remove();
27
+ clone.slideDown('fast');
28
+
29
+ } ).on( 'click', '.wcssc_defined_classes .wcssc_remove', function(e) {
30
+ e.preventDefault();
31
+ $( this ).parent().slideUp( 'fast', function () {
32
+ $( this ).remove();
33
+ } );
34
+ } );
35
+
36
+ // Make defined classes sortable.
37
+ if ( $.isFunction( $.fn.sortable ) ) {
38
+ $('.wcssc_sortable .wcssc_sort').show();
39
+ $('.wcssc_sortable').sortable({
40
+ items: 'p:not(.wcssc_sort_fixed)',
41
+ placeholder: 'wcssc_drop_placeholder'
42
+ });
43
+ }
44
+
45
  } );
languages/widget-css-classes-es_ES.po CHANGED
@@ -1,166 +1,166 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Widget CSS Classes\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2016-01-13 14:44+0100\n"
6
- "PO-Revision-Date: 2016-01-13 14:45+0100\n"
7
- "Last-Translator: jelena kovacevic <jecajeca260@gmail.com>\n"
8
- "Language-Team: <cindy@cleverness.org>\n"
9
- "Language: es_ES\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n"
14
- "X-Poedit-Basepath: ./\n"
15
- "X-Generator: Poedit 1.6.10\n"
16
- "X-Poedit-SearchPath-0: ..\n"
17
-
18
- #: ../includes/widget-css-classes-library.class.php:31
19
- msgid "Settings"
20
- msgstr "Configuración"
21
-
22
- #: ../includes/widget-css-classes-library.class.php:45
23
- msgid "Version"
24
- msgstr "Versión"
25
-
26
- #: ../includes/widget-css-classes-library.class.php:46
27
- msgid "Donate"
28
- msgstr "Donar"
29
-
30
- #: ../includes/widget-css-classes-loader.class.php:40
31
- #: ../widget-css-classes.php:55
32
- msgid ""
33
- "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
34
- "wordpress.org/Upgrading_WordPress\">Please update.</a>"
35
- msgstr ""
36
- "Widget CSS Classes requiere WordPress 3.3 o posterior. <a href=\"http://"
37
- "codex.wordpress.org/Upgrading_WordPress\">Por favor actualice.</a>"
38
-
39
- #: ../includes/widget-css-classes-settings.class.php:39
40
- #: ../includes/widget-css-classes-settings.class.php:42
41
- msgid "Widget CSS Classes Settings"
42
- msgstr "Configuración de Clases CSS del Widget"
43
-
44
- #: ../includes/widget-css-classes-settings.class.php:43
45
- msgid "Add Widget Number Classes"
46
- msgstr "Adicionar Clases de Número de Widget"
47
-
48
- #: ../includes/widget-css-classes-settings.class.php:44
49
- msgid "Add First/Last Classes"
50
- msgstr "Adicionar Primeras/Últimas Clases"
51
-
52
- #: ../includes/widget-css-classes-settings.class.php:45
53
- msgid "Add Even/Odd Classes"
54
- msgstr "Adicionar Clases Pares/Impares"
55
-
56
- #: ../includes/widget-css-classes-settings.class.php:46
57
- msgid "Show Additional Field for ID"
58
- msgstr "Mostrar Campo Adicional para el ID"
59
-
60
- #: ../includes/widget-css-classes-settings.class.php:47
61
- msgid "Class Field Type"
62
- msgstr "Tipo de Campo de la Clase"
63
-
64
- #: ../includes/widget-css-classes-settings.class.php:48
65
- msgid "Predefined Classes"
66
- msgstr "Las clases predefinidas"
67
-
68
- #: ../includes/widget-css-classes-settings.class.php:53
69
- #: ../includes/widget-css-classes-settings.class.php:60
70
- #: ../includes/widget-css-classes-settings.class.php:67
71
- #: ../includes/widget-css-classes-settings.class.php:74
72
- msgid "Yes"
73
- msgstr "Sí"
74
-
75
- #: ../includes/widget-css-classes-settings.class.php:54
76
- #: ../includes/widget-css-classes-settings.class.php:61
77
- #: ../includes/widget-css-classes-settings.class.php:68
78
- #: ../includes/widget-css-classes-settings.class.php:75
79
- msgid "No"
80
- msgstr "No"
81
-
82
- #: ../includes/widget-css-classes-settings.class.php:81
83
- msgid "Text"
84
- msgstr "Texto"
85
-
86
- #: ../includes/widget-css-classes-settings.class.php:82
87
- msgid "Predefined"
88
- msgstr "Predefinidas"
89
-
90
- #: ../includes/widget-css-classes-settings.class.php:83
91
- msgid "Both"
92
- msgstr "Ambas"
93
-
94
- #: ../includes/widget-css-classes-settings.class.php:84
95
- msgid "Hide"
96
- msgstr "Ocultar"
97
-
98
- #: ../includes/widget-css-classes-settings.class.php:116
99
- msgid "Import/Export"
100
- msgstr "Importar/Exportar"
101
-
102
- #: ../includes/widget-css-classes-settings.class.php:121
103
- msgid "Settings Imported"
104
- msgstr "Configuración Importada"
105
-
106
- #: ../includes/widget-css-classes-settings.class.php:124
107
- msgid "Invalid Settings File"
108
- msgstr "Archivo de Configuración Inválido"
109
-
110
- #: ../includes/widget-css-classes-settings.class.php:127
111
- msgid "No Settings File Selected"
112
- msgstr "No se seleccionó ningún Archivo de Configuración"
113
-
114
- #: ../includes/widget-css-classes-settings.class.php:202
115
- msgid "Widget CSS Classes"
116
- msgstr "Clases CSS de Widget"
117
-
118
- #: ../includes/widget-css-classes-settings.class.php:247
119
- msgid "Import/Export Settings"
120
- msgstr "Configuración de Importar/Exportar"
121
-
122
- #: ../includes/widget-css-classes-settings.class.php:249
123
- msgid "Export Settings"
124
- msgstr "Configuración de Exportar"
125
-
126
- #: ../includes/widget-css-classes-settings.class.php:253
127
- msgid "Import Settings"
128
- msgstr "Configuración de Importar"
129
-
130
- #: ../includes/widget-css-classes.class.php:38
131
- msgid "CSS ID"
132
- msgstr "ID del CSS"
133
-
134
- #: ../includes/widget-css-classes.class.php:44
135
- #: ../includes/widget-css-classes.class.php:66
136
- msgid "CSS Classes"
137
- msgstr "Clase del CSS"
138
-
139
- #: ../includes/widget-css-classes.class.php:223
140
- msgid "widget-"
141
- msgstr "widget-"
142
-
143
- #: ../includes/widget-css-classes.class.php:227
144
- msgid "widget-first"
145
- msgstr "widget-primero"
146
-
147
- #: ../includes/widget-css-classes.class.php:228
148
- msgid "widget-last"
149
- msgstr "widget-último"
150
-
151
- #: ../includes/widget-css-classes.class.php:238
152
- msgid "widget-even"
153
- msgstr "widget-par"
154
-
155
- #: ../includes/widget-css-classes.class.php:239
156
- msgid "widget-odd"
157
- msgstr "widget-impar"
158
-
159
- #~ msgid "Define Classes for Dropdown"
160
- #~ msgstr "Definir Clases para Menú Desplegable"
161
-
162
- #~ msgid "Dropdown"
163
- #~ msgstr "Menú Desplegable"
164
-
165
- #~ msgid "Select"
166
- #~ msgstr "Seleccionar"
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Widget CSS Classes\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2016-01-13 14:44+0100\n"
6
+ "PO-Revision-Date: 2016-01-13 14:45+0100\n"
7
+ "Last-Translator: jelena kovacevic <jecajeca260@gmail.com>\n"
8
+ "Language-Team: <cindy@cleverness.org>\n"
9
+ "Language: es_ES\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n"
14
+ "X-Poedit-Basepath: ./\n"
15
+ "X-Generator: Poedit 1.6.10\n"
16
+ "X-Poedit-SearchPath-0: ..\n"
17
+
18
+ #: ../includes/widget-css-classes-library.class.php:31
19
+ msgid "Settings"
20
+ msgstr "Configuración"
21
+
22
+ #: ../includes/widget-css-classes-library.class.php:45
23
+ msgid "Version"
24
+ msgstr "Versión"
25
+
26
+ #: ../includes/widget-css-classes-library.class.php:46
27
+ msgid "Donate"
28
+ msgstr "Donar"
29
+
30
+ #: ../includes/widget-css-classes-loader.class.php:40
31
+ #: ../widget-css-classes.php:55
32
+ msgid ""
33
+ "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
34
+ "wordpress.org/Upgrading_WordPress\">Please update.</a>"
35
+ msgstr ""
36
+ "Widget CSS Classes requiere WordPress 3.3 o posterior. <a href=\"http://"
37
+ "codex.wordpress.org/Upgrading_WordPress\">Por favor actualice.</a>"
38
+
39
+ #: ../includes/widget-css-classes-settings.class.php:39
40
+ #: ../includes/widget-css-classes-settings.class.php:42
41
+ msgid "Widget CSS Classes Settings"
42
+ msgstr "Configuración de Clases CSS del Widget"
43
+
44
+ #: ../includes/widget-css-classes-settings.class.php:43
45
+ msgid "Add Widget Number Classes"
46
+ msgstr "Adicionar Clases de Número de Widget"
47
+
48
+ #: ../includes/widget-css-classes-settings.class.php:44
49
+ msgid "Add First/Last Classes"
50
+ msgstr "Adicionar Primeras/Últimas Clases"
51
+
52
+ #: ../includes/widget-css-classes-settings.class.php:45
53
+ msgid "Add Even/Odd Classes"
54
+ msgstr "Adicionar Clases Pares/Impares"
55
+
56
+ #: ../includes/widget-css-classes-settings.class.php:46
57
+ msgid "Show Additional Field for ID"
58
+ msgstr "Mostrar Campo Adicional para el ID"
59
+
60
+ #: ../includes/widget-css-classes-settings.class.php:47
61
+ msgid "Class Field Type"
62
+ msgstr "Tipo de Campo de la Clase"
63
+
64
+ #: ../includes/widget-css-classes-settings.class.php:48
65
+ msgid "Predefined Classes"
66
+ msgstr "Las clases predefinidas"
67
+
68
+ #: ../includes/widget-css-classes-settings.class.php:53
69
+ #: ../includes/widget-css-classes-settings.class.php:60
70
+ #: ../includes/widget-css-classes-settings.class.php:67
71
+ #: ../includes/widget-css-classes-settings.class.php:74
72
+ msgid "Yes"
73
+ msgstr "Sí"
74
+
75
+ #: ../includes/widget-css-classes-settings.class.php:54
76
+ #: ../includes/widget-css-classes-settings.class.php:61
77
+ #: ../includes/widget-css-classes-settings.class.php:68
78
+ #: ../includes/widget-css-classes-settings.class.php:75
79
+ msgid "No"
80
+ msgstr "No"
81
+
82
+ #: ../includes/widget-css-classes-settings.class.php:81
83
+ msgid "Text"
84
+ msgstr "Texto"
85
+
86
+ #: ../includes/widget-css-classes-settings.class.php:82
87
+ msgid "Predefined"
88
+ msgstr "Predefinidas"
89
+
90
+ #: ../includes/widget-css-classes-settings.class.php:83
91
+ msgid "Both"
92
+ msgstr "Ambas"
93
+
94
+ #: ../includes/widget-css-classes-settings.class.php:84
95
+ msgid "Hide"
96
+ msgstr "Ocultar"
97
+
98
+ #: ../includes/widget-css-classes-settings.class.php:116
99
+ msgid "Import/Export"
100
+ msgstr "Importar/Exportar"
101
+
102
+ #: ../includes/widget-css-classes-settings.class.php:121
103
+ msgid "Settings Imported"
104
+ msgstr "Configuración Importada"
105
+
106
+ #: ../includes/widget-css-classes-settings.class.php:124
107
+ msgid "Invalid Settings File"
108
+ msgstr "Archivo de Configuración Inválido"
109
+
110
+ #: ../includes/widget-css-classes-settings.class.php:127
111
+ msgid "No Settings File Selected"
112
+ msgstr "No se seleccionó ningún Archivo de Configuración"
113
+
114
+ #: ../includes/widget-css-classes-settings.class.php:202
115
+ msgid "Widget CSS Classes"
116
+ msgstr "Clases CSS de Widget"
117
+
118
+ #: ../includes/widget-css-classes-settings.class.php:247
119
+ msgid "Import/Export Settings"
120
+ msgstr "Configuración de Importar/Exportar"
121
+
122
+ #: ../includes/widget-css-classes-settings.class.php:249
123
+ msgid "Export Settings"
124
+ msgstr "Configuración de Exportar"
125
+
126
+ #: ../includes/widget-css-classes-settings.class.php:253
127
+ msgid "Import Settings"
128
+ msgstr "Configuración de Importar"
129
+
130
+ #: ../includes/widget-css-classes.class.php:38
131
+ msgid "CSS ID"
132
+ msgstr "ID del CSS"
133
+
134
+ #: ../includes/widget-css-classes.class.php:44
135
+ #: ../includes/widget-css-classes.class.php:66
136
+ msgid "CSS Classes"
137
+ msgstr "Clase del CSS"
138
+
139
+ #: ../includes/widget-css-classes.class.php:223
140
+ msgid "widget-"
141
+ msgstr "widget-"
142
+
143
+ #: ../includes/widget-css-classes.class.php:227
144
+ msgid "widget-first"
145
+ msgstr "widget-primero"
146
+
147
+ #: ../includes/widget-css-classes.class.php:228
148
+ msgid "widget-last"
149
+ msgstr "widget-último"
150
+
151
+ #: ../includes/widget-css-classes.class.php:238
152
+ msgid "widget-even"
153
+ msgstr "widget-par"
154
+
155
+ #: ../includes/widget-css-classes.class.php:239
156
+ msgid "widget-odd"
157
+ msgstr "widget-impar"
158
+
159
+ #~ msgid "Define Classes for Dropdown"
160
+ #~ msgstr "Definir Clases para Menú Desplegable"
161
+
162
+ #~ msgid "Dropdown"
163
+ #~ msgstr "Menú Desplegable"
164
+
165
+ #~ msgid "Select"
166
+ #~ msgstr "Seleccionar"
languages/widget-css-classes-nl_NL.mo DELETED
Binary file
languages/widget-css-classes-nl_NL.po DELETED
@@ -1,166 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Widget CSS Classes\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-12-22 23:40+0100\n"
6
- "PO-Revision-Date: 2015-12-22 23:44+0100\n"
7
- "Last-Translator: C.M. Kendrick <cindy@cleverness.org>\n"
8
- "Language-Team: <cindy@cleverness.org>\n"
9
- "Language: nl_NL\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n"
14
- "X-Poedit-Basepath: ./\n"
15
- "X-Generator: Poedit 1.6.10\n"
16
- "X-Poedit-SearchPath-0: ..\n"
17
-
18
- #: ../includes/widget-css-classes-library.class.php:31
19
- msgid "Settings"
20
- msgstr "Instellingen"
21
-
22
- #: ../includes/widget-css-classes-library.class.php:45
23
- msgid "Version"
24
- msgstr "Versie"
25
-
26
- #: ../includes/widget-css-classes-library.class.php:46
27
- msgid "Donate"
28
- msgstr "Doneren"
29
-
30
- #: ../includes/widget-css-classes-loader.class.php:40
31
- #: ../widget-css-classes.php:55
32
- msgid ""
33
- "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
34
- "wordpress.org/Upgrading_WordPress\">Please update.</a>"
35
- msgstr ""
36
- "Voor Widget CSS Classes is WordPress versie 3.3 of hoger vereist. <a href="
37
- "\"http://codex.wordpress.org/Upgrading_WordPress\">Updaten a.u.b..</a>"
38
-
39
- #: ../includes/widget-css-classes-settings.class.php:39
40
- #: ../includes/widget-css-classes-settings.class.php:42
41
- msgid "Widget CSS Classes Settings"
42
- msgstr "Widget CSS Classes Instellingen"
43
-
44
- #: ../includes/widget-css-classes-settings.class.php:43
45
- msgid "Add Widget Number Classes"
46
- msgstr "Voeg numerieke Classes toe"
47
-
48
- #: ../includes/widget-css-classes-settings.class.php:44
49
- msgid "Add First/Last Classes"
50
- msgstr "Voeg First/Last Classes toe"
51
-
52
- #: ../includes/widget-css-classes-settings.class.php:45
53
- msgid "Add Even/Odd Classes"
54
- msgstr "Voeg Even/Odd Classes toe"
55
-
56
- #: ../includes/widget-css-classes-settings.class.php:46
57
- msgid "Show Additional Field for ID"
58
- msgstr "Toon extra veld voor ID"
59
-
60
- #: ../includes/widget-css-classes-settings.class.php:47
61
- msgid "Class Field Type"
62
- msgstr "Soort Class veld"
63
-
64
- #: ../includes/widget-css-classes-settings.class.php:48
65
- msgid "Predefined Classes"
66
- msgstr "Vooraf bepaalde Classes"
67
-
68
- #: ../includes/widget-css-classes-settings.class.php:53
69
- #: ../includes/widget-css-classes-settings.class.php:60
70
- #: ../includes/widget-css-classes-settings.class.php:67
71
- #: ../includes/widget-css-classes-settings.class.php:74
72
- msgid "Yes"
73
- msgstr "Ja"
74
-
75
- #: ../includes/widget-css-classes-settings.class.php:54
76
- #: ../includes/widget-css-classes-settings.class.php:61
77
- #: ../includes/widget-css-classes-settings.class.php:68
78
- #: ../includes/widget-css-classes-settings.class.php:75
79
- msgid "No"
80
- msgstr "Nee"
81
-
82
- #: ../includes/widget-css-classes-settings.class.php:81
83
- msgid "Text"
84
- msgstr "Tekst"
85
-
86
- #: ../includes/widget-css-classes-settings.class.php:82
87
- msgid "Predefined"
88
- msgstr "Vooraf bepaald"
89
-
90
- #: ../includes/widget-css-classes-settings.class.php:83
91
- msgid "Both"
92
- msgstr "Beide"
93
-
94
- #: ../includes/widget-css-classes-settings.class.php:84
95
- msgid "Hide"
96
- msgstr "Verbergen"
97
-
98
- #: ../includes/widget-css-classes-settings.class.php:116
99
- msgid "Import/Export"
100
- msgstr "Importeren/Exporteren"
101
-
102
- #: ../includes/widget-css-classes-settings.class.php:121
103
- msgid "Settings Imported"
104
- msgstr "Instellingen geïmporteerd"
105
-
106
- #: ../includes/widget-css-classes-settings.class.php:124
107
- msgid "Invalid Settings File"
108
- msgstr "Ongeldig instellingen bestand"
109
-
110
- #: ../includes/widget-css-classes-settings.class.php:127
111
- msgid "No Settings File Selected"
112
- msgstr "Geen instellingen bestand geselecteerd"
113
-
114
- #: ../includes/widget-css-classes-settings.class.php:198
115
- msgid "Widget CSS Classes"
116
- msgstr "Widget CSS Classes"
117
-
118
- #: ../includes/widget-css-classes-settings.class.php:243
119
- msgid "Import/Export Settings"
120
- msgstr "Instellingen importeren/exporteren"
121
-
122
- #: ../includes/widget-css-classes-settings.class.php:245
123
- msgid "Export Settings"
124
- msgstr "Instellingen exporteren"
125
-
126
- #: ../includes/widget-css-classes-settings.class.php:249
127
- msgid "Import Settings"
128
- msgstr "Instellingen importeren"
129
-
130
- #: ../includes/widget-css-classes.class.php:38
131
- msgid "CSS ID"
132
- msgstr "CSS ID"
133
-
134
- #: ../includes/widget-css-classes.class.php:44
135
- #: ../includes/widget-css-classes.class.php:51
136
- msgid "CSS Classes"
137
- msgstr "CSS Classes"
138
-
139
- #: ../includes/widget-css-classes.class.php:191
140
- msgid "widget-"
141
- msgstr "widget-"
142
-
143
- #: ../includes/widget-css-classes.class.php:195
144
- msgid "widget-first"
145
- msgstr "widget-first"
146
-
147
- #: ../includes/widget-css-classes.class.php:196
148
- msgid "widget-last"
149
- msgstr "widget-last"
150
-
151
- #: ../includes/widget-css-classes.class.php:206
152
- msgid "widget-even"
153
- msgstr "widget-even"
154
-
155
- #: ../includes/widget-css-classes.class.php:207
156
- msgid "widget-odd"
157
- msgstr "widget-odd"
158
-
159
- #~ msgid "Define Classes for Dropdown"
160
- #~ msgstr "Classes definiëren voor dropdown"
161
-
162
- #~ msgid "Dropdown"
163
- #~ msgstr "Dropdown"
164
-
165
- #~ msgid "Select"
166
- #~ msgstr "Selecteren"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/widget-css-classes-pl_PL.po CHANGED
@@ -1,168 +1,168 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Widget CSS Classes\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2016-01-13 14:36+0100\n"
6
- "PO-Revision-Date: 2016-01-13 14:41+0100\n"
7
- "Last-Translator: Tomasz Wesołowski <tomek@ittw.pl>\n"
8
- "Language-Team: ITTW <tomek@ittw.pl>\n"
9
- "Language: pl_PL\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e;"
14
- "esc_html__\n"
15
- "X-Poedit-Basepath: ./\n"
16
- "X-Generator: Poedit 1.6.10\n"
17
- "X-Poedit-SourceCharset: UTF-8\n"
18
- "X-Poedit-SearchPath-0: ..\n"
19
-
20
- #: ../includes/widget-css-classes-library.class.php:31
21
- msgid "Settings"
22
- msgstr "Ustawienia"
23
-
24
- #: ../includes/widget-css-classes-library.class.php:45
25
- msgid "Version"
26
- msgstr "Wersja"
27
-
28
- #: ../includes/widget-css-classes-library.class.php:46
29
- msgid "Donate"
30
- msgstr "Wesprzyj"
31
-
32
- #: ../includes/widget-css-classes-loader.class.php:40
33
- #: ../widget-css-classes.php:55
34
- msgid ""
35
- "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
36
- "wordpress.org/Upgrading_WordPress\">Please update.</a>"
37
- msgstr ""
38
- "Widget CSS Classes wymaga WordPress-a w wersji 3.3 lub nowszego. <a href="
39
- "\"http://codex.wordpress.org/Upgrading_WordPress\">Zaktualizuj.</a>"
40
-
41
- #: ../includes/widget-css-classes-settings.class.php:39
42
- #: ../includes/widget-css-classes-settings.class.php:42
43
- msgid "Widget CSS Classes Settings"
44
- msgstr "Widget CSS Classes Ustawienia"
45
-
46
- #: ../includes/widget-css-classes-settings.class.php:43
47
- msgid "Add Widget Number Classes"
48
- msgstr "Dodaj numer widgetu jako klasę"
49
-
50
- #: ../includes/widget-css-classes-settings.class.php:44
51
- msgid "Add First/Last Classes"
52
- msgstr "Dodaj Pierwszy/Ostatni jako klasę"
53
-
54
- #: ../includes/widget-css-classes-settings.class.php:45
55
- msgid "Add Even/Odd Classes"
56
- msgstr "Dodaj Parzysty/Nieparzysty"
57
-
58
- #: ../includes/widget-css-classes-settings.class.php:46
59
- msgid "Show Additional Field for ID"
60
- msgstr "Pokaż dodatkowe pole dla ID"
61
-
62
- #: ../includes/widget-css-classes-settings.class.php:47
63
- msgid "Class Field Type"
64
- msgstr "Typ wybory klasy"
65
-
66
- #: ../includes/widget-css-classes-settings.class.php:48
67
- msgid "Predefined Classes"
68
- msgstr "Klasy predefiniowane"
69
-
70
- #: ../includes/widget-css-classes-settings.class.php:53
71
- #: ../includes/widget-css-classes-settings.class.php:60
72
- #: ../includes/widget-css-classes-settings.class.php:67
73
- #: ../includes/widget-css-classes-settings.class.php:74
74
- msgid "Yes"
75
- msgstr "Tak"
76
-
77
- #: ../includes/widget-css-classes-settings.class.php:54
78
- #: ../includes/widget-css-classes-settings.class.php:61
79
- #: ../includes/widget-css-classes-settings.class.php:68
80
- #: ../includes/widget-css-classes-settings.class.php:75
81
- msgid "No"
82
- msgstr "Nie"
83
-
84
- #: ../includes/widget-css-classes-settings.class.php:81
85
- msgid "Text"
86
- msgstr "Tekst"
87
-
88
- #: ../includes/widget-css-classes-settings.class.php:82
89
- msgid "Predefined"
90
- msgstr "Predefiniowane"
91
-
92
- #: ../includes/widget-css-classes-settings.class.php:83
93
- msgid "Both"
94
- msgstr "Obie"
95
-
96
- #: ../includes/widget-css-classes-settings.class.php:84
97
- msgid "Hide"
98
- msgstr "Ukryj"
99
-
100
- #: ../includes/widget-css-classes-settings.class.php:116
101
- msgid "Import/Export"
102
- msgstr "Import/Export"
103
-
104
- #: ../includes/widget-css-classes-settings.class.php:121
105
- msgid "Settings Imported"
106
- msgstr "Ustawienia zostały zaimportowane"
107
-
108
- #: ../includes/widget-css-classes-settings.class.php:124
109
- msgid "Invalid Settings File"
110
- msgstr "Błędny plik ustawień"
111
-
112
- #: ../includes/widget-css-classes-settings.class.php:127
113
- msgid "No Settings File Selected"
114
- msgstr "Nie wybrano pliku z ustawieniami"
115
-
116
- #: ../includes/widget-css-classes-settings.class.php:202
117
- msgid "Widget CSS Classes"
118
- msgstr "Widget CSS Classes"
119
-
120
- #: ../includes/widget-css-classes-settings.class.php:247
121
- msgid "Import/Export Settings"
122
- msgstr "Import/Export Ustawienia"
123
-
124
- #: ../includes/widget-css-classes-settings.class.php:249
125
- msgid "Export Settings"
126
- msgstr "Ustawienia eksportu"
127
-
128
- #: ../includes/widget-css-classes-settings.class.php:253
129
- msgid "Import Settings"
130
- msgstr "Ustawienia importu"
131
-
132
- #: ../includes/widget-css-classes.class.php:38
133
- msgid "CSS ID"
134
- msgstr "CSS ID"
135
-
136
- #: ../includes/widget-css-classes.class.php:44
137
- #: ../includes/widget-css-classes.class.php:66
138
- msgid "CSS Classes"
139
- msgstr "CSS Klasa"
140
-
141
- #: ../includes/widget-css-classes.class.php:223
142
- msgid "widget-"
143
- msgstr "widget-"
144
-
145
- #: ../includes/widget-css-classes.class.php:227
146
- msgid "widget-first"
147
- msgstr "widget-first"
148
-
149
- #: ../includes/widget-css-classes.class.php:228
150
- msgid "widget-last"
151
- msgstr "widget-last"
152
-
153
- #: ../includes/widget-css-classes.class.php:238
154
- msgid "widget-even"
155
- msgstr "widget-even"
156
-
157
- #: ../includes/widget-css-classes.class.php:239
158
- msgid "widget-odd"
159
- msgstr "widget-odd"
160
-
161
- #~ msgid "Define Classes for Dropdown"
162
- #~ msgstr "Zdefiniuj klasy dla Listy"
163
-
164
- #~ msgid "Dropdown"
165
- #~ msgstr "Lista"
166
-
167
- #~ msgid "Select"
168
- #~ msgstr "Wybierz"
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Widget CSS Classes\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2016-01-13 14:36+0100\n"
6
+ "PO-Revision-Date: 2016-01-13 14:41+0100\n"
7
+ "Last-Translator: Tomasz Wesołowski <tomek@ittw.pl>\n"
8
+ "Language-Team: ITTW <tomek@ittw.pl>\n"
9
+ "Language: pl_PL\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e;"
14
+ "esc_html__\n"
15
+ "X-Poedit-Basepath: ./\n"
16
+ "X-Generator: Poedit 1.6.10\n"
17
+ "X-Poedit-SourceCharset: UTF-8\n"
18
+ "X-Poedit-SearchPath-0: ..\n"
19
+
20
+ #: ../includes/widget-css-classes-library.class.php:31
21
+ msgid "Settings"
22
+ msgstr "Ustawienia"
23
+
24
+ #: ../includes/widget-css-classes-library.class.php:45
25
+ msgid "Version"
26
+ msgstr "Wersja"
27
+
28
+ #: ../includes/widget-css-classes-library.class.php:46
29
+ msgid "Donate"
30
+ msgstr "Wesprzyj"
31
+
32
+ #: ../includes/widget-css-classes-loader.class.php:40
33
+ #: ../widget-css-classes.php:55
34
+ msgid ""
35
+ "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
36
+ "wordpress.org/Upgrading_WordPress\">Please update.</a>"
37
+ msgstr ""
38
+ "Widget CSS Classes wymaga WordPress-a w wersji 3.3 lub nowszego. <a href="
39
+ "\"http://codex.wordpress.org/Upgrading_WordPress\">Zaktualizuj.</a>"
40
+
41
+ #: ../includes/widget-css-classes-settings.class.php:39
42
+ #: ../includes/widget-css-classes-settings.class.php:42
43
+ msgid "Widget CSS Classes Settings"
44
+ msgstr "Widget CSS Classes Ustawienia"
45
+
46
+ #: ../includes/widget-css-classes-settings.class.php:43
47
+ msgid "Add Widget Number Classes"
48
+ msgstr "Dodaj numer widgetu jako klasę"
49
+
50
+ #: ../includes/widget-css-classes-settings.class.php:44
51
+ msgid "Add First/Last Classes"
52
+ msgstr "Dodaj Pierwszy/Ostatni jako klasę"
53
+
54
+ #: ../includes/widget-css-classes-settings.class.php:45
55
+ msgid "Add Even/Odd Classes"
56
+ msgstr "Dodaj Parzysty/Nieparzysty"
57
+
58
+ #: ../includes/widget-css-classes-settings.class.php:46
59
+ msgid "Show Additional Field for ID"
60
+ msgstr "Pokaż dodatkowe pole dla ID"
61
+
62
+ #: ../includes/widget-css-classes-settings.class.php:47
63
+ msgid "Class Field Type"
64
+ msgstr "Typ wybory klasy"
65
+
66
+ #: ../includes/widget-css-classes-settings.class.php:48
67
+ msgid "Predefined Classes"
68
+ msgstr "Klasy predefiniowane"
69
+
70
+ #: ../includes/widget-css-classes-settings.class.php:53
71
+ #: ../includes/widget-css-classes-settings.class.php:60
72
+ #: ../includes/widget-css-classes-settings.class.php:67
73
+ #: ../includes/widget-css-classes-settings.class.php:74
74
+ msgid "Yes"
75
+ msgstr "Tak"
76
+
77
+ #: ../includes/widget-css-classes-settings.class.php:54
78
+ #: ../includes/widget-css-classes-settings.class.php:61
79
+ #: ../includes/widget-css-classes-settings.class.php:68
80
+ #: ../includes/widget-css-classes-settings.class.php:75
81
+ msgid "No"
82
+ msgstr "Nie"
83
+
84
+ #: ../includes/widget-css-classes-settings.class.php:81
85
+ msgid "Text"
86
+ msgstr "Tekst"
87
+
88
+ #: ../includes/widget-css-classes-settings.class.php:82
89
+ msgid "Predefined"
90
+ msgstr "Predefiniowane"
91
+
92
+ #: ../includes/widget-css-classes-settings.class.php:83
93
+ msgid "Both"
94
+ msgstr "Obie"
95
+
96
+ #: ../includes/widget-css-classes-settings.class.php:84
97
+ msgid "Hide"
98
+ msgstr "Ukryj"
99
+
100
+ #: ../includes/widget-css-classes-settings.class.php:116
101
+ msgid "Import/Export"
102
+ msgstr "Import/Export"
103
+
104
+ #: ../includes/widget-css-classes-settings.class.php:121
105
+ msgid "Settings Imported"
106
+ msgstr "Ustawienia zostały zaimportowane"
107
+
108
+ #: ../includes/widget-css-classes-settings.class.php:124
109
+ msgid "Invalid Settings File"
110
+ msgstr "Błędny plik ustawień"
111
+
112
+ #: ../includes/widget-css-classes-settings.class.php:127
113
+ msgid "No Settings File Selected"
114
+ msgstr "Nie wybrano pliku z ustawieniami"
115
+
116
+ #: ../includes/widget-css-classes-settings.class.php:202
117
+ msgid "Widget CSS Classes"
118
+ msgstr "Widget CSS Classes"
119
+
120
+ #: ../includes/widget-css-classes-settings.class.php:247
121
+ msgid "Import/Export Settings"
122
+ msgstr "Import/Export Ustawienia"
123
+
124
+ #: ../includes/widget-css-classes-settings.class.php:249
125
+ msgid "Export Settings"
126
+ msgstr "Ustawienia eksportu"
127
+
128
+ #: ../includes/widget-css-classes-settings.class.php:253
129
+ msgid "Import Settings"
130
+ msgstr "Ustawienia importu"
131
+
132
+ #: ../includes/widget-css-classes.class.php:38
133
+ msgid "CSS ID"
134
+ msgstr "CSS ID"
135
+
136
+ #: ../includes/widget-css-classes.class.php:44
137
+ #: ../includes/widget-css-classes.class.php:66
138
+ msgid "CSS Classes"
139
+ msgstr "CSS Klasa"
140
+
141
+ #: ../includes/widget-css-classes.class.php:223
142
+ msgid "widget-"
143
+ msgstr "widget-"
144
+
145
+ #: ../includes/widget-css-classes.class.php:227
146
+ msgid "widget-first"
147
+ msgstr "widget-first"
148
+
149
+ #: ../includes/widget-css-classes.class.php:228
150
+ msgid "widget-last"
151
+ msgstr "widget-last"
152
+
153
+ #: ../includes/widget-css-classes.class.php:238
154
+ msgid "widget-even"
155
+ msgstr "widget-even"
156
+
157
+ #: ../includes/widget-css-classes.class.php:239
158
+ msgid "widget-odd"
159
+ msgstr "widget-odd"
160
+
161
+ #~ msgid "Define Classes for Dropdown"
162
+ #~ msgstr "Zdefiniuj klasy dla Listy"
163
+
164
+ #~ msgid "Dropdown"
165
+ #~ msgstr "Lista"
166
+
167
+ #~ msgid "Select"
168
+ #~ msgstr "Wybierz"
languages/widget-css-classes-ru_RU.mo DELETED
Binary file
languages/widget-css-classes-ru_RU.po DELETED
@@ -1,167 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Widget CSS Classes\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2016-01-13 15:15+0100\n"
6
- "PO-Revision-Date: 2016-01-13 15:16+0100\n"
7
- "Last-Translator: Borisa Djuraskovic <borisad@webhostinghub.com>\n"
8
- "Language-Team: <cindy@cleverness.org>\n"
9
- "Language: ru_RU\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n"
14
- "X-Poedit-Basepath: ./\n"
15
- "X-Generator: Poedit 1.6.10\n"
16
- "X-Poedit-SearchPath-0: ..\n"
17
-
18
- #: ../includes/widget-css-classes-library.class.php:31
19
- msgid "Settings"
20
- msgstr "Настройки"
21
-
22
- #: ../includes/widget-css-classes-library.class.php:45
23
- msgid "Version"
24
- msgstr "Версия"
25
-
26
- #: ../includes/widget-css-classes-library.class.php:46
27
- msgid "Donate"
28
- msgstr "Пожертвовать"
29
-
30
- #: ../includes/widget-css-classes-loader.class.php:40
31
- #: ../widget-css-classes.php:55
32
- msgid ""
33
- "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
34
- "wordpress.org/Upgrading_WordPress\">Please update.</a>"
35
- msgstr ""
36
- "Для «CSS классы для виджетов» требуется WordPress 3.3 или новее. <a href="
37
- "\"http://codex.wordpress.org/Upgrading_WordPress\">Пожалуйста, обновите.</a>"
38
-
39
- #: ../includes/widget-css-classes-settings.class.php:39
40
- #: ../includes/widget-css-classes-settings.class.php:42
41
- msgid "Widget CSS Classes Settings"
42
- msgstr "Настройки плагина «CSS классы для виджетов»"
43
-
44
- #: ../includes/widget-css-classes-settings.class.php:43
45
- msgid "Add Widget Number Classes"
46
- msgstr "Добавить нумерованные классы"
47
-
48
- #: ../includes/widget-css-classes-settings.class.php:44
49
- msgid "Add First/Last Classes"
50
- msgstr "Добавить First/Last классы"
51
-
52
- #: ../includes/widget-css-classes-settings.class.php:45
53
- msgid "Add Even/Odd Classes"
54
- msgstr "Добавить Even/Odd классы"
55
-
56
- #: ../includes/widget-css-classes-settings.class.php:46
57
- msgid "Show Additional Field for ID"
58
- msgstr "Показать дополнительное поле для ID"
59
-
60
- #: ../includes/widget-css-classes-settings.class.php:47
61
- msgid "Class Field Type"
62
- msgstr "Тип поля для класса"
63
-
64
- #: ../includes/widget-css-classes-settings.class.php:48
65
- msgid "Predefined Classes"
66
- msgstr "Предопределенный классов"
67
-
68
- #: ../includes/widget-css-classes-settings.class.php:53
69
- #: ../includes/widget-css-classes-settings.class.php:60
70
- #: ../includes/widget-css-classes-settings.class.php:67
71
- #: ../includes/widget-css-classes-settings.class.php:74
72
- msgid "Yes"
73
- msgstr "Да"
74
-
75
- #: ../includes/widget-css-classes-settings.class.php:54
76
- #: ../includes/widget-css-classes-settings.class.php:61
77
- #: ../includes/widget-css-classes-settings.class.php:68
78
- #: ../includes/widget-css-classes-settings.class.php:75
79
- msgid "No"
80
- msgstr "Нет"
81
-
82
- #: ../includes/widget-css-classes-settings.class.php:81
83
- msgid "Text"
84
- msgstr "Текст"
85
-
86
- #: ../includes/widget-css-classes-settings.class.php:82
87
- msgid "Predefined"
88
- msgstr "Предопределенный"
89
-
90
- #: ../includes/widget-css-classes-settings.class.php:83
91
- msgid "Both"
92
- msgstr "Обе"
93
-
94
- #: ../includes/widget-css-classes-settings.class.php:84
95
- msgid "Hide"
96
- msgstr "Скрыть"
97
-
98
- #: ../includes/widget-css-classes-settings.class.php:116
99
- msgid "Import/Export"
100
- msgstr "Импорт/Экспорт"
101
-
102
- #: ../includes/widget-css-classes-settings.class.php:121
103
- msgid "Settings Imported"
104
- msgstr "Настройки импорта"
105
-
106
- #: ../includes/widget-css-classes-settings.class.php:124
107
- msgid "Invalid Settings File"
108
- msgstr "Недопустимый файл настроек"
109
-
110
- #: ../includes/widget-css-classes-settings.class.php:127
111
- msgid "No Settings File Selected"
112
- msgstr "Не выбран файл настроек"
113
-
114
- #: ../includes/widget-css-classes-settings.class.php:202
115
- msgid "Widget CSS Classes"
116
- msgstr "CSS классы для виджетов"
117
-
118
- #: ../includes/widget-css-classes-settings.class.php:247
119
- msgid "Import/Export Settings"
120
- msgstr "Импорт/Экспорт настроек"
121
-
122
- #: ../includes/widget-css-classes-settings.class.php:249
123
- msgid "Export Settings"
124
- msgstr "Экспорт настроек"
125
-
126
- #: ../includes/widget-css-classes-settings.class.php:253
127
- msgid "Import Settings"
128
- msgstr "Импорт настроек"
129
-
130
- #: ../includes/widget-css-classes.class.php:38
131
- msgid "CSS ID"
132
- msgstr "CSS идентификатор"
133
-
134
- #: ../includes/widget-css-classes.class.php:44
135
- #: ../includes/widget-css-classes.class.php:66
136
- #, fuzzy
137
- msgid "CSS Classes"
138
- msgstr "CSS класс"
139
-
140
- #: ../includes/widget-css-classes.class.php:223
141
- msgid "widget-"
142
- msgstr "widget-"
143
-
144
- #: ../includes/widget-css-classes.class.php:227
145
- msgid "widget-first"
146
- msgstr "widget-first"
147
-
148
- #: ../includes/widget-css-classes.class.php:228
149
- msgid "widget-last"
150
- msgstr "widget-last"
151
-
152
- #: ../includes/widget-css-classes.class.php:238
153
- msgid "widget-even"
154
- msgstr "widget-even"
155
-
156
- #: ../includes/widget-css-classes.class.php:239
157
- msgid "widget-odd"
158
- msgstr "widget-odd"
159
-
160
- #~ msgid "Define Classes for Dropdown"
161
- #~ msgstr "Определить классы для выпадающего списка"
162
-
163
- #~ msgid "Dropdown"
164
- #~ msgstr "Выпадающий список"
165
-
166
- #~ msgid "Select"
167
- #~ msgstr "Выбрать"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/widget-css-classes-sk_SK.po CHANGED
@@ -1,166 +1,166 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Widget CSS Classes\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2016-01-13 14:38+0100\n"
6
- "PO-Revision-Date: 2016-01-13 14:40+0100\n"
7
- "Last-Translator: \n"
8
- "Language-Team: <cindy@cleverness.org>\n"
9
- "Language: sk_SK\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n"
14
- "X-Poedit-Basepath: ./\n"
15
- "X-Generator: Poedit 1.6.10\n"
16
- "X-Poedit-SearchPath-0: ..\n"
17
-
18
- #: ../includes/widget-css-classes-library.class.php:31
19
- msgid "Settings"
20
- msgstr "Nastavenia"
21
-
22
- #: ../includes/widget-css-classes-library.class.php:45
23
- msgid "Version"
24
- msgstr "Verzia"
25
-
26
- #: ../includes/widget-css-classes-library.class.php:46
27
- msgid "Donate"
28
- msgstr "Darovať"
29
-
30
- #: ../includes/widget-css-classes-loader.class.php:40
31
- #: ../widget-css-classes.php:55
32
- msgid ""
33
- "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
34
- "wordpress.org/Upgrading_WordPress\">Please update.</a>"
35
- msgstr ""
36
- "Widget CSS Classes požadované WordPress 3.3 alebo novší. <a href=\"http://"
37
- "codex.wordpress.org/Upgrading_WordPress\">Prosím aktualizujte.</a>"
38
-
39
- #: ../includes/widget-css-classes-settings.class.php:39
40
- #: ../includes/widget-css-classes-settings.class.php:42
41
- msgid "Widget CSS Classes Settings"
42
- msgstr "Widget CSS Classes nastavenia"
43
-
44
- #: ../includes/widget-css-classes-settings.class.php:43
45
- msgid "Add Widget Number Classes"
46
- msgstr "Pridať Widget počet tried"
47
-
48
- #: ../includes/widget-css-classes-settings.class.php:44
49
- msgid "Add First/Last Classes"
50
- msgstr "Pridať prvom a poslednom tried"
51
-
52
- #: ../includes/widget-css-classes-settings.class.php:45
53
- msgid "Add Even/Odd Classes"
54
- msgstr "Pridať aj/nepárne tried"
55
-
56
- #: ../includes/widget-css-classes-settings.class.php:46
57
- msgid "Show Additional Field for ID"
58
- msgstr "Zobraziť ďalšie pole pre ID"
59
-
60
- #: ../includes/widget-css-classes-settings.class.php:47
61
- msgid "Class Field Type"
62
- msgstr "Typ poľa trieda"
63
-
64
- #: ../includes/widget-css-classes-settings.class.php:48
65
- msgid "Predefined Classes"
66
- msgstr "Preddefinované triedy"
67
-
68
- #: ../includes/widget-css-classes-settings.class.php:53
69
- #: ../includes/widget-css-classes-settings.class.php:60
70
- #: ../includes/widget-css-classes-settings.class.php:67
71
- #: ../includes/widget-css-classes-settings.class.php:74
72
- msgid "Yes"
73
- msgstr "áno"
74
-
75
- #: ../includes/widget-css-classes-settings.class.php:54
76
- #: ../includes/widget-css-classes-settings.class.php:61
77
- #: ../includes/widget-css-classes-settings.class.php:68
78
- #: ../includes/widget-css-classes-settings.class.php:75
79
- msgid "No"
80
- msgstr "nie"
81
-
82
- #: ../includes/widget-css-classes-settings.class.php:81
83
- msgid "Text"
84
- msgstr "Text"
85
-
86
- #: ../includes/widget-css-classes-settings.class.php:82
87
- msgid "Predefined"
88
- msgstr "Preddefinované"
89
-
90
- #: ../includes/widget-css-classes-settings.class.php:83
91
- msgid "Both"
92
- msgstr "Obe"
93
-
94
- #: ../includes/widget-css-classes-settings.class.php:84
95
- msgid "Hide"
96
- msgstr "Skryť"
97
-
98
- #: ../includes/widget-css-classes-settings.class.php:116
99
- msgid "Import/Export"
100
- msgstr "Import a Export"
101
-
102
- #: ../includes/widget-css-classes-settings.class.php:121
103
- msgid "Settings Imported"
104
- msgstr "Nastavenia dovážané"
105
-
106
- #: ../includes/widget-css-classes-settings.class.php:124
107
- msgid "Invalid Settings File"
108
- msgstr "Neplatný súbor nastavení"
109
-
110
- #: ../includes/widget-css-classes-settings.class.php:127
111
- msgid "No Settings File Selected"
112
- msgstr "Žiadny súbor nastavení vybraných"
113
-
114
- #: ../includes/widget-css-classes-settings.class.php:202
115
- msgid "Widget CSS Classes"
116
- msgstr "Widget CSS triedy"
117
-
118
- #: ../includes/widget-css-classes-settings.class.php:247
119
- msgid "Import/Export Settings"
120
- msgstr "Import a Export nastavení"
121
-
122
- #: ../includes/widget-css-classes-settings.class.php:249
123
- msgid "Export Settings"
124
- msgstr "Exportovať nastavenie"
125
-
126
- #: ../includes/widget-css-classes-settings.class.php:253
127
- msgid "Import Settings"
128
- msgstr "Nastavenie importu"
129
-
130
- #: ../includes/widget-css-classes.class.php:38
131
- msgid "CSS ID"
132
- msgstr "CSS A ID"
133
-
134
- #: ../includes/widget-css-classes.class.php:44
135
- #: ../includes/widget-css-classes.class.php:66
136
- msgid "CSS Classes"
137
- msgstr "CSS triedy"
138
-
139
- #: ../includes/widget-css-classes.class.php:223
140
- msgid "widget-"
141
- msgstr "widget-"
142
-
143
- #: ../includes/widget-css-classes.class.php:227
144
- msgid "widget-first"
145
- msgstr "widget-prvé"
146
-
147
- #: ../includes/widget-css-classes.class.php:228
148
- msgid "widget-last"
149
- msgstr "widget-posledný"
150
-
151
- #: ../includes/widget-css-classes.class.php:238
152
- msgid "widget-even"
153
- msgstr "widget-aj"
154
-
155
- #: ../includes/widget-css-classes.class.php:239
156
- msgid "widget-odd"
157
- msgstr "widget-odd"
158
-
159
- #~ msgid "Define Classes for Dropdown"
160
- #~ msgstr "Definovať triedy pre rozbaľovací zoznam"
161
-
162
- #~ msgid "Dropdown"
163
- #~ msgstr "Rozbaľovací zoznam"
164
-
165
- #~ msgid "Select"
166
- #~ msgstr "Vyberte"
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Widget CSS Classes\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2016-01-13 14:38+0100\n"
6
+ "PO-Revision-Date: 2016-01-13 14:40+0100\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: <cindy@cleverness.org>\n"
9
+ "Language: sk_SK\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n"
14
+ "X-Poedit-Basepath: ./\n"
15
+ "X-Generator: Poedit 1.6.10\n"
16
+ "X-Poedit-SearchPath-0: ..\n"
17
+
18
+ #: ../includes/widget-css-classes-library.class.php:31
19
+ msgid "Settings"
20
+ msgstr "Nastavenia"
21
+
22
+ #: ../includes/widget-css-classes-library.class.php:45
23
+ msgid "Version"
24
+ msgstr "Verzia"
25
+
26
+ #: ../includes/widget-css-classes-library.class.php:46
27
+ msgid "Donate"
28
+ msgstr "Darovať"
29
+
30
+ #: ../includes/widget-css-classes-loader.class.php:40
31
+ #: ../widget-css-classes.php:55
32
+ msgid ""
33
+ "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
34
+ "wordpress.org/Upgrading_WordPress\">Please update.</a>"
35
+ msgstr ""
36
+ "Widget CSS Classes požadované WordPress 3.3 alebo novší. <a href=\"http://"
37
+ "codex.wordpress.org/Upgrading_WordPress\">Prosím aktualizujte.</a>"
38
+
39
+ #: ../includes/widget-css-classes-settings.class.php:39
40
+ #: ../includes/widget-css-classes-settings.class.php:42
41
+ msgid "Widget CSS Classes Settings"
42
+ msgstr "Widget CSS Classes nastavenia"
43
+
44
+ #: ../includes/widget-css-classes-settings.class.php:43
45
+ msgid "Add Widget Number Classes"
46
+ msgstr "Pridať Widget počet tried"
47
+
48
+ #: ../includes/widget-css-classes-settings.class.php:44
49
+ msgid "Add First/Last Classes"
50
+ msgstr "Pridať prvom a poslednom tried"
51
+
52
+ #: ../includes/widget-css-classes-settings.class.php:45
53
+ msgid "Add Even/Odd Classes"
54
+ msgstr "Pridať aj/nepárne tried"
55
+
56
+ #: ../includes/widget-css-classes-settings.class.php:46
57
+ msgid "Show Additional Field for ID"
58
+ msgstr "Zobraziť ďalšie pole pre ID"
59
+
60
+ #: ../includes/widget-css-classes-settings.class.php:47
61
+ msgid "Class Field Type"
62
+ msgstr "Typ poľa trieda"
63
+
64
+ #: ../includes/widget-css-classes-settings.class.php:48
65
+ msgid "Predefined Classes"
66
+ msgstr "Preddefinované triedy"
67
+
68
+ #: ../includes/widget-css-classes-settings.class.php:53
69
+ #: ../includes/widget-css-classes-settings.class.php:60
70
+ #: ../includes/widget-css-classes-settings.class.php:67
71
+ #: ../includes/widget-css-classes-settings.class.php:74
72
+ msgid "Yes"
73
+ msgstr "áno"
74
+
75
+ #: ../includes/widget-css-classes-settings.class.php:54
76
+ #: ../includes/widget-css-classes-settings.class.php:61
77
+ #: ../includes/widget-css-classes-settings.class.php:68
78
+ #: ../includes/widget-css-classes-settings.class.php:75
79
+ msgid "No"
80
+ msgstr "nie"
81
+
82
+ #: ../includes/widget-css-classes-settings.class.php:81
83
+ msgid "Text"
84
+ msgstr "Text"
85
+
86
+ #: ../includes/widget-css-classes-settings.class.php:82
87
+ msgid "Predefined"
88
+ msgstr "Preddefinované"
89
+
90
+ #: ../includes/widget-css-classes-settings.class.php:83
91
+ msgid "Both"
92
+ msgstr "Obe"
93
+
94
+ #: ../includes/widget-css-classes-settings.class.php:84
95
+ msgid "Hide"
96
+ msgstr "Skryť"
97
+
98
+ #: ../includes/widget-css-classes-settings.class.php:116
99
+ msgid "Import/Export"
100
+ msgstr "Import a Export"
101
+
102
+ #: ../includes/widget-css-classes-settings.class.php:121
103
+ msgid "Settings Imported"
104
+ msgstr "Nastavenia dovážané"
105
+
106
+ #: ../includes/widget-css-classes-settings.class.php:124
107
+ msgid "Invalid Settings File"
108
+ msgstr "Neplatný súbor nastavení"
109
+
110
+ #: ../includes/widget-css-classes-settings.class.php:127
111
+ msgid "No Settings File Selected"
112
+ msgstr "Žiadny súbor nastavení vybraných"
113
+
114
+ #: ../includes/widget-css-classes-settings.class.php:202
115
+ msgid "Widget CSS Classes"
116
+ msgstr "Widget CSS triedy"
117
+
118
+ #: ../includes/widget-css-classes-settings.class.php:247
119
+ msgid "Import/Export Settings"
120
+ msgstr "Import a Export nastavení"
121
+
122
+ #: ../includes/widget-css-classes-settings.class.php:249
123
+ msgid "Export Settings"
124
+ msgstr "Exportovať nastavenie"
125
+
126
+ #: ../includes/widget-css-classes-settings.class.php:253
127
+ msgid "Import Settings"
128
+ msgstr "Nastavenie importu"
129
+
130
+ #: ../includes/widget-css-classes.class.php:38
131
+ msgid "CSS ID"
132
+ msgstr "CSS A ID"
133
+
134
+ #: ../includes/widget-css-classes.class.php:44
135
+ #: ../includes/widget-css-classes.class.php:66
136
+ msgid "CSS Classes"
137
+ msgstr "CSS triedy"
138
+
139
+ #: ../includes/widget-css-classes.class.php:223
140
+ msgid "widget-"
141
+ msgstr "widget-"
142
+
143
+ #: ../includes/widget-css-classes.class.php:227
144
+ msgid "widget-first"
145
+ msgstr "widget-prvé"
146
+
147
+ #: ../includes/widget-css-classes.class.php:228
148
+ msgid "widget-last"
149
+ msgstr "widget-posledný"
150
+
151
+ #: ../includes/widget-css-classes.class.php:238
152
+ msgid "widget-even"
153
+ msgstr "widget-aj"
154
+
155
+ #: ../includes/widget-css-classes.class.php:239
156
+ msgid "widget-odd"
157
+ msgstr "widget-odd"
158
+
159
+ #~ msgid "Define Classes for Dropdown"
160
+ #~ msgstr "Definovať triedy pre rozbaľovací zoznam"
161
+
162
+ #~ msgid "Dropdown"
163
+ #~ msgstr "Rozbaľovací zoznam"
164
+
165
+ #~ msgid "Select"
166
+ #~ msgstr "Vyberte"
languages/widget-css-classes-sr_RS.po CHANGED
@@ -1,166 +1,166 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Widget CSS Classes\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2016-01-13 14:41+0100\n"
6
- "PO-Revision-Date: 2016-01-13 14:44+0100\n"
7
- "Last-Translator: Borisa Djuraskovic <borisad@webhostinghub.com>\n"
8
- "Language-Team: <cindy@cleverness.org>\n"
9
- "Language: sr_RS\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n"
14
- "X-Poedit-Basepath: ./\n"
15
- "X-Generator: Poedit 1.6.10\n"
16
- "X-Poedit-SearchPath-0: ..\n"
17
-
18
- #: ../includes/widget-css-classes-library.class.php:31
19
- msgid "Settings"
20
- msgstr "Postavke"
21
-
22
- #: ../includes/widget-css-classes-library.class.php:45
23
- msgid "Version"
24
- msgstr "Verzija"
25
-
26
- #: ../includes/widget-css-classes-library.class.php:46
27
- msgid "Donate"
28
- msgstr "Donirati"
29
-
30
- #: ../includes/widget-css-classes-loader.class.php:40
31
- #: ../widget-css-classes.php:55
32
- msgid ""
33
- "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
34
- "wordpress.org/Upgrading_WordPress\">Please update.</a>"
35
- msgstr ""
36
- "Widget CSS Classes potrebno WordPress 3.3 ili noviji. <a href=\"http://codex."
37
- "wordpress.org/Upgrading_WordPress\">Prosze zaktualizovać.</a>"
38
-
39
- #: ../includes/widget-css-classes-settings.class.php:39
40
- #: ../includes/widget-css-classes-settings.class.php:42
41
- msgid "Widget CSS Classes Settings"
42
- msgstr "Widget CSS Classes postavke"
43
-
44
- #: ../includes/widget-css-classes-settings.class.php:43
45
- msgid "Add Widget Number Classes"
46
- msgstr "Dodaj Widget Numbern klase"
47
-
48
- #: ../includes/widget-css-classes-settings.class.php:44
49
- msgid "Add First/Last Classes"
50
- msgstr "Dodaj prve/poslednje klase"
51
-
52
- #: ../includes/widget-css-classes-settings.class.php:45
53
- msgid "Add Even/Odd Classes"
54
- msgstr "Dodaj jednake/nejednake klase"
55
-
56
- #: ../includes/widget-css-classes-settings.class.php:46
57
- msgid "Show Additional Field for ID"
58
- msgstr "Prikaži dodatno polje za ID"
59
-
60
- #: ../includes/widget-css-classes-settings.class.php:47
61
- msgid "Class Field Type"
62
- msgstr "Tip polja klase"
63
-
64
- #: ../includes/widget-css-classes-settings.class.php:48
65
- msgid "Predefined Classes"
66
- msgstr "Unapred definisane klase"
67
-
68
- #: ../includes/widget-css-classes-settings.class.php:53
69
- #: ../includes/widget-css-classes-settings.class.php:60
70
- #: ../includes/widget-css-classes-settings.class.php:67
71
- #: ../includes/widget-css-classes-settings.class.php:74
72
- msgid "Yes"
73
- msgstr "Da"
74
-
75
- #: ../includes/widget-css-classes-settings.class.php:54
76
- #: ../includes/widget-css-classes-settings.class.php:61
77
- #: ../includes/widget-css-classes-settings.class.php:68
78
- #: ../includes/widget-css-classes-settings.class.php:75
79
- msgid "No"
80
- msgstr "Ne"
81
-
82
- #: ../includes/widget-css-classes-settings.class.php:81
83
- msgid "Text"
84
- msgstr "Tekst"
85
-
86
- #: ../includes/widget-css-classes-settings.class.php:82
87
- msgid "Predefined"
88
- msgstr "Predefinisane"
89
-
90
- #: ../includes/widget-css-classes-settings.class.php:83
91
- msgid "Both"
92
- msgstr "Oboje"
93
-
94
- #: ../includes/widget-css-classes-settings.class.php:84
95
- msgid "Hide"
96
- msgstr "Sakriti"
97
-
98
- #: ../includes/widget-css-classes-settings.class.php:116
99
- msgid "Import/Export"
100
- msgstr "Import/Export"
101
-
102
- #: ../includes/widget-css-classes-settings.class.php:121
103
- msgid "Settings Imported"
104
- msgstr "Postavke unete"
105
-
106
- #: ../includes/widget-css-classes-settings.class.php:124
107
- msgid "Invalid Settings File"
108
- msgstr "Fajl sa nepostojećim postavke"
109
-
110
- #: ../includes/widget-css-classes-settings.class.php:127
111
- msgid "No Settings File Selected"
112
- msgstr "Polje bez postavki izabrano"
113
-
114
- #: ../includes/widget-css-classes-settings.class.php:202
115
- msgid "Widget CSS Classes"
116
- msgstr "Widget CSS klase"
117
-
118
- #: ../includes/widget-css-classes-settings.class.php:247
119
- msgid "Import/Export Settings"
120
- msgstr "Import/Export postavke"
121
-
122
- #: ../includes/widget-css-classes-settings.class.php:249
123
- msgid "Export Settings"
124
- msgstr "Export postavke"
125
-
126
- #: ../includes/widget-css-classes-settings.class.php:253
127
- msgid "Import Settings"
128
- msgstr "Import postavke"
129
-
130
- #: ../includes/widget-css-classes.class.php:38
131
- msgid "CSS ID"
132
- msgstr "CSS ID"
133
-
134
- #: ../includes/widget-css-classes.class.php:44
135
- #: ../includes/widget-css-classes.class.php:66
136
- msgid "CSS Classes"
137
- msgstr "CSS klasa"
138
-
139
- #: ../includes/widget-css-classes.class.php:223
140
- msgid "widget-"
141
- msgstr "widget-"
142
-
143
- #: ../includes/widget-css-classes.class.php:227
144
- msgid "widget-first"
145
- msgstr "widget-prvi"
146
-
147
- #: ../includes/widget-css-classes.class.php:228
148
- msgid "widget-last"
149
- msgstr "widget-poslednji"
150
-
151
- #: ../includes/widget-css-classes.class.php:238
152
- msgid "widget-even"
153
- msgstr "widget-jednako"
154
-
155
- #: ../includes/widget-css-classes.class.php:239
156
- msgid "widget-odd"
157
- msgstr "widget-nejednako"
158
-
159
- #~ msgid "Define Classes for Dropdown"
160
- #~ msgstr "Definisati klase za Dropdown"
161
-
162
- #~ msgid "Dropdown"
163
- #~ msgstr "Dropdown"
164
-
165
- #~ msgid "Select"
166
- #~ msgstr "Izaberi"
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Widget CSS Classes\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2016-01-13 14:41+0100\n"
6
+ "PO-Revision-Date: 2016-01-13 14:44+0100\n"
7
+ "Last-Translator: Borisa Djuraskovic <borisad@webhostinghub.com>\n"
8
+ "Language-Team: <cindy@cleverness.org>\n"
9
+ "Language: sr_RS\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n"
14
+ "X-Poedit-Basepath: ./\n"
15
+ "X-Generator: Poedit 1.6.10\n"
16
+ "X-Poedit-SearchPath-0: ..\n"
17
+
18
+ #: ../includes/widget-css-classes-library.class.php:31
19
+ msgid "Settings"
20
+ msgstr "Postavke"
21
+
22
+ #: ../includes/widget-css-classes-library.class.php:45
23
+ msgid "Version"
24
+ msgstr "Verzija"
25
+
26
+ #: ../includes/widget-css-classes-library.class.php:46
27
+ msgid "Donate"
28
+ msgstr "Donirati"
29
+
30
+ #: ../includes/widget-css-classes-loader.class.php:40
31
+ #: ../widget-css-classes.php:55
32
+ msgid ""
33
+ "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
34
+ "wordpress.org/Upgrading_WordPress\">Please update.</a>"
35
+ msgstr ""
36
+ "Widget CSS Classes potrebno WordPress 3.3 ili noviji. <a href=\"http://codex."
37
+ "wordpress.org/Upgrading_WordPress\">Prosze zaktualizovać.</a>"
38
+
39
+ #: ../includes/widget-css-classes-settings.class.php:39
40
+ #: ../includes/widget-css-classes-settings.class.php:42
41
+ msgid "Widget CSS Classes Settings"
42
+ msgstr "Widget CSS Classes postavke"
43
+
44
+ #: ../includes/widget-css-classes-settings.class.php:43
45
+ msgid "Add Widget Number Classes"
46
+ msgstr "Dodaj Widget Numbern klase"
47
+
48
+ #: ../includes/widget-css-classes-settings.class.php:44
49
+ msgid "Add First/Last Classes"
50
+ msgstr "Dodaj prve/poslednje klase"
51
+
52
+ #: ../includes/widget-css-classes-settings.class.php:45
53
+ msgid "Add Even/Odd Classes"
54
+ msgstr "Dodaj jednake/nejednake klase"
55
+
56
+ #: ../includes/widget-css-classes-settings.class.php:46
57
+ msgid "Show Additional Field for ID"
58
+ msgstr "Prikaži dodatno polje za ID"
59
+
60
+ #: ../includes/widget-css-classes-settings.class.php:47
61
+ msgid "Class Field Type"
62
+ msgstr "Tip polja klase"
63
+
64
+ #: ../includes/widget-css-classes-settings.class.php:48
65
+ msgid "Predefined Classes"
66
+ msgstr "Unapred definisane klase"
67
+
68
+ #: ../includes/widget-css-classes-settings.class.php:53
69
+ #: ../includes/widget-css-classes-settings.class.php:60
70
+ #: ../includes/widget-css-classes-settings.class.php:67
71
+ #: ../includes/widget-css-classes-settings.class.php:74
72
+ msgid "Yes"
73
+ msgstr "Da"
74
+
75
+ #: ../includes/widget-css-classes-settings.class.php:54
76
+ #: ../includes/widget-css-classes-settings.class.php:61
77
+ #: ../includes/widget-css-classes-settings.class.php:68
78
+ #: ../includes/widget-css-classes-settings.class.php:75
79
+ msgid "No"
80
+ msgstr "Ne"
81
+
82
+ #: ../includes/widget-css-classes-settings.class.php:81
83
+ msgid "Text"
84
+ msgstr "Tekst"
85
+
86
+ #: ../includes/widget-css-classes-settings.class.php:82
87
+ msgid "Predefined"
88
+ msgstr "Predefinisane"
89
+
90
+ #: ../includes/widget-css-classes-settings.class.php:83
91
+ msgid "Both"
92
+ msgstr "Oboje"
93
+
94
+ #: ../includes/widget-css-classes-settings.class.php:84
95
+ msgid "Hide"
96
+ msgstr "Sakriti"
97
+
98
+ #: ../includes/widget-css-classes-settings.class.php:116
99
+ msgid "Import/Export"
100
+ msgstr "Import/Export"
101
+
102
+ #: ../includes/widget-css-classes-settings.class.php:121
103
+ msgid "Settings Imported"
104
+ msgstr "Postavke unete"
105
+
106
+ #: ../includes/widget-css-classes-settings.class.php:124
107
+ msgid "Invalid Settings File"
108
+ msgstr "Fajl sa nepostojećim postavke"
109
+
110
+ #: ../includes/widget-css-classes-settings.class.php:127
111
+ msgid "No Settings File Selected"
112
+ msgstr "Polje bez postavki izabrano"
113
+
114
+ #: ../includes/widget-css-classes-settings.class.php:202
115
+ msgid "Widget CSS Classes"
116
+ msgstr "Widget CSS klase"
117
+
118
+ #: ../includes/widget-css-classes-settings.class.php:247
119
+ msgid "Import/Export Settings"
120
+ msgstr "Import/Export postavke"
121
+
122
+ #: ../includes/widget-css-classes-settings.class.php:249
123
+ msgid "Export Settings"
124
+ msgstr "Export postavke"
125
+
126
+ #: ../includes/widget-css-classes-settings.class.php:253
127
+ msgid "Import Settings"
128
+ msgstr "Import postavke"
129
+
130
+ #: ../includes/widget-css-classes.class.php:38
131
+ msgid "CSS ID"
132
+ msgstr "CSS ID"
133
+
134
+ #: ../includes/widget-css-classes.class.php:44
135
+ #: ../includes/widget-css-classes.class.php:66
136
+ msgid "CSS Classes"
137
+ msgstr "CSS klasa"
138
+
139
+ #: ../includes/widget-css-classes.class.php:223
140
+ msgid "widget-"
141
+ msgstr "widget-"
142
+
143
+ #: ../includes/widget-css-classes.class.php:227
144
+ msgid "widget-first"
145
+ msgstr "widget-prvi"
146
+
147
+ #: ../includes/widget-css-classes.class.php:228
148
+ msgid "widget-last"
149
+ msgstr "widget-poslednji"
150
+
151
+ #: ../includes/widget-css-classes.class.php:238
152
+ msgid "widget-even"
153
+ msgstr "widget-jednako"
154
+
155
+ #: ../includes/widget-css-classes.class.php:239
156
+ msgid "widget-odd"
157
+ msgstr "widget-nejednako"
158
+
159
+ #~ msgid "Define Classes for Dropdown"
160
+ #~ msgstr "Definisati klase za Dropdown"
161
+
162
+ #~ msgid "Dropdown"
163
+ #~ msgstr "Dropdown"
164
+
165
+ #~ msgid "Select"
166
+ #~ msgstr "Izaberi"
languages/widget-css-classes-sv_SE.po CHANGED
@@ -1,166 +1,166 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Widget CSS Classes\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2016-01-13 15:08+0100\n"
6
- "PO-Revision-Date: 2016-01-13 15:57+0100\n"
7
- "Last-Translator: Borisa Djuraskovic <borisad@webhostinghub.com>\n"
8
- "Language-Team: <cindy@cleverness.org>\n"
9
- "Language: sv_SE\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n"
14
- "X-Poedit-Basepath: ./\n"
15
- "X-Generator: Poedit 1.6.10\n"
16
- "X-Poedit-SearchPath-0: ..\n"
17
-
18
- #: ../includes/widget-css-classes-library.class.php:31
19
- msgid "Settings"
20
- msgstr "Inställningar"
21
-
22
- #: ../includes/widget-css-classes-library.class.php:45
23
- msgid "Version"
24
- msgstr "Version"
25
-
26
- #: ../includes/widget-css-classes-library.class.php:46
27
- msgid "Donate"
28
- msgstr "Donera"
29
-
30
- #: ../includes/widget-css-classes-loader.class.php:40
31
- #: ../widget-css-classes.php:55
32
- msgid ""
33
- "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
34
- "wordpress.org/Upgrading_WordPress\">Please update.</a>"
35
- msgstr ""
36
- "Widget CSS Classes kräver WordPress 3.3 eller nyare. <a href=\"http://codex."
37
- "wordpress.org/Upgrading_WordPress\">Var vänlig uppdatera.</a>"
38
-
39
- #: ../includes/widget-css-classes-settings.class.php:39
40
- #: ../includes/widget-css-classes-settings.class.php:42
41
- msgid "Widget CSS Classes Settings"
42
- msgstr "Widget CSS Classes inställningar"
43
-
44
- #: ../includes/widget-css-classes-settings.class.php:43
45
- msgid "Add Widget Number Classes"
46
- msgstr "Lägg till widget nummer klass"
47
-
48
- #: ../includes/widget-css-classes-settings.class.php:44
49
- msgid "Add First/Last Classes"
50
- msgstr "Lägg till första/sista klass"
51
-
52
- #: ../includes/widget-css-classes-settings.class.php:45
53
- msgid "Add Even/Odd Classes"
54
- msgstr "Lägg till udda/jämn klass"
55
-
56
- #: ../includes/widget-css-classes-settings.class.php:46
57
- msgid "Show Additional Field for ID"
58
- msgstr "Visa övriga fält för ID"
59
-
60
- #: ../includes/widget-css-classes-settings.class.php:47
61
- msgid "Class Field Type"
62
- msgstr "Klass fälttyp"
63
-
64
- #: ../includes/widget-css-classes-settings.class.php:48
65
- msgid "Predefined Classes"
66
- msgstr "Fördefinierade klasser"
67
-
68
- #: ../includes/widget-css-classes-settings.class.php:53
69
- #: ../includes/widget-css-classes-settings.class.php:60
70
- #: ../includes/widget-css-classes-settings.class.php:67
71
- #: ../includes/widget-css-classes-settings.class.php:74
72
- msgid "Yes"
73
- msgstr "Ja"
74
-
75
- #: ../includes/widget-css-classes-settings.class.php:54
76
- #: ../includes/widget-css-classes-settings.class.php:61
77
- #: ../includes/widget-css-classes-settings.class.php:68
78
- #: ../includes/widget-css-classes-settings.class.php:75
79
- msgid "No"
80
- msgstr "Nej"
81
-
82
- #: ../includes/widget-css-classes-settings.class.php:81
83
- msgid "Text"
84
- msgstr "Text"
85
-
86
- #: ../includes/widget-css-classes-settings.class.php:82
87
- msgid "Predefined"
88
- msgstr "Fördefinierad"
89
-
90
- #: ../includes/widget-css-classes-settings.class.php:83
91
- msgid "Both"
92
- msgstr "Båda"
93
-
94
- #: ../includes/widget-css-classes-settings.class.php:84
95
- msgid "Hide"
96
- msgstr "Göm"
97
-
98
- #: ../includes/widget-css-classes-settings.class.php:116
99
- msgid "Import/Export"
100
- msgstr "Importera/Exportera"
101
-
102
- #: ../includes/widget-css-classes-settings.class.php:121
103
- msgid "Settings Imported"
104
- msgstr "Inställningar importerade"
105
-
106
- #: ../includes/widget-css-classes-settings.class.php:124
107
- msgid "Invalid Settings File"
108
- msgstr "Ogiltig inställningsfil"
109
-
110
- #: ../includes/widget-css-classes-settings.class.php:127
111
- msgid "No Settings File Selected"
112
- msgstr "Ingen inställningsfil vald"
113
-
114
- #: ../includes/widget-css-classes-settings.class.php:202
115
- msgid "Widget CSS Classes"
116
- msgstr "Widget CSS Classes"
117
-
118
- #: ../includes/widget-css-classes-settings.class.php:247
119
- msgid "Import/Export Settings"
120
- msgstr "Importera/Exportera inställningar"
121
-
122
- #: ../includes/widget-css-classes-settings.class.php:249
123
- msgid "Export Settings"
124
- msgstr "Export inställningar"
125
-
126
- #: ../includes/widget-css-classes-settings.class.php:253
127
- msgid "Import Settings"
128
- msgstr "Import inställningar"
129
-
130
- #: ../includes/widget-css-classes.class.php:38
131
- msgid "CSS ID"
132
- msgstr "CSS ID"
133
-
134
- #: ../includes/widget-css-classes.class.php:44
135
- #: ../includes/widget-css-classes.class.php:66
136
- msgid "CSS Classes"
137
- msgstr "CSS klasser"
138
-
139
- #: ../includes/widget-css-classes.class.php:223
140
- msgid "widget-"
141
- msgstr "widget-"
142
-
143
- #: ../includes/widget-css-classes.class.php:227
144
- msgid "widget-first"
145
- msgstr "widget-first"
146
-
147
- #: ../includes/widget-css-classes.class.php:228
148
- msgid "widget-last"
149
- msgstr "widget-last"
150
-
151
- #: ../includes/widget-css-classes.class.php:238
152
- msgid "widget-even"
153
- msgstr "widget-even"
154
-
155
- #: ../includes/widget-css-classes.class.php:239
156
- msgid "widget-odd"
157
- msgstr "widget-odd"
158
-
159
- #~ msgid "Select"
160
- #~ msgstr "Välj"
161
-
162
- #~ msgid "Define Classes for Dropdown"
163
- #~ msgstr "Definiera klass för rullgardinsmeny"
164
-
165
- #~ msgid "Dropdown"
166
- #~ msgstr "Rullgardinsmeny"
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Widget CSS Classes\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2016-01-13 15:08+0100\n"
6
+ "PO-Revision-Date: 2016-01-13 15:57+0100\n"
7
+ "Last-Translator: Borisa Djuraskovic <borisad@webhostinghub.com>\n"
8
+ "Language-Team: <cindy@cleverness.org>\n"
9
+ "Language: sv_SE\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n"
14
+ "X-Poedit-Basepath: ./\n"
15
+ "X-Generator: Poedit 1.6.10\n"
16
+ "X-Poedit-SearchPath-0: ..\n"
17
+
18
+ #: ../includes/widget-css-classes-library.class.php:31
19
+ msgid "Settings"
20
+ msgstr "Inställningar"
21
+
22
+ #: ../includes/widget-css-classes-library.class.php:45
23
+ msgid "Version"
24
+ msgstr "Version"
25
+
26
+ #: ../includes/widget-css-classes-library.class.php:46
27
+ msgid "Donate"
28
+ msgstr "Donera"
29
+
30
+ #: ../includes/widget-css-classes-loader.class.php:40
31
+ #: ../widget-css-classes.php:55
32
+ msgid ""
33
+ "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
34
+ "wordpress.org/Upgrading_WordPress\">Please update.</a>"
35
+ msgstr ""
36
+ "Widget CSS Classes kräver WordPress 3.3 eller nyare. <a href=\"http://codex."
37
+ "wordpress.org/Upgrading_WordPress\">Var vänlig uppdatera.</a>"
38
+
39
+ #: ../includes/widget-css-classes-settings.class.php:39
40
+ #: ../includes/widget-css-classes-settings.class.php:42
41
+ msgid "Widget CSS Classes Settings"
42
+ msgstr "Widget CSS Classes inställningar"
43
+
44
+ #: ../includes/widget-css-classes-settings.class.php:43
45
+ msgid "Add Widget Number Classes"
46
+ msgstr "Lägg till widget nummer klass"
47
+
48
+ #: ../includes/widget-css-classes-settings.class.php:44
49
+ msgid "Add First/Last Classes"
50
+ msgstr "Lägg till första/sista klass"
51
+
52
+ #: ../includes/widget-css-classes-settings.class.php:45
53
+ msgid "Add Even/Odd Classes"
54
+ msgstr "Lägg till udda/jämn klass"
55
+
56
+ #: ../includes/widget-css-classes-settings.class.php:46
57
+ msgid "Show Additional Field for ID"
58
+ msgstr "Visa övriga fält för ID"
59
+
60
+ #: ../includes/widget-css-classes-settings.class.php:47
61
+ msgid "Class Field Type"
62
+ msgstr "Klass fälttyp"
63
+
64
+ #: ../includes/widget-css-classes-settings.class.php:48
65
+ msgid "Predefined Classes"
66
+ msgstr "Fördefinierade klasser"
67
+
68
+ #: ../includes/widget-css-classes-settings.class.php:53
69
+ #: ../includes/widget-css-classes-settings.class.php:60
70
+ #: ../includes/widget-css-classes-settings.class.php:67
71
+ #: ../includes/widget-css-classes-settings.class.php:74
72
+ msgid "Yes"
73
+ msgstr "Ja"
74
+
75
+ #: ../includes/widget-css-classes-settings.class.php:54
76
+ #: ../includes/widget-css-classes-settings.class.php:61
77
+ #: ../includes/widget-css-classes-settings.class.php:68
78
+ #: ../includes/widget-css-classes-settings.class.php:75
79
+ msgid "No"
80
+ msgstr "Nej"
81
+
82
+ #: ../includes/widget-css-classes-settings.class.php:81
83
+ msgid "Text"
84
+ msgstr "Text"
85
+
86
+ #: ../includes/widget-css-classes-settings.class.php:82
87
+ msgid "Predefined"
88
+ msgstr "Fördefinierad"
89
+
90
+ #: ../includes/widget-css-classes-settings.class.php:83
91
+ msgid "Both"
92
+ msgstr "Båda"
93
+
94
+ #: ../includes/widget-css-classes-settings.class.php:84
95
+ msgid "Hide"
96
+ msgstr "Göm"
97
+
98
+ #: ../includes/widget-css-classes-settings.class.php:116
99
+ msgid "Import/Export"
100
+ msgstr "Importera/Exportera"
101
+
102
+ #: ../includes/widget-css-classes-settings.class.php:121
103
+ msgid "Settings Imported"
104
+ msgstr "Inställningar importerade"
105
+
106
+ #: ../includes/widget-css-classes-settings.class.php:124
107
+ msgid "Invalid Settings File"
108
+ msgstr "Ogiltig inställningsfil"
109
+
110
+ #: ../includes/widget-css-classes-settings.class.php:127
111
+ msgid "No Settings File Selected"
112
+ msgstr "Ingen inställningsfil vald"
113
+
114
+ #: ../includes/widget-css-classes-settings.class.php:202
115
+ msgid "Widget CSS Classes"
116
+ msgstr "Widget CSS Classes"
117
+
118
+ #: ../includes/widget-css-classes-settings.class.php:247
119
+ msgid "Import/Export Settings"
120
+ msgstr "Importera/Exportera inställningar"
121
+
122
+ #: ../includes/widget-css-classes-settings.class.php:249
123
+ msgid "Export Settings"
124
+ msgstr "Export inställningar"
125
+
126
+ #: ../includes/widget-css-classes-settings.class.php:253
127
+ msgid "Import Settings"
128
+ msgstr "Import inställningar"
129
+
130
+ #: ../includes/widget-css-classes.class.php:38
131
+ msgid "CSS ID"
132
+ msgstr "CSS ID"
133
+
134
+ #: ../includes/widget-css-classes.class.php:44
135
+ #: ../includes/widget-css-classes.class.php:66
136
+ msgid "CSS Classes"
137
+ msgstr "CSS klasser"
138
+
139
+ #: ../includes/widget-css-classes.class.php:223
140
+ msgid "widget-"
141
+ msgstr "widget-"
142
+
143
+ #: ../includes/widget-css-classes.class.php:227
144
+ msgid "widget-first"
145
+ msgstr "widget-first"
146
+
147
+ #: ../includes/widget-css-classes.class.php:228
148
+ msgid "widget-last"
149
+ msgstr "widget-last"
150
+
151
+ #: ../includes/widget-css-classes.class.php:238
152
+ msgid "widget-even"
153
+ msgstr "widget-even"
154
+
155
+ #: ../includes/widget-css-classes.class.php:239
156
+ msgid "widget-odd"
157
+ msgstr "widget-odd"
158
+
159
+ #~ msgid "Select"
160
+ #~ msgstr "Välj"
161
+
162
+ #~ msgid "Define Classes for Dropdown"
163
+ #~ msgstr "Definiera klass för rullgardinsmeny"
164
+
165
+ #~ msgid "Dropdown"
166
+ #~ msgstr "Rullgardinsmeny"
languages/widget-css-classes.pot CHANGED
@@ -1,154 +1,154 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Widget CSS Classes\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-12-22 23:40+0100\n"
6
- "PO-Revision-Date: 2015-12-22 23:40+0100\n"
7
- "Last-Translator: C.M. Kendrick <cindy@cleverness.org>\n"
8
- "Language-Team: <cindy@cleverness.org>\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n"
13
- "X-Poedit-Basepath: ./\n"
14
- "X-Generator: Poedit 1.6.10\n"
15
- "X-Poedit-SearchPath-0: ..\n"
16
-
17
- #: ../includes/widget-css-classes-library.class.php:31
18
- msgid "Settings"
19
- msgstr ""
20
-
21
- #: ../includes/widget-css-classes-library.class.php:45
22
- msgid "Version"
23
- msgstr ""
24
-
25
- #: ../includes/widget-css-classes-library.class.php:46
26
- msgid "Donate"
27
- msgstr ""
28
-
29
- #: ../includes/widget-css-classes-loader.class.php:40
30
- #: ../widget-css-classes.php:55
31
- msgid ""
32
- "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
33
- "wordpress.org/Upgrading_WordPress\">Please update.</a>"
34
- msgstr ""
35
-
36
- #: ../includes/widget-css-classes-settings.class.php:39
37
- #: ../includes/widget-css-classes-settings.class.php:42
38
- msgid "Widget CSS Classes Settings"
39
- msgstr ""
40
-
41
- #: ../includes/widget-css-classes-settings.class.php:43
42
- msgid "Add Widget Number Classes"
43
- msgstr ""
44
-
45
- #: ../includes/widget-css-classes-settings.class.php:44
46
- msgid "Add First/Last Classes"
47
- msgstr ""
48
-
49
- #: ../includes/widget-css-classes-settings.class.php:45
50
- msgid "Add Even/Odd Classes"
51
- msgstr ""
52
-
53
- #: ../includes/widget-css-classes-settings.class.php:46
54
- msgid "Show Additional Field for ID"
55
- msgstr ""
56
-
57
- #: ../includes/widget-css-classes-settings.class.php:47
58
- msgid "Class Field Type"
59
- msgstr ""
60
-
61
- #: ../includes/widget-css-classes-settings.class.php:48
62
- msgid "Predefined Classes"
63
- msgstr ""
64
-
65
- #: ../includes/widget-css-classes-settings.class.php:53
66
- #: ../includes/widget-css-classes-settings.class.php:60
67
- #: ../includes/widget-css-classes-settings.class.php:67
68
- #: ../includes/widget-css-classes-settings.class.php:74
69
- msgid "Yes"
70
- msgstr ""
71
-
72
- #: ../includes/widget-css-classes-settings.class.php:54
73
- #: ../includes/widget-css-classes-settings.class.php:61
74
- #: ../includes/widget-css-classes-settings.class.php:68
75
- #: ../includes/widget-css-classes-settings.class.php:75
76
- msgid "No"
77
- msgstr ""
78
-
79
- #: ../includes/widget-css-classes-settings.class.php:81
80
- msgid "Text"
81
- msgstr ""
82
-
83
- #: ../includes/widget-css-classes-settings.class.php:82
84
- msgid "Predefined"
85
- msgstr ""
86
-
87
- #: ../includes/widget-css-classes-settings.class.php:83
88
- msgid "Both"
89
- msgstr ""
90
-
91
- #: ../includes/widget-css-classes-settings.class.php:84
92
- msgid "Hide"
93
- msgstr ""
94
-
95
- #: ../includes/widget-css-classes-settings.class.php:116
96
- msgid "Import/Export"
97
- msgstr ""
98
-
99
- #: ../includes/widget-css-classes-settings.class.php:121
100
- msgid "Settings Imported"
101
- msgstr ""
102
-
103
- #: ../includes/widget-css-classes-settings.class.php:124
104
- msgid "Invalid Settings File"
105
- msgstr ""
106
-
107
- #: ../includes/widget-css-classes-settings.class.php:127
108
- msgid "No Settings File Selected"
109
- msgstr ""
110
-
111
- #: ../includes/widget-css-classes-settings.class.php:198
112
- msgid "Widget CSS Classes"
113
- msgstr ""
114
-
115
- #: ../includes/widget-css-classes-settings.class.php:243
116
- msgid "Import/Export Settings"
117
- msgstr ""
118
-
119
- #: ../includes/widget-css-classes-settings.class.php:245
120
- msgid "Export Settings"
121
- msgstr ""
122
-
123
- #: ../includes/widget-css-classes-settings.class.php:249
124
- msgid "Import Settings"
125
- msgstr ""
126
-
127
- #: ../includes/widget-css-classes.class.php:38
128
- msgid "CSS ID"
129
- msgstr ""
130
-
131
- #: ../includes/widget-css-classes.class.php:44
132
- #: ../includes/widget-css-classes.class.php:51
133
- msgid "CSS Classes"
134
- msgstr ""
135
-
136
- #: ../includes/widget-css-classes.class.php:191
137
- msgid "widget-"
138
- msgstr ""
139
-
140
- #: ../includes/widget-css-classes.class.php:195
141
- msgid "widget-first"
142
- msgstr ""
143
-
144
- #: ../includes/widget-css-classes.class.php:196
145
- msgid "widget-last"
146
- msgstr ""
147
-
148
- #: ../includes/widget-css-classes.class.php:206
149
- msgid "widget-even"
150
- msgstr ""
151
-
152
- #: ../includes/widget-css-classes.class.php:207
153
- msgid "widget-odd"
154
- msgstr ""
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Widget CSS Classes\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-12-22 23:40+0100\n"
6
+ "PO-Revision-Date: 2015-12-22 23:40+0100\n"
7
+ "Last-Translator: C.M. Kendrick <cindy@cleverness.org>\n"
8
+ "Language-Team: <cindy@cleverness.org>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n"
13
+ "X-Poedit-Basepath: ./\n"
14
+ "X-Generator: Poedit 1.6.10\n"
15
+ "X-Poedit-SearchPath-0: ..\n"
16
+
17
+ #: ../includes/widget-css-classes-library.class.php:31
18
+ msgid "Settings"
19
+ msgstr ""
20
+
21
+ #: ../includes/widget-css-classes-library.class.php:45
22
+ msgid "Version"
23
+ msgstr ""
24
+
25
+ #: ../includes/widget-css-classes-library.class.php:46
26
+ msgid "Donate"
27
+ msgstr ""
28
+
29
+ #: ../includes/widget-css-classes-loader.class.php:40
30
+ #: ../widget-css-classes.php:55
31
+ msgid ""
32
+ "Widget CSS Classes requires WordPress 3.3 or newer. <a href=\"http://codex."
33
+ "wordpress.org/Upgrading_WordPress\">Please update.</a>"
34
+ msgstr ""
35
+
36
+ #: ../includes/widget-css-classes-settings.class.php:39
37
+ #: ../includes/widget-css-classes-settings.class.php:42
38
+ msgid "Widget CSS Classes Settings"
39
+ msgstr ""
40
+
41
+ #: ../includes/widget-css-classes-settings.class.php:43
42
+ msgid "Add Widget Number Classes"
43
+ msgstr ""
44
+
45
+ #: ../includes/widget-css-classes-settings.class.php:44
46
+ msgid "Add First/Last Classes"
47
+ msgstr ""
48
+
49
+ #: ../includes/widget-css-classes-settings.class.php:45
50
+ msgid "Add Even/Odd Classes"
51
+ msgstr ""
52
+
53
+ #: ../includes/widget-css-classes-settings.class.php:46
54
+ msgid "Show Additional Field for ID"
55
+ msgstr ""
56
+
57
+ #: ../includes/widget-css-classes-settings.class.php:47
58
+ msgid "Class Field Type"
59
+ msgstr ""
60
+
61
+ #: ../includes/widget-css-classes-settings.class.php:48
62
+ msgid "Predefined Classes"
63
+ msgstr ""
64
+
65
+ #: ../includes/widget-css-classes-settings.class.php:53
66
+ #: ../includes/widget-css-classes-settings.class.php:60
67
+ #: ../includes/widget-css-classes-settings.class.php:67
68
+ #: ../includes/widget-css-classes-settings.class.php:74
69
+ msgid "Yes"
70
+ msgstr ""
71
+
72
+ #: ../includes/widget-css-classes-settings.class.php:54
73
+ #: ../includes/widget-css-classes-settings.class.php:61
74
+ #: ../includes/widget-css-classes-settings.class.php:68
75
+ #: ../includes/widget-css-classes-settings.class.php:75
76
+ msgid "No"
77
+ msgstr ""
78
+
79
+ #: ../includes/widget-css-classes-settings.class.php:81
80
+ msgid "Text"
81
+ msgstr ""
82
+
83
+ #: ../includes/widget-css-classes-settings.class.php:82
84
+ msgid "Predefined"
85
+ msgstr ""
86
+
87
+ #: ../includes/widget-css-classes-settings.class.php:83
88
+ msgid "Both"
89
+ msgstr ""
90
+
91
+ #: ../includes/widget-css-classes-settings.class.php:84
92
+ msgid "Hide"
93
+ msgstr ""
94
+
95
+ #: ../includes/widget-css-classes-settings.class.php:116
96
+ msgid "Import/Export"
97
+ msgstr ""
98
+
99
+ #: ../includes/widget-css-classes-settings.class.php:121
100
+ msgid "Settings Imported"
101
+ msgstr ""
102
+
103
+ #: ../includes/widget-css-classes-settings.class.php:124
104
+ msgid "Invalid Settings File"
105
+ msgstr ""
106
+
107
+ #: ../includes/widget-css-classes-settings.class.php:127
108
+ msgid "No Settings File Selected"
109
+ msgstr ""
110
+
111
+ #: ../includes/widget-css-classes-settings.class.php:198
112
+ msgid "Widget CSS Classes"
113
+ msgstr ""
114
+
115
+ #: ../includes/widget-css-classes-settings.class.php:243
116
+ msgid "Import/Export Settings"
117
+ msgstr ""
118
+
119
+ #: ../includes/widget-css-classes-settings.class.php:245
120
+ msgid "Export Settings"
121
+ msgstr ""
122
+
123
+ #: ../includes/widget-css-classes-settings.class.php:249
124
+ msgid "Import Settings"
125
+ msgstr ""
126
+
127
+ #: ../includes/widget-css-classes.class.php:38
128
+ msgid "CSS ID"
129
+ msgstr ""
130
+
131
+ #: ../includes/widget-css-classes.class.php:44
132
+ #: ../includes/widget-css-classes.class.php:51
133
+ msgid "CSS Classes"
134
+ msgstr ""
135
+
136
+ #: ../includes/widget-css-classes.class.php:191
137
+ msgid "widget-"
138
+ msgstr ""
139
+
140
+ #: ../includes/widget-css-classes.class.php:195
141
+ msgid "widget-first"
142
+ msgstr ""
143
+
144
+ #: ../includes/widget-css-classes.class.php:196
145
+ msgid "widget-last"
146
+ msgstr ""
147
+
148
+ #: ../includes/widget-css-classes.class.php:206
149
+ msgid "widget-even"
150
+ msgstr ""
151
+
152
+ #: ../includes/widget-css-classes.class.php:207
153
+ msgid "widget-odd"
154
+ msgstr ""
readme.txt CHANGED
@@ -1,5 +1,5 @@
1
  === Widget CSS Classes ===
2
- Contributors: elusivelight
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=cindy@cleverness.org
4
  Author URI: http://cleverness.org
5
  Plugin URI: http://cleverness.org/plugins/widget-css-classes
@@ -8,7 +8,7 @@ License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Requires at least: 3.3
10
  Tested up to: 4.8
11
- Stable tag: 1.4.0
12
 
13
  Add custom classes and ids plus first, last, even, odd, and numbered classes to your widgets.
14
 
@@ -94,6 +94,28 @@ Visit [the plugin website](http://cleverness.org/plugins/widget-css-classes/) an
94
 
95
  == Changelog ==
96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  = 1.4.0 =
98
  * Feature: Sort Pre-defined classes (thanks Jory Hogeveen)
99
  * Security: Prevent unauthenticated import of settings
1
  === Widget CSS Classes ===
2
+ Contributors: elusivelight, keraweb
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=cindy@cleverness.org
4
  Author URI: http://cleverness.org
5
  Plugin URI: http://cleverness.org/plugins/widget-css-classes
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Requires at least: 3.3
10
  Tested up to: 4.8
11
+ Stable tag: 1.5.0
12
 
13
  Add custom classes and ids plus first, last, even, odd, and numbered classes to your widgets.
14
 
94
 
95
  == Changelog ==
96
 
97
+ = 1.5.0 =
98
+ * **Feature:** Option to try and fix the widget parameters if they are invalid. [#24](https://github.com/cleverness/widget-css-classes/issues/24)
99
+ * **Feature:** Option to remove duplicate classes. [#25](https://github.com/cleverness/widget-css-classes/issues/25)
100
+ * **Enhancement:** Sort classes based on the predefined classes on the frontend by default. [#19](https://github.com/cleverness/widget-css-classes/issues/19)
101
+ * **Enhancement:** Classes filter for frontend (for sorting or modifications). [#19](https://github.com/cleverness/widget-css-classes/issues/19)
102
+ - `widget_css_classes`: modify all classes added by this plugin.
103
+ - `widget_css_classes_custom`: modify custom input classes.
104
+ * **Enhancement:** Plugin settings filter (`widget_css_classes_set_settings`), overwrites user settings. [#16](https://github.com/cleverness/widget-css-classes/issues/16)
105
+ * **Enhancement:** Plugin default settings filter (`widget_css_classes_default_settings`). [#4](https://github.com/cleverness/widget-css-classes/issues/4)
106
+ * **Enhancement:** Capability filters for form fields. [#21](https://github.com/cleverness/widget-css-classes/issues/21)
107
+ - `widget_css_classes_id_input_capability`: ID input
108
+ - `widget_css_classes_class_input_capability`: classes input
109
+ - `widget_css_classes_class_select_capability`: predefined classes select (also hides classes input if invalid)
110
+ * **Compatibility:** WP External Links. [#17](https://github.com/cleverness/widget-css-classes/issues/17), thanks to Victor [@freelancephp](https://profiles.wordpress.org/freelancephp)
111
+ * **Fix:** Form wrapper div style. [#18](https://github.com/cleverness/widget-css-classes/issues/18), thanks to Chuck Reynolds [@ryno267](https://profiles.wordpress.org/ryno267)
112
+ * **Fix:** Enable sortable input selection (IE-11 fix). [#20](https://github.com/cleverness/widget-css-classes/issues/20)
113
+ * **UI:** Enhance setting page JavaScript and remove relCopy library dependency.
114
+ * **i18n:** Remove Dutch and Russian languages from plugin distribution (available on [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/widget-css-classes)). [#23](https://github.com/cleverness/widget-css-classes/issues/23)
115
+ * Started using TravisCI and CodeClimate. [#15](https://github.com/cleverness/widget-css-classes/issues/15)
116
+
117
+ Detailed info: [PR on GitHub](https://github.com/cleverness/widget-css-classes/pull/22)
118
+
119
  = 1.4.0 =
120
  * Feature: Sort Pre-defined classes (thanks Jory Hogeveen)
121
  * Security: Prevent unauthenticated import of settings
uninstall.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
- if ( !defined( 'WP_UNINSTALL_PLUGIN' ) )
3
- exit();
 
4
 
5
  if ( current_user_can( 'delete_plugins' ) ) {
6
 
@@ -8,4 +9,4 @@ if ( current_user_can( 'delete_plugins' ) ) {
8
  delete_option( 'WCSSC_options' );
9
  delete_option( 'WCSSC_db_version' );
10
 
11
- }
1
  <?php
2
+ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
3
+ die();
4
+ }
5
 
6
  if ( current_user_can( 'delete_plugins' ) ) {
7
 
9
  delete_option( 'WCSSC_options' );
10
  delete_option( 'WCSSC_db_version' );
11
 
12
+ }
widget-css-classes.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
- /*
3
- Plugin Name: Widget CSS Classes
4
- Version: 1.4.0
5
- Description: Add custom, first, last, even, odd, and numbered classes to your widgets.
6
- Author: C.M. Kendrick
7
- Author URI: http://cleverness.org
8
- Plugin URI: http://cleverness.org/plugins/widget-css-classes
9
- Text Domain: widget-css-classes
10
- */
11
 
12
  add_action( 'init', 'widget_css_classes_loader' );
13
  add_action( 'wp_loaded', 'widget_css_classes_frontend_hook' );
@@ -18,16 +18,20 @@ add_action( 'wp_loaded', 'widget_css_classes_frontend_hook' );
18
  */
19
  function widget_css_classes_loader() {
20
 
21
- $languages_path = plugin_basename( dirname( __FILE__ ).'/languages' );
22
- load_plugin_textdomain( 'widget-css-classes', FALSE, $languages_path );
 
 
 
 
23
 
24
  if ( is_admin() ) {
25
 
26
- if ( !defined( 'WCSSC_PLUGIN_VERSION' ) ) define( 'WCSSC_PLUGIN_VERSION', '1.2.8' );
27
- if ( !defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
28
- if ( !defined( 'WCSSC_BASENAME' ) ) define( 'WCSSC_BASENAME', plugin_basename( __FILE__ ) );
29
- if ( !defined( 'WCSSC_PLUGIN_DIR' ) ) define( 'WCSSC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
30
- if ( !defined( 'WCSSC_PLUGIN_URL' ) ) define( 'WCSSC_PLUGIN_URL', plugins_url( '', __FILE__ ) );
31
 
32
  include_once 'includes/widget-css-classes-loader.class.php';
33
  WCSSC_Loader::init();
@@ -40,7 +44,7 @@ function widget_css_classes_loader() {
40
  * It must be added after register_sidebars is called
41
  */
42
  function widget_css_classes_frontend_hook() {
43
- if ( !is_admin() ) {
44
  include_once 'includes/widget-css-classes.class.php';
45
  add_filter( 'dynamic_sidebar_params', array( 'WCSSC', 'add_widget_classes' ) );
46
  }
@@ -52,13 +56,18 @@ function widget_css_classes_frontend_hook() {
52
  function widget_css_classes_activation() {
53
  global $wp_version;
54
 
55
- $exit_msg = esc_html__( 'Widget CSS Classes requires WordPress 3.3 or newer. <a href="http://codex.wordpress.org/Upgrading_WordPress">Please update.</a>', 'widget-css-classes' );
56
- if ( version_compare( $wp_version, "3.3", "<" ) ) {
57
- exit( $exit_msg );
 
 
 
 
58
  }
59
 
60
- if ( !defined( 'WCSSC_DB_VERSION' ) ) define( 'WCSSC_DB_VERSION', '1.3' );
61
- if ( !defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
 
62
  include_once 'includes/widget-css-classes-library.class.php';
63
 
64
  if ( get_option( 'WCSSC_db_version' ) ) {
@@ -68,9 +77,23 @@ function widget_css_classes_activation() {
68
  }
69
 
70
  // if the installed version is not the same as the current version, run the install function
71
- if ( WCSSC_DB_VERSION != $installed_ver ) {
72
  WCSSC_Lib::install_plugin();
73
  }
74
  }
75
 
76
  register_activation_hook( __FILE__, 'widget_css_classes_activation' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
+ /**
3
+ * Plugin Name: Widget CSS Classes
4
+ * Version: 1.5.0
5
+ * Description: Add custom, first, last, even, odd, and numbered classes to your widgets.
6
+ * Author: C.M. Kendrick
7
+ * Author URI: http://cleverness.org
8
+ * Plugin URI: http://cleverness.org/plugins/widget-css-classes
9
+ * Text Domain: widget-css-classes
10
+ */
11
 
12
  add_action( 'init', 'widget_css_classes_loader' );
13
  add_action( 'wp_loaded', 'widget_css_classes_frontend_hook' );
18
  */
19
  function widget_css_classes_loader() {
20
 
21
+ $languages_path = plugin_basename( dirname( __FILE__ ) . '/languages' );
22
+ load_plugin_textdomain( 'widget-css-classes', false, $languages_path );
23
+
24
+ // Load plugin settings
25
+ include_once 'includes/widget-css-classes-library.class.php';
26
+ WCSSC_Lib::set_settings( get_option( WCSSC_Lib::$settings_key ) );
27
 
28
  if ( is_admin() ) {
29
 
30
+ if ( ! defined( 'WCSSC_PLUGIN_VERSION' ) ) define( 'WCSSC_PLUGIN_VERSION', '1.5.0' );
31
+ if ( ! defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
32
+ if ( ! defined( 'WCSSC_BASENAME' ) ) define( 'WCSSC_BASENAME', plugin_basename( __FILE__ ) );
33
+ if ( ! defined( 'WCSSC_PLUGIN_DIR' ) ) define( 'WCSSC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
34
+ if ( ! defined( 'WCSSC_PLUGIN_URL' ) ) define( 'WCSSC_PLUGIN_URL', plugins_url( '', __FILE__ ) );
35
 
36
  include_once 'includes/widget-css-classes-loader.class.php';
37
  WCSSC_Loader::init();
44
  * It must be added after register_sidebars is called
45
  */
46
  function widget_css_classes_frontend_hook() {
47
+ if ( ! is_admin() ) {
48
  include_once 'includes/widget-css-classes.class.php';
49
  add_filter( 'dynamic_sidebar_params', array( 'WCSSC', 'add_widget_classes' ) );
50
  }
56
  function widget_css_classes_activation() {
57
  global $wp_version;
58
 
59
+ if ( version_compare( $wp_version, '3.3', '<' ) ) {
60
+ // Add admin notice.
61
+ add_action( 'admin_notices', 'widget_css_classes_notice_wp_version' );
62
+ // Deactivate.
63
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
64
+ deactivate_plugins( plugin_basename( __FILE__ ) );
65
+ return;
66
  }
67
 
68
+ if ( ! defined( 'WCSSC_BASENAME' ) ) define( 'WCSSC_BASENAME', plugin_basename( __FILE__ ) );
69
+ if ( ! defined( 'WCSSC_DB_VERSION' ) ) define( 'WCSSC_DB_VERSION', '1.5' );
70
+ if ( ! defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
71
  include_once 'includes/widget-css-classes-library.class.php';
72
 
73
  if ( get_option( 'WCSSC_db_version' ) ) {
77
  }
78
 
79
  // if the installed version is not the same as the current version, run the install function
80
+ if ( (string) WCSSC_DB_VERSION !== (string) $installed_ver ) {
81
  WCSSC_Lib::install_plugin();
82
  }
83
  }
84
 
85
  register_activation_hook( __FILE__, 'widget_css_classes_activation' );
86
+
87
+ /**
88
+ * Wrong WP version admin notice.
89
+ */
90
+ function widget_css_classes_notice_wp_version() {
91
+ echo '<div class="notice notice-error is-dismissible"><p>';
92
+ echo sprintf(
93
+ // Translators: %1$s stands for the WP version and %2$s stands for "Please update" (a link).
94
+ esc_html__( 'Widget CSS Classes requires WordPress %1$s or newer. %2$s', 'widget-css-classes' ),
95
+ '3.3',
96
+ '<a target="_blank" href="http://codex.wordpress.org/Upgrading_WordPress">' . esc_html__( 'Please update', 'widget-css-classes' ) . '.</a>'
97
+ );
98
+ echo '</p></div>';
99
+ }