Version Description
- Fixed notice
Download this release
Release Info
Developer | elusivelight |
Plugin | Widget CSS Classes |
Version | 1.2.5 |
Comparing to | |
See all releases |
Code changes from version 1.2.9 to 1.2.5
- README +0 -1
- css/widget-css-classes.css +4 -3
- includes/widget-css-classes-library.class.php +2 -2
- includes/widget-css-classes-loader.class.php +1 -1
- includes/widget-css-classes-settings.class.php +25 -24
- includes/widget-css-classes.class.php +10 -14
- languages/widget-css-classes-sr_RS.mo +0 -0
- languages/widget-css-classes-sr_RS.po +0 -0
- readme.txt +2 -24
- screenshot-1.jpg +0 -0
- screenshot-2.jpg +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- widget-css-classes.php +3 -4
README
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
This file was created by JetBrains PhpStorm 4.0.3 for binding GitHub repository
|
|
css/widget-css-classes.css
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
-
.wcssc_copy
|
2 |
vertical-align: middle;
|
3 |
margin: 0;
|
4 |
padding: 0;
|
5 |
}
|
6 |
-
|
7 |
-
|
|
|
8 |
}
|
1 |
+
.wcssc_copy img, .wcssc_remove img {
|
2 |
vertical-align: middle;
|
3 |
margin: 0;
|
4 |
padding: 0;
|
5 |
}
|
6 |
+
|
7 |
+
.wcssc_remove img {
|
8 |
+
margin-left: -12px;
|
9 |
}
|
includes/widget-css-classes-library.class.php
CHANGED
@@ -42,8 +42,8 @@ class WCSSC_Lib {
|
|
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' ).' '
|
46 |
-
' | <a href="
|
47 |
<br />';
|
48 |
}
|
49 |
|
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' ).' '.$plugin_data['Version'].' | '.$plugin_data['Author'].
|
46 |
+
' | <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 |
|
includes/widget-css-classes-loader.class.php
CHANGED
@@ -62,7 +62,7 @@ class WCSSC_Loader {
|
|
62 |
* @since 1.0
|
63 |
*/
|
64 |
private static function call_wp_hooks() {
|
65 |
-
add_action( '
|
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 );
|
68 |
add_filter( 'plugin_action_links', array( 'WCSSC_Lib', 'add_settings_link' ), 10, 2 );
|
62 |
* @since 1.0
|
63 |
*/
|
64 |
private static function call_wp_hooks() {
|
65 |
+
add_action( 'admin_head', 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 );
|
68 |
add_filter( 'plugin_action_links', array( 'WCSSC_Lib', 'add_settings_link' ), 10, 2 );
|
includes/widget-css-classes-settings.class.php
CHANGED
@@ -50,37 +50,37 @@ class WCSSC_Settings {
|
|
50 |
}
|
51 |
|
52 |
function show_number_option() { ?>
|
53 |
-
<input type="radio" name="<?php echo
|
54 |
-
<input type="radio" name="<?php echo
|
55 |
<?php
|
56 |
}
|
57 |
|
58 |
function show_location_option() {
|
59 |
?>
|
60 |
-
<input type="radio" name="<?php echo
|
61 |
-
<input type="radio" name="<?php echo
|
62 |
<?php
|
63 |
}
|
64 |
|
65 |
function show_evenodd_option() {
|
66 |
?>
|
67 |
-
<input type="radio" name="<?php echo
|
68 |
-
<input type="radio" name="<?php echo
|
69 |
<?php
|
70 |
}
|
71 |
|
72 |
function show_id_option() {
|
73 |
?>
|
74 |
-
<input type="radio" name="<?php echo
|
75 |
-
<input type="radio" name="<?php echo
|
76 |
<?php
|
77 |
}
|
78 |
|
79 |
function type_option() {
|
80 |
?>
|
81 |
-
<input type="radio" name="<?php echo
|
82 |
-
<input type="radio" name="<?php echo
|
83 |
-
<input type="radio" name="<?php echo
|
84 |
<?php
|
85 |
}
|
86 |
|
@@ -90,23 +90,23 @@ class WCSSC_Settings {
|
|
90 |
foreach ( $presets as $key => $preset ) {
|
91 |
if ( $preset != '' ) {
|
92 |
?>
|
93 |
-
<p><input type="text" name="<?php echo
|
94 |
-
|
95 |
<?php
|
96 |
}
|
97 |
}
|
98 |
?>
|
99 |
<p class="wcssc_dropdown">
|
100 |
-
<input type="text" name="<?php echo
|
101 |
-
<a href="#" class="wcssc_copy" rel=".wcssc_dropdown"><
|
102 |
-
<a class="wcssc_remove" href="#"><
|
103 |
</p>
|
104 |
<?php
|
105 |
} else {
|
106 |
?>
|
107 |
-
<p class="wcssc_dropdown"><input type="text" name="<?php echo
|
108 |
-
<a href="#" class="wcssc_copy" rel=".wcssc_dropdown"><
|
109 |
-
<a class="wcssc_remove" href="#"><
|
110 |
<?php
|
111 |
}
|
112 |
}
|
@@ -132,7 +132,7 @@ class WCSSC_Settings {
|
|
132 |
}
|
133 |
|
134 |
if ( isset( $wcssc_message ) && $wcssc_message != '' ) {
|
135 |
-
echo '<div class="updated"><p>'
|
136 |
}
|
137 |
|
138 |
// export settings
|
@@ -167,7 +167,7 @@ class WCSSC_Settings {
|
|
167 |
$wcssc_message = 3;
|
168 |
}
|
169 |
|
170 |
-
wp_redirect( admin_url( '/options-general.php?page=widget-css-classes-settings&tab=importexport&wcssc_message='
|
171 |
exit;
|
172 |
}
|
173 |
}
|
@@ -229,12 +229,13 @@ class WCSSC_Settings {
|
|
229 |
function plugin_options_tabs() {
|
230 |
$current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : $this->general_key;
|
231 |
|
232 |
-
|
|
|
233 |
foreach ( $this->plugin_tabs as $tab_key => $tab_caption ) {
|
234 |
$active = $current_tab == $tab_key ? 'nav-tab-active' : '';
|
235 |
-
echo '<a class="nav-tab '
|
236 |
}
|
237 |
-
echo '</
|
238 |
}
|
239 |
|
240 |
function importexport_fields() {
|
50 |
}
|
51 |
|
52 |
function show_number_option() { ?>
|
53 |
+
<input type="radio" name="<?php echo $this->general_key.'[show_number]'; ?>" value="1" <?php checked( $this->general_settings['show_number'], 1 ); ?> /> <?php esc_attr_e( 'Yes', 'widget-css-classes' ); ?>
|
54 |
+
<input type="radio" name="<?php echo $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 |
function show_location_option() {
|
59 |
?>
|
60 |
+
<input type="radio" name="<?php echo $this->general_key.'[show_location]'; ?>" value="1" <?php checked( $this->general_settings['show_location'], 1 ); ?> /> <?php esc_attr_e( 'Yes', 'widget-css-classes' ); ?>
|
61 |
+
<input type="radio" name="<?php echo $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 |
function show_evenodd_option() {
|
66 |
?>
|
67 |
+
<input type="radio" name="<?php echo $this->general_key.'[show_evenodd]'; ?>" value="1" <?php checked( $this->general_settings['show_evenodd'], 1 ); ?> /> <?php esc_attr_e( 'Yes', 'widget-css-classes' ); ?>
|
68 |
+
<input type="radio" name="<?php echo $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 |
function show_id_option() {
|
73 |
?>
|
74 |
+
<input type="radio" name="<?php echo $this->general_key.'[show_id]'; ?>" value="1" <?php checked( $this->general_settings['show_id'], 1 ); ?> /> <?php esc_attr_e( 'Yes', 'widget-css-classes' ); ?>
|
75 |
+
<input type="radio" name="<?php echo $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 |
function type_option() {
|
80 |
?>
|
81 |
+
<input type="radio" name="<?php echo $this->general_key.'[type]'; ?>" value="1" <?php checked( $this->general_settings['type'], 1 ); ?> /> <?php esc_attr_e( 'Text', 'widget-css-classes' ); ?>
|
82 |
+
<input type="radio" name="<?php echo $this->general_key.'[type]'; ?>" value="2" <?php checked( $this->general_settings['type'], 2 ); ?> /> <?php esc_attr_e( 'Dropdown', 'widget-css-classes' ); ?>
|
83 |
+
<input type="radio" name="<?php echo $this->general_key.'[type]'; ?>" value="3" <?php checked( $this->general_settings['type'], 3 ); ?> /> <?php esc_attr_e( 'Hide', 'widget-css-classes' ); ?>
|
84 |
<?php
|
85 |
}
|
86 |
|
90 |
foreach ( $presets as $key => $preset ) {
|
91 |
if ( $preset != '' ) {
|
92 |
?>
|
93 |
+
<p><input type="text" name="<?php echo $this->general_key.'[dropdown]['.$key.']'; ?>" value="<?php echo $preset; ?>" />
|
94 |
+
<a class="wcssc_remove" href="#"><img src="<?php echo WCSSC_PLUGIN_URL; ?>/images/bullet-toggle-minus-icon.png" alt="-" /></a></p>
|
95 |
<?php
|
96 |
}
|
97 |
}
|
98 |
?>
|
99 |
<p class="wcssc_dropdown">
|
100 |
+
<input type="text" name="<?php echo $this->general_key.'[dropdown][]'; ?>" value="" />
|
101 |
+
<a href="#" class="wcssc_copy" rel=".wcssc_dropdown"><img src="<?php echo WCSSC_PLUGIN_URL; ?>/images/bullet-toggle-plus-icon.png" alt="+" /></a>
|
102 |
+
<a class="wcssc_remove" href="#"><img src="<?php echo WCSSC_PLUGIN_URL; ?>/images/bullet-toggle-minus-icon.png" alt="-" /></a>
|
103 |
</p>
|
104 |
<?php
|
105 |
} else {
|
106 |
?>
|
107 |
+
<p class="wcssc_dropdown"><input type="text" name="<?php echo $this->general_key.'[dropdown][]'; ?>" value="<?php echo $this->general_settings['dropdown']; ?>" />
|
108 |
+
<a href="#" class="wcssc_copy" rel=".wcssc_dropdown"><img src="<?php echo WCSSC_PLUGIN_URL; ?>/images/bullet-toggle-plus-icon.png" alt="+" /></a>
|
109 |
+
<a class="wcssc_remove" href="#"><img src="<?php echo WCSSC_PLUGIN_URL; ?>/images/bullet-toggle-minus-icon.png" alt="-" /></a></p>
|
110 |
<?php
|
111 |
}
|
112 |
}
|
132 |
}
|
133 |
|
134 |
if ( isset( $wcssc_message ) && $wcssc_message != '' ) {
|
135 |
+
echo '<div class="updated"><p>'.$wcssc_message.'</p></div>';
|
136 |
}
|
137 |
|
138 |
// export settings
|
167 |
$wcssc_message = 3;
|
168 |
}
|
169 |
|
170 |
+
wp_redirect( admin_url( '/options-general.php?page=widget-css-classes-settings&tab=importexport&wcssc_message='.$wcssc_message ) );
|
171 |
exit;
|
172 |
}
|
173 |
}
|
229 |
function plugin_options_tabs() {
|
230 |
$current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : $this->general_key;
|
231 |
|
232 |
+
screen_icon( 'options-general' );
|
233 |
+
echo '<h2 class="nav-tab-wrapper">';
|
234 |
foreach ( $this->plugin_tabs as $tab_key => $tab_caption ) {
|
235 |
$active = $current_tab == $tab_key ? 'nav-tab-active' : '';
|
236 |
+
echo '<a class="nav-tab '.$active.'" href="?page='.$this->plugin_key.'&tab='.$tab_key.'">'.$tab_caption.'</a>';
|
237 |
}
|
238 |
+
echo '</h2>';
|
239 |
}
|
240 |
|
241 |
function importexport_fields() {
|
includes/widget-css-classes.class.php
CHANGED
@@ -25,28 +25,27 @@ class WCSSC {
|
|
25 |
*/
|
26 |
public static function extend_widget_form( $widget, $return, $instance ) {
|
27 |
if ( !isset( $instance['classes'] ) ) $instance['classes'] = null;
|
28 |
-
|
|
|
29 |
|
30 |
// show id field
|
31 |
if ( WCSSC_Loader::$settings['show_id'] == 1 ) {
|
32 |
if ( !isset( $instance['ids'] ) ) $instance['ids'] = null;
|
33 |
-
$fields .= "\t<
|
34 |
-
<input type='text' name='widget-{$widget->id_base}[{$widget->number}][ids]' id='widget-{$widget->id_base}-{$widget->number}-ids' value='{$instance['ids']}'
|
35 |
}
|
36 |
|
37 |
-
$fields .= "<p>\n";
|
38 |
-
|
39 |
// show text field
|
40 |
if ( WCSSC_Loader::$settings['type'] == 1 ) {
|
41 |
$fields .= "\t<label for='widget-{$widget->id_base}-{$widget->number}-classes'>".apply_filters( 'widget_css_classes_class', esc_html__( 'CSS Class', 'widget-css-classes' ) ).":</label>
|
42 |
-
<input type='text' name='widget-{$widget->id_base}[{$widget->number}][classes]' id='widget-{$widget->id_base}-{$widget->number}-classes' value='{$instance['classes']}'
|
43 |
}
|
44 |
|
45 |
// show dropdown
|
46 |
if ( WCSSC_Loader::$settings['type'] == 2 ) {
|
47 |
$preset_values = explode( ';', WCSSC_Loader::$settings['dropdown'] );
|
48 |
$fields .= "\t<label for='widget-{$widget->id_base}-{$widget->number}-classes'>".apply_filters( 'widget_css_classes_class', esc_html__( 'CSS Class', 'widget-css-classes' ) ).":</label>\n";
|
49 |
-
$fields .= "\t<select name='widget-{$widget->id_base}[{$widget->number}][classes]' id='widget-{$widget->id_base}-{$widget->number}-classes'
|
50 |
$fields .= "\t<option value=''>".esc_attr__( 'Select', 'widget-css-classes' )."</option>\n";
|
51 |
foreach ( $preset_values as $preset ) {
|
52 |
if ( $preset != '' ) {
|
@@ -120,14 +119,11 @@ class WCSSC {
|
|
120 |
// Default callback
|
121 |
else {
|
122 |
// Check if WP Page Widget is in use
|
123 |
-
|
124 |
-
$id = ( isset( $post->ID ) ? get_the_ID() : NULL );
|
125 |
-
if ( isset( $id ) && get_post_meta( $id, '_customize_sidebars' ) ) {
|
126 |
-
$custom_sidebarcheck = get_post_meta( $id, '_customize_sidebars' );
|
127 |
-
}
|
128 |
if ( isset( $custom_sidebarcheck[0] ) && ( $custom_sidebarcheck[0] == 'yes' ) ) {
|
129 |
-
$widget_opt = get_option( 'widget_'
|
130 |
-
}
|
|
|
131 |
$widget_opt = get_option( $widget_obj['callback'][0]->option_name );
|
132 |
}
|
133 |
}
|
25 |
*/
|
26 |
public static function extend_widget_form( $widget, $return, $instance ) {
|
27 |
if ( !isset( $instance['classes'] ) ) $instance['classes'] = null;
|
28 |
+
|
29 |
+
$fields = "<p>\n";
|
30 |
|
31 |
// show id field
|
32 |
if ( WCSSC_Loader::$settings['show_id'] == 1 ) {
|
33 |
if ( !isset( $instance['ids'] ) ) $instance['ids'] = null;
|
34 |
+
$fields .= "\t<label for='widget-{$widget->id_base}-{$widget->number}-ids'>".apply_filters( 'widget_css_classes_id', esc_html__( 'CSS ID', 'widget-css-classes' ) ).":</label>
|
35 |
+
<input type='text' name='widget-{$widget->id_base}[{$widget->number}][ids]' id='widget-{$widget->id_base}-{$widget->number}-ids' value='{$instance['ids']}'/><br />\n";
|
36 |
}
|
37 |
|
|
|
|
|
38 |
// show text field
|
39 |
if ( WCSSC_Loader::$settings['type'] == 1 ) {
|
40 |
$fields .= "\t<label for='widget-{$widget->id_base}-{$widget->number}-classes'>".apply_filters( 'widget_css_classes_class', esc_html__( 'CSS Class', 'widget-css-classes' ) ).":</label>
|
41 |
+
<input type='text' name='widget-{$widget->id_base}[{$widget->number}][classes]' id='widget-{$widget->id_base}-{$widget->number}-classes' value='{$instance['classes']}'/>\n";
|
42 |
}
|
43 |
|
44 |
// show dropdown
|
45 |
if ( WCSSC_Loader::$settings['type'] == 2 ) {
|
46 |
$preset_values = explode( ';', WCSSC_Loader::$settings['dropdown'] );
|
47 |
$fields .= "\t<label for='widget-{$widget->id_base}-{$widget->number}-classes'>".apply_filters( 'widget_css_classes_class', esc_html__( 'CSS Class', 'widget-css-classes' ) ).":</label>\n";
|
48 |
+
$fields .= "\t<select name='widget-{$widget->id_base}[{$widget->number}][classes]' id='widget-{$widget->id_base}-{$widget->number}-classes'>\n";
|
49 |
$fields .= "\t<option value=''>".esc_attr__( 'Select', 'widget-css-classes' )."</option>\n";
|
50 |
foreach ( $preset_values as $preset ) {
|
51 |
if ( $preset != '' ) {
|
119 |
// Default callback
|
120 |
else {
|
121 |
// Check if WP Page Widget is in use
|
122 |
+
$custom_sidebarcheck = get_post_meta( get_the_ID(), '_customize_sidebars' );
|
|
|
|
|
|
|
|
|
123 |
if ( isset( $custom_sidebarcheck[0] ) && ( $custom_sidebarcheck[0] == 'yes' ) ) {
|
124 |
+
$widget_opt = get_option( 'widget_'.get_the_id().'_'.substr($widget_obj['callback'][0]->option_name, 7) );
|
125 |
+
}
|
126 |
+
else {
|
127 |
$widget_opt = get_option( $widget_obj['callback'][0]->option_name );
|
128 |
}
|
129 |
}
|
languages/widget-css-classes-sr_RS.mo
CHANGED
File without changes
|
languages/widget-css-classes-sr_RS.po
CHANGED
File without changes
|
readme.txt
CHANGED
@@ -7,8 +7,8 @@ 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:
|
11 |
-
Stable tag: 1.2.
|
12 |
|
13 |
Add custom classes and ids plus first, last, even, odd, and numbered classes to your widgets.
|
14 |
|
@@ -94,22 +94,6 @@ Visit [the plugin website](http://cleverness.org/plugins/widget-css-classes/) an
|
|
94 |
|
95 |
== Changelog ==
|
96 |
|
97 |
-
= 1.2.9 =
|
98 |
-
* Changed h2 to h1 on settings page
|
99 |
-
* Changed plus/minus icons on settings page to dashicons
|
100 |
-
|
101 |
-
= 1.2.8 =
|
102 |
-
* Added text domain to plugin header in preparation for automatic language translations
|
103 |
-
|
104 |
-
= 1.2.7 =
|
105 |
-
* Changed class and ID fields to full-width
|
106 |
-
* Added missing escaping from settings page
|
107 |
-
* Enqueue admin scripts on correct hook
|
108 |
-
* Fixed undefined notice when option was not found
|
109 |
-
|
110 |
-
= 1.2.6 =
|
111 |
-
* Fixed error notice
|
112 |
-
|
113 |
= 1.2.5 =
|
114 |
* Fixed notice
|
115 |
|
@@ -146,12 +130,6 @@ Visit [the plugin website](http://cleverness.org/plugins/widget-css-classes/) an
|
|
146 |
|
147 |
== Upgrade Notice ==
|
148 |
|
149 |
-
= 1.2.7 =
|
150 |
-
Bug fix
|
151 |
-
|
152 |
-
= 1.2.6 =
|
153 |
-
Bug fix
|
154 |
-
|
155 |
= 1.2.5 =
|
156 |
Bug fix
|
157 |
|
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: 3.8
|
11 |
+
Stable tag: 1.2.5
|
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.2.5 =
|
98 |
* Fixed notice
|
99 |
|
130 |
|
131 |
== Upgrade Notice ==
|
132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
= 1.2.5 =
|
134 |
Bug fix
|
135 |
|
screenshot-1.jpg
ADDED
Binary file
|
screenshot-2.jpg
ADDED
Binary file
|
screenshot-3.png
ADDED
Binary file
|
screenshot-4.png
ADDED
Binary file
|
widget-css-classes.php
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Widget CSS Classes
|
4 |
-
Version: 1.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
|
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' );
|
@@ -19,11 +18,11 @@ add_action( 'wp_loaded', 'widget_css_classes_frontend_hook' );
|
|
19 |
function widget_css_classes_loader() {
|
20 |
|
21 |
$languages_path = plugin_basename( dirname( __FILE__ ).'/languages' );
|
22 |
-
load_plugin_textdomain( 'widget-css-classes',
|
23 |
|
24 |
if ( is_admin() ) {
|
25 |
|
26 |
-
if ( !defined( 'WCSSC_PLUGIN_VERSION' ) ) define( 'WCSSC_PLUGIN_VERSION', '1.2.
|
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__ ) );
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Widget CSS Classes
|
4 |
+
Version: 1.2.5
|
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 |
*/
|
10 |
|
11 |
add_action( 'init', 'widget_css_classes_loader' );
|
18 |
function widget_css_classes_loader() {
|
19 |
|
20 |
$languages_path = plugin_basename( dirname( __FILE__ ).'/languages' );
|
21 |
+
load_plugin_textdomain( 'widget-css-classes', '', $languages_path );
|
22 |
|
23 |
if ( is_admin() ) {
|
24 |
|
25 |
+
if ( !defined( 'WCSSC_PLUGIN_VERSION' ) ) define( 'WCSSC_PLUGIN_VERSION', '1.2.4' );
|
26 |
if ( !defined( 'WCSSC_FILE' ) ) define( 'WCSSC_FILE', __FILE__ );
|
27 |
if ( !defined( 'WCSSC_BASENAME' ) ) define( 'WCSSC_BASENAME', plugin_basename( __FILE__ ) );
|
28 |
if ( !defined( 'WCSSC_PLUGIN_DIR' ) ) define( 'WCSSC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|