Version Description
- i18n: Remove sv_SE translation from the plugin directory. It's 95% on translate.wordpress.org and accepted as the better version. #23
- Documentation: Readme & Wiki. #31
- Compatibility: Tested with WordPress 4.9
Detailed info: PR on GitHub
Download this release
Release Info
Developer | keraweb |
Plugin | Widget CSS Classes |
Version | 1.5.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.5.2 to 1.5.2.1
- README.md +40 -6
- css/widget-css-classes.css +8 -0
- includes/widget-css-classes-library.class.php +1 -1
- includes/widget-css-classes-loader.class.php +1 -1
- includes/widget-css-classes-settings.class.php +10 -7
- includes/widget-css-classes.class.php +10 -6
- js/widget-css-classes.js +3 -3
- languages/widget-css-classes-sv_SE.mo +0 -0
- languages/widget-css-classes-sv_SE.po +0 -166
- readme.txt +32 -72
- widget-css-classes.php +3 -3
README.md
CHANGED
@@ -10,9 +10,43 @@ Add custom classes and ids plus first, last, even, odd, and numbered classes to
|
|
10 |
[![Travis](https://secure.travis-ci.org/cleverness/widget-css-classes.png?branch=master)](http://travis-ci.org/cleverness/widget-css-classes)
|
11 |
[![Code Climate](https://codeclimate.com/github/cleverness/widget-css-classes/badges/gpa.svg)](https://codeclimate.com/github/cleverness/widget-css-classes)
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
**
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
[![Travis](https://secure.travis-ci.org/cleverness/widget-css-classes.png?branch=master)](http://travis-ci.org/cleverness/widget-css-classes)
|
11 |
[![Code Climate](https://codeclimate.com/github/cleverness/widget-css-classes/badges/gpa.svg)](https://codeclimate.com/github/cleverness/widget-css-classes)
|
12 |
|
13 |
+
### Widget CSS Classes gives you the ability to add custom classes and ids to your WordPress widgets
|
14 |
+
|
15 |
+
_Please note that this plugin doesn't enable you to enter custom CSS. You'll need to edit your theme's style.css or add another plugin that allows you to input custom CSS._
|
16 |
+
|
17 |
+
**This plugin also adds additional classes to widgets to help you style them easier:**
|
18 |
+
|
19 |
+
* widget-first: added to the first widget in a sidebar
|
20 |
+
* widget-last: added to the last widget in a sidebar
|
21 |
+
* widget-odd: added to odd numbered widgets in a sidebar
|
22 |
+
* widget-even: added to even numbered widgets in a sidebar
|
23 |
+
* widget-#: added to every widget, such as widget-1, widget-2
|
24 |
+
|
25 |
+
## Features
|
26 |
+
|
27 |
+
* Adds a text field to a widget for defining a class
|
28 |
+
* You can specify multiple classes by putting a space between them
|
29 |
+
* Optionally adds checkboxes with predefined classes
|
30 |
+
* Optionally adds a text field to add an id to a widget
|
31 |
+
* Adds first and last classes to the first and last widget instances in a sidebar
|
32 |
+
* Adds even/odd classes to widgets
|
33 |
+
* Adds number classes to widgets
|
34 |
+
* Fully translatable
|
35 |
+
* Multi-site compatible
|
36 |
+
* Compatible with Widget Logic, Widget Context, and WP Page Widget plugins
|
37 |
+
* Has filters and hooks for customizing output including class names
|
38 |
+
|
39 |
+
## Installation
|
40 |
+
|
41 |
+
1. Upload the folder _/widget-css-classes/_ to the _/wp-content/plugins/_ directory
|
42 |
+
2. Activate the plugin through the __Plugins__ menu in WordPress
|
43 |
+
3. Configure the settings under __Settings > Widget CSS Classes__
|
44 |
+
4. Visit __Appearance > Widgets__ to add or change the custom classes and ids for a widget.
|
45 |
+
5. Expand the appropriate widget in the desired sidebar.
|
46 |
+
6. You'll see a field labeled __CSS Class__. Depending on your settings, this will be a text field and/or checkboxes.
|
47 |
+
7. If you are using the text field you can enter multiple class names by separating them with a space.
|
48 |
+
8. If you've enabled the id field, you will see a text field called __CSS ID__.
|
49 |
+
|
50 |
+
## More info and documentation
|
51 |
+
|
52 |
+
[See our wiki!](https://github.com/cleverness/widget-css-classes/wiki)
|
css/widget-css-classes.css
CHANGED
@@ -1,3 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
.wcssc_copy span, .wcssc_remove span, .wcssc_sort span {
|
2 |
vertical-align: text-bottom;
|
3 |
margin: 0;
|
1 |
+
/**
|
2 |
+
* Widget CSS Classes
|
3 |
+
*
|
4 |
+
* @author C.M. Kendrick <cindy@cleverness.org>
|
5 |
+
* @package widget-css-classes
|
6 |
+
* @version 1.5.2.1
|
7 |
+
*/
|
8 |
+
|
9 |
.wcssc_copy span, .wcssc_remove span, .wcssc_sort span {
|
10 |
vertical-align: text-bottom;
|
11 |
margin: 0;
|
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.5.2
|
9 |
*/
|
10 |
|
11 |
/**
|
5 |
* Method library
|
6 |
* @author C.M. Kendrick <cindy@cleverness.org>
|
7 |
* @package widget-css-classes
|
8 |
+
* @version 1.5.2.1
|
9 |
*/
|
10 |
|
11 |
/**
|
includes/widget-css-classes-loader.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.5.
|
9 |
*/
|
10 |
|
11 |
/**
|
5 |
* Loader
|
6 |
* @author C.M. Kendrick <cindy@cleverness.org>
|
7 |
* @package widget-css-classes
|
8 |
+
* @version 1.5.2.1
|
9 |
*/
|
10 |
|
11 |
/**
|
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.5.2
|
9 |
*/
|
10 |
|
11 |
/**
|
@@ -147,12 +147,15 @@ class WCSSC_Settings {
|
|
147 |
return;
|
148 |
}
|
149 |
|
|
|
|
|
|
|
150 |
$this->plugin_tabs['importexport'] = esc_attr__( 'Import/Export', WCSSC_Lib::DOMAIN );
|
151 |
|
152 |
$wcssc_message_class = '';
|
153 |
$wcssc_message = '';
|
154 |
-
if ( isset( $
|
155 |
-
switch ( $
|
156 |
case 1:
|
157 |
$wcssc_message_class = 'updated';
|
158 |
$wcssc_message = esc_attr__( 'Settings Imported', WCSSC_Lib::DOMAIN );
|
@@ -169,11 +172,11 @@ class WCSSC_Settings {
|
|
169 |
}
|
170 |
|
171 |
if ( ! empty( $wcssc_message ) ) {
|
172 |
-
echo '<div class=" ' . $wcssc_message_class . ' "><p>' . esc_html( $wcssc_message ) . '</p></div>';
|
173 |
}
|
174 |
|
175 |
// export settings
|
176 |
-
if ( isset( $
|
177 |
header( 'Content-Disposition: attachment; filename=widget-css-classes-settings.txt' );
|
178 |
header( 'Content-Type: text/plain; charset=utf-8' );
|
179 |
$general = get_option( 'WCSSC_options' );
|
@@ -183,12 +186,12 @@ class WCSSC_Settings {
|
|
183 |
// @codingStandardsIgnoreLine >> wp_json_encode is WP 4.1+
|
184 |
echo "$id\t" . json_encode( $text ) . "\n";
|
185 |
}
|
186 |
-
echo
|
187 |
exit;
|
188 |
}
|
189 |
|
190 |
// import settings
|
191 |
-
if ( isset( $
|
192 |
$wcssc_message = 3;
|
193 |
if ( $_FILES['widget-css-classes-settings-import-file']['tmp_name'] ) {
|
194 |
$wcssc_message = 2;
|
5 |
* Settings
|
6 |
* @author C.M. Kendrick <cindy@cleverness.org>
|
7 |
* @package widget-css-classes
|
8 |
+
* @version 1.5.2.1
|
9 |
*/
|
10 |
|
11 |
/**
|
147 |
return;
|
148 |
}
|
149 |
|
150 |
+
// @codingStandardsIgnoreLine
|
151 |
+
$get = $_GET; $post = $_POST;
|
152 |
+
|
153 |
$this->plugin_tabs['importexport'] = esc_attr__( 'Import/Export', WCSSC_Lib::DOMAIN );
|
154 |
|
155 |
$wcssc_message_class = '';
|
156 |
$wcssc_message = '';
|
157 |
+
if ( isset( $get['wcssc_message'] ) ) {
|
158 |
+
switch ( $get['wcssc_message'] ) {
|
159 |
case 1:
|
160 |
$wcssc_message_class = 'updated';
|
161 |
$wcssc_message = esc_attr__( 'Settings Imported', WCSSC_Lib::DOMAIN );
|
172 |
}
|
173 |
|
174 |
if ( ! empty( $wcssc_message ) ) {
|
175 |
+
echo '<div class=" ' . esc_attr( $wcssc_message_class ) . ' "><p>' . esc_html( $wcssc_message ) . '</p></div>';
|
176 |
}
|
177 |
|
178 |
// export settings
|
179 |
+
if ( isset( $get['widget-css-classes-settings-export'] ) ) {
|
180 |
header( 'Content-Disposition: attachment; filename=widget-css-classes-settings.txt' );
|
181 |
header( 'Content-Type: text/plain; charset=utf-8' );
|
182 |
$general = get_option( 'WCSSC_options' );
|
186 |
// @codingStandardsIgnoreLine >> wp_json_encode is WP 4.1+
|
187 |
echo "$id\t" . json_encode( $text ) . "\n";
|
188 |
}
|
189 |
+
echo '[STOP=WCSSC SETTINGS]';
|
190 |
exit;
|
191 |
}
|
192 |
|
193 |
// import settings
|
194 |
+
if ( isset( $post['widget-css-classes-settings-import'] ) ) {
|
195 |
$wcssc_message = 3;
|
196 |
if ( $_FILES['widget-css-classes-settings-import-file']['tmp_name'] ) {
|
197 |
$wcssc_message = 2;
|
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.5.2
|
9 |
*/
|
10 |
|
11 |
/**
|
@@ -188,6 +188,7 @@ class WCSSC {
|
|
188 |
*/
|
189 |
do_action( 'widget_css_classes_form', $fields, $instance );
|
190 |
|
|
|
191 |
echo $fields;
|
192 |
return $return;
|
193 |
}
|
@@ -433,6 +434,9 @@ class WCSSC {
|
|
433 |
*
|
434 |
* // Disable variable check because of global $wp_registered_widgets.
|
435 |
* @SuppressWarnings(PHPMD.LongVariables)
|
|
|
|
|
|
|
436 |
*
|
437 |
* @static
|
438 |
* @param $params
|
@@ -517,8 +521,8 @@ class WCSSC {
|
|
517 |
|
518 |
// Add first, last, even, and odd classes.
|
519 |
if ( WCSSC_Lib::get_settings( 'show_number' ) ||
|
520 |
-
|
521 |
-
|
522 |
) {
|
523 |
|
524 |
if ( ! self::$widget_counter ) {
|
@@ -537,8 +541,8 @@ class WCSSC {
|
|
537 |
}
|
538 |
|
539 |
if ( WCSSC_Lib::get_settings( 'show_location' ) &&
|
540 |
-
|
541 |
-
|
542 |
) {
|
543 |
$widget_first = apply_filters( 'widget_css_classes_first', self::$core_classes['widget_first'] );
|
544 |
$widget_last = apply_filters( 'widget_css_classes_last', self::$core_classes['widget_last'] );
|
@@ -560,7 +564,7 @@ class WCSSC {
|
|
560 |
} // End if().
|
561 |
|
562 |
/**
|
563 |
-
* Modify the list of
|
564 |
* Can also be used for ordering etc.
|
565 |
*
|
566 |
* @since 1.5.0
|
5 |
* Loader
|
6 |
* @author C.M. Kendrick <cindy@cleverness.org>
|
7 |
* @package widget-css-classes
|
8 |
+
* @version 1.5.2.1
|
9 |
*/
|
10 |
|
11 |
/**
|
188 |
*/
|
189 |
do_action( 'widget_css_classes_form', $fields, $instance );
|
190 |
|
191 |
+
// @codingStandardsIgnoreLine >> No escaping needed.
|
192 |
echo $fields;
|
193 |
return $return;
|
194 |
}
|
434 |
*
|
435 |
* // Disable variable check because of global $wp_registered_widgets.
|
436 |
* @SuppressWarnings(PHPMD.LongVariables)
|
437 |
+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
438 |
+
* @SuppressWarnings(PHPMD.NPathComplexity)
|
439 |
+
* @todo Refactor to enable above checks.
|
440 |
*
|
441 |
* @static
|
442 |
* @param $params
|
521 |
|
522 |
// Add first, last, even, and odd classes.
|
523 |
if ( WCSSC_Lib::get_settings( 'show_number' ) ||
|
524 |
+
WCSSC_Lib::get_settings( 'show_location' ) ||
|
525 |
+
WCSSC_Lib::get_settings( 'show_evenodd' )
|
526 |
) {
|
527 |
|
528 |
if ( ! self::$widget_counter ) {
|
541 |
}
|
542 |
|
543 |
if ( WCSSC_Lib::get_settings( 'show_location' ) &&
|
544 |
+
isset( $arr_registered_widgets[ $this_id ] ) &&
|
545 |
+
is_array( $arr_registered_widgets[ $this_id ] )
|
546 |
) {
|
547 |
$widget_first = apply_filters( 'widget_css_classes_first', self::$core_classes['widget_first'] );
|
548 |
$widget_last = apply_filters( 'widget_css_classes_last', self::$core_classes['widget_last'] );
|
564 |
} // End if().
|
565 |
|
566 |
/**
|
567 |
+
* Modify the list of all CSS classes.
|
568 |
* Can also be used for ordering etc.
|
569 |
*
|
570 |
* @since 1.5.0
|
js/widget-css-classes.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
*
|
4 |
* @author C.M. Kendrick <cindy@cleverness.org>
|
5 |
* @package widget-css-classes
|
6 |
-
* @version 1.5.
|
7 |
*/
|
8 |
|
9 |
jQuery( document ).ready( function ( $ ) {
|
@@ -12,9 +12,9 @@ jQuery( document ).ready( function ( $ ) {
|
|
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 |
|
3 |
*
|
4 |
* @author C.M. Kendrick <cindy@cleverness.org>
|
5 |
* @package widget-css-classes
|
6 |
+
* @version 1.5.2.1
|
7 |
*/
|
8 |
|
9 |
jQuery( document ).ready( function ( $ ) {
|
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 |
|
languages/widget-css-classes-sv_SE.mo
DELETED
Binary file
|
languages/widget-css-classes-sv_SE.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: 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"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -2,14 +2,14 @@
|
|
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:
|
6 |
Tags: widgets, classes, css, widget classes, widget css
|
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.
|
11 |
Requires PHP: 5.2.4
|
12 |
-
Stable tag: 1.5.2
|
13 |
|
14 |
Add custom classes and ids plus first, last, even, odd, and numbered classes to your widgets.
|
15 |
|
@@ -28,7 +28,7 @@ __This plugin also adds additional classes to widgets to help you style them eas
|
|
28 |
* widget-even: added to even numbered widgets in a sidebar
|
29 |
* widget-#: added to every widget, such as widget-1, widget-2
|
30 |
|
31 |
-
|
32 |
|
33 |
* Adds a text field to a widget for defining a class
|
34 |
* You can specify multiple classes by putting a space between them
|
@@ -42,7 +42,7 @@ __Features:__
|
|
42 |
* Compatible with Widget Logic, Widget Context, and WP Page Widget plugins
|
43 |
* Has filters and hooks for customizing output including class names
|
44 |
|
45 |
-
[Plugin Website](
|
46 |
|
47 |
== Installation ==
|
48 |
|
@@ -64,19 +64,20 @@ usually located in your theme's functions.php (_/wp-content/themes/yourtheme/fun
|
|
64 |
This HTML element must have class and id attributes. This plugin will not work if `before_widget` and `after_widget` are blank.
|
65 |
|
66 |
Example:
|
67 |
-
|
|
|
68 |
'name' => 'Sidebar',
|
69 |
'before_widget' => '<div id="%1$s" class="widget %2$s">',
|
70 |
'after_widget' => '</div>',
|
71 |
'before_title' => '<h2 class="widget-title">',
|
72 |
'after_title' => '</h2>'
|
73 |
-
) )
|
|
|
74 |
|
75 |
= How do I add the CSS for my custom class? =
|
76 |
There are two ways:
|
77 |
|
78 |
1. Edit your theme's style.css file (usually located in _/wp-content/themes/yourtheme/_).
|
79 |
-
|
80 |
2. Use a plugin such as [Simple Custom CSS](http://wordpress.org/plugins/simple-custom-css/).
|
81 |
|
82 |
= How I export the Settings? =
|
@@ -84,7 +85,7 @@ You can export the Settings from __Settings > Widget CSS Classes > Import/Export
|
|
84 |
|
85 |
= What should I do if I find a bug? =
|
86 |
|
87 |
-
|
88 |
|
89 |
== Screenshots ==
|
90 |
|
@@ -95,10 +96,19 @@ Visit [the plugin website](http://cleverness.org/plugins/widget-css-classes/) an
|
|
95 |
|
96 |
== Changelog ==
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
= 1.5.2 =
|
99 |
* **Enhancement:** Make translations of core widget classes optional instead of default. [#29](https://github.com/cleverness/widget-css-classes/issues/29)
|
100 |
* **Enhancement:** Allow vertical resize of defined classes box for CSS3 compatible browsers.
|
101 |
|
|
|
|
|
102 |
= 1.5.1 =
|
103 |
* **Fix:** Widget Logic `widget_content` filter compatibility. [#27](https://github.com/cleverness/widget-css-classes/issues/27)
|
104 |
* **Enhancement:** Make uninstall script compatible with network installations.
|
@@ -192,68 +202,18 @@ Detailed info: [PR on GitHub](https://github.com/cleverness/widget-css-classes/p
|
|
192 |
= 1.0 =
|
193 |
* First version
|
194 |
|
195 |
-
== Upgrade Notice ==
|
196 |
-
|
197 |
-
= 1.4 =
|
198 |
-
New feature, bug fix, security fix
|
199 |
-
|
200 |
-
= 1.2.7 =
|
201 |
-
Bug fix
|
202 |
-
|
203 |
-
= 1.2.6 =
|
204 |
-
Bug fix
|
205 |
-
|
206 |
-
= 1.2.5 =
|
207 |
-
Bug fix
|
208 |
-
|
209 |
-
= 1.2.4 =
|
210 |
-
New translation, added support for WP Page Widget
|
211 |
-
|
212 |
-
= 1.2.3 =
|
213 |
-
New translations
|
214 |
-
|
215 |
-
= 1.2.2 =
|
216 |
-
Bug fix
|
217 |
-
|
218 |
-
= 1.2 =
|
219 |
-
New settings, bug fix
|
220 |
-
|
221 |
-
= 1.1 =
|
222 |
-
Compatibility fix, bug fix, new feature
|
223 |
-
|
224 |
-
= 1.0 =
|
225 |
-
First version
|
226 |
-
|
227 |
== Credits ==
|
228 |
|
229 |
-
[Adding Custom CSS Classes to WordPress Widgets](http://ednailor.com/2011/01/24/adding-custom-css-classes-to-sidebar-widgets/)
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
Dutch translation and predefined classes fix by [Jory Hogeveen at Keraweb](https://www.keraweb.nl/)
|
244 |
-
|
245 |
-
Russian translation by Наталия Завьялова
|
246 |
-
|
247 |
-
Swedish translation by [Olle Gustafsson](http://www.ollegustafsson.com/)
|
248 |
-
|
249 |
-
Fix ids notice by [Ricardo Lüders](http://www.luders.com.br/)
|
250 |
-
|
251 |
-
== License ==
|
252 |
-
|
253 |
-
This file is part of Widget CSS Classes.
|
254 |
-
|
255 |
-
Widget CSS Classes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
256 |
-
|
257 |
-
Widget CSS Classes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
258 |
-
|
259 |
-
You should have received a copy of the GNU General Public License along with this plugin. If not, see <http://www.gnu.org/licenses/>.
|
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: https://github.com/cleverness/widget-css-classes
|
6 |
Tags: widgets, classes, css, widget classes, widget css
|
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.9
|
11 |
Requires PHP: 5.2.4
|
12 |
+
Stable tag: 1.5.2.1
|
13 |
|
14 |
Add custom classes and ids plus first, last, even, odd, and numbered classes to your widgets.
|
15 |
|
28 |
* widget-even: added to even numbered widgets in a sidebar
|
29 |
* widget-#: added to every widget, such as widget-1, widget-2
|
30 |
|
31 |
+
= Features =
|
32 |
|
33 |
* Adds a text field to a widget for defining a class
|
34 |
* You can specify multiple classes by putting a space between them
|
42 |
* Compatible with Widget Logic, Widget Context, and WP Page Widget plugins
|
43 |
* Has filters and hooks for customizing output including class names
|
44 |
|
45 |
+
[Plugin Website](https://github.com/cleverness/widget-css-classes/wiki)
|
46 |
|
47 |
== Installation ==
|
48 |
|
64 |
This HTML element must have class and id attributes. This plugin will not work if `before_widget` and `after_widget` are blank.
|
65 |
|
66 |
Example:
|
67 |
+
```
|
68 |
+
register_sidebar( array(
|
69 |
'name' => 'Sidebar',
|
70 |
'before_widget' => '<div id="%1$s" class="widget %2$s">',
|
71 |
'after_widget' => '</div>',
|
72 |
'before_title' => '<h2 class="widget-title">',
|
73 |
'after_title' => '</h2>'
|
74 |
+
) );
|
75 |
+
```
|
76 |
|
77 |
= How do I add the CSS for my custom class? =
|
78 |
There are two ways:
|
79 |
|
80 |
1. Edit your theme's style.css file (usually located in _/wp-content/themes/yourtheme/_).
|
|
|
81 |
2. Use a plugin such as [Simple Custom CSS](http://wordpress.org/plugins/simple-custom-css/).
|
82 |
|
83 |
= How I export the Settings? =
|
85 |
|
86 |
= What should I do if I find a bug? =
|
87 |
|
88 |
+
Please file a [bug report on GitHub](https://github.com/cleverness/widget-css-classes/issues/new).
|
89 |
|
90 |
== Screenshots ==
|
91 |
|
96 |
|
97 |
== Changelog ==
|
98 |
|
99 |
+
= 1.5.2.1 =
|
100 |
+
* **i18n:** Remove sv_SE translation from the plugin directory. It's 95% on translate.wordpress.org and accepted as the better version. [#23](https://github.com/cleverness/widget-css-classes/issues/23)
|
101 |
+
* **Documentation:** Readme & Wiki. [#31](https://github.com/cleverness/widget-css-classes/issues/31)
|
102 |
+
* **Compatibility:** Tested with WordPress 4.9
|
103 |
+
|
104 |
+
Detailed info: [PR on GitHub](https://github.com/cleverness/widget-css-classes/pull/32)
|
105 |
+
|
106 |
= 1.5.2 =
|
107 |
* **Enhancement:** Make translations of core widget classes optional instead of default. [#29](https://github.com/cleverness/widget-css-classes/issues/29)
|
108 |
* **Enhancement:** Allow vertical resize of defined classes box for CSS3 compatible browsers.
|
109 |
|
110 |
+
Detailed info: [PR on GitHub](https://github.com/cleverness/widget-css-classes/pull/30)
|
111 |
+
|
112 |
= 1.5.1 =
|
113 |
* **Fix:** Widget Logic `widget_content` filter compatibility. [#27](https://github.com/cleverness/widget-css-classes/issues/27)
|
114 |
* **Enhancement:** Make uninstall script compatible with network installations.
|
202 |
= 1.0 =
|
203 |
* First version
|
204 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
== Credits ==
|
206 |
|
207 |
+
- [Adding Custom CSS Classes to WordPress Widgets](http://ednailor.com/2011/01/24/adding-custom-css-classes-to-sidebar-widgets/)
|
208 |
+
- [Add .first & .last CSS Class Automatically To WordPress Widgets](http://wpshock.com/add-first-last-css-class-automatically-to-wordpress-widgets/)
|
209 |
+
- Widget Context compatibility fix provided by [Joan Piedra](http://joanpiedra.com/)
|
210 |
+
- Slovak translation by Branco [WebHostingGeeks.com](http://webhostinggeeks.com/user-reviews/)
|
211 |
+
- Polish translation added, Slovak translation files renamed by [Tomasz Wesołowski](https://github.com/ittw)
|
212 |
+
- Spanish translation by [Maria Ramos at WebHostingHub](http://www.webhostinghub.com/)
|
213 |
+
- Serbo-Croatian translation by [Borisa Djuraskovic at WebHostingHub](http://www.webhostinghub.com/)
|
214 |
+
- Dutch translation and predefined classes fix by [Jory Hogeveen at Keraweb](https://www.keraweb.nl/)
|
215 |
+
- Russian translation by Наталия Завьялова
|
216 |
+
- Swedish translation by [Olle Gustafsson](http://www.ollegustafsson.com/)
|
217 |
+
- Fix ids notice by [Ricardo Lüders](http://www.luders.com.br/)
|
218 |
+
|
219 |
+
[GitHub Contributors](https://github.com/cleverness/widget-css-classes/graphs/contributors)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
widget-css-classes.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Widget CSS Classes
|
4 |
-
* Version: 1.5.2
|
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
|
@@ -27,7 +27,7 @@ function widget_css_classes_loader() {
|
|
27 |
|
28 |
if ( is_admin() ) {
|
29 |
|
30 |
-
if ( ! defined( 'WCSSC_PLUGIN_VERSION' ) ) define( 'WCSSC_PLUGIN_VERSION', '1.5.2' );
|
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__ ) );
|
@@ -67,7 +67,7 @@ function widget_css_classes_activation() {
|
|
67 |
}
|
68 |
|
69 |
if ( ! defined( 'WCSSC_BASENAME' ) ) define( 'WCSSC_BASENAME', plugin_basename( __FILE__ ) );
|
70 |
-
if ( ! defined( 'WCSSC_DB_VERSION' ) ) define( 'WCSSC_DB_VERSION', '1.5.2' );
|
71 |
if ( ! defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
|
72 |
include_once 'includes/widget-css-classes-library.class.php';
|
73 |
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Widget CSS Classes
|
4 |
+
* Version: 1.5.2.1
|
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
|
27 |
|
28 |
if ( is_admin() ) {
|
29 |
|
30 |
+
if ( ! defined( 'WCSSC_PLUGIN_VERSION' ) ) define( 'WCSSC_PLUGIN_VERSION', '1.5.2.1' );
|
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__ ) );
|
67 |
}
|
68 |
|
69 |
if ( ! defined( 'WCSSC_BASENAME' ) ) define( 'WCSSC_BASENAME', plugin_basename( __FILE__ ) );
|
70 |
+
if ( ! defined( 'WCSSC_DB_VERSION' ) ) define( 'WCSSC_DB_VERSION', '1.5.2.1' );
|
71 |
if ( ! defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
|
72 |
include_once 'includes/widget-css-classes-library.class.php';
|
73 |
|