Custom Meta Widget - Version 1.3.3

Version Description

  • Internationalized all displayed text.
Download this release

Release Info

Developer bitacre
Plugin Icon wp plugin Custom Meta Widget
Version 1.3.3
Comparing to
See all releases

Code changes from version 1.3.2 to 1.3.3

Files changed (3) hide show
  1. custom-meta-widget.pot +107 -0
  2. customMeta.php +21 -22
  3. readme.txt +6 -1
custom-meta-widget.pot ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2012
2
+ # This file is distributed under the same license as the package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: \n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/custom-meta-widget\n"
7
+ "POT-Creation-Date: 2012-04-18 20:54:08+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+
15
+ #: customMeta.php:20
16
+ msgid ""
17
+ "Clone of the standard Meta widget with options to show or hide log in/out, "
18
+ "admin, feed, WordPress/custom links."
19
+ msgstr ""
20
+
21
+ #: customMeta.php:30
22
+ msgid "Meta"
23
+ msgstr ""
24
+
25
+ #: customMeta.php:45
26
+ msgid "Title"
27
+ msgstr ""
28
+
29
+ #: customMeta.php:51
30
+ msgid "Show \"Register/Admin\" link?"
31
+ msgstr ""
32
+
33
+ #: customMeta.php:57
34
+ msgid "Show \"Log in/out\" link?"
35
+ msgstr ""
36
+
37
+ #: customMeta.php:63
38
+ msgid "Show \"Entries RSS\" link?"
39
+ msgstr ""
40
+
41
+ #: customMeta.php:69
42
+ msgid "Show \"Comments RSS\" link?"
43
+ msgstr ""
44
+
45
+ #: customMeta.php:75
46
+ msgid "Show \"Wordpress\" link?"
47
+ msgstr ""
48
+
49
+ #: customMeta.php:81
50
+ msgid "Show Custom link?"
51
+ msgstr ""
52
+
53
+ #: customMeta.php:85
54
+ msgid "URL"
55
+ msgstr ""
56
+
57
+ #: customMeta.php:90
58
+ msgid "Text"
59
+ msgstr ""
60
+
61
+ #: customMeta.php:97
62
+ msgid "Show Plugin link?"
63
+ msgstr ""
64
+
65
+ #: customMeta.php:100
66
+ msgid "An awesome way to support this free plugin!"
67
+ msgstr ""
68
+
69
+ #: customMeta.php:107
70
+ msgid "You have a custom link with no URL or text!"
71
+ msgstr ""
72
+
73
+ #: customMeta.php:110
74
+ msgid "You have a custom link with no text!"
75
+ msgstr ""
76
+
77
+ #: customMeta.php:114
78
+ msgid "You have a custom link with no URL!"
79
+ msgstr ""
80
+
81
+ #: customMeta.php:169 customMeta.php:176
82
+ msgid "Syndicate this site using RSS 2.0"
83
+ msgstr ""
84
+
85
+ #: customMeta.php:169
86
+ msgid "Entries"
87
+ msgstr ""
88
+
89
+ #: customMeta.php:169 customMeta.php:176
90
+ msgid "Really Simple Syndication"
91
+ msgstr ""
92
+
93
+ #: customMeta.php:176
94
+ msgid "Comments"
95
+ msgstr ""
96
+
97
+ #: customMeta.php:180
98
+ msgid ""
99
+ "Powered by WordPress, state-of-the-art semantic personal publishing platform."
100
+ msgstr ""
101
+
102
+ #: customMeta.php:188
103
+ msgid ""
104
+ "Error: \"Show Custom Link\" is checked, but either the text or URL for that "
105
+ "link are not specified. The link was not displayed because it would be "
106
+ "broken. Check the settings for your Custom Meta widget."
107
+ msgstr ""
customMeta.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Custom Meta Widget
4
  Plugin URI: http://wikiduh.com/plugins/custom-meta-widget
5
  Description: Clone of the standard Meta widget plus options to hide log in/out, admin, feed and WordPress/custom links.
6
- Version: 1.3.2
7
  Author: bitacre
8
  Author URI: http://wikiduh.com/
9
  License: GPLv2
@@ -17,7 +17,7 @@ function customMetaWidget() {
17
  // as shown on the Dashboard > Appearance > Widgets page
18
  $widget_ops = array (
19
  'classname' => 'customMetaWidget',
20
- 'description' => 'Clone of the standard Meta widget with options to show or hide log in/out, admin, feed, WordPress/custom links.'
21
  );
22
 
23
  $this->WP_Widget( 'customMetaWidget', 'Custom Meta', $widget_ops );
@@ -27,7 +27,7 @@ function customMetaWidget() {
27
  function form( $instance ) {
28
  // set default form values
29
  $instance = wp_parse_args( ( array ) $instance, array (
30
- 'title' => 'Meta',
31
  'register' => 1,
32
  'login' => 1,
33
  'entryrss' => 1,
@@ -42,76 +42,76 @@ function form( $instance ) {
42
  // output HTML for the options form ?>
43
  <!-- title -->
44
  <p>
45
- <label for="<?php echo $this->get_field_name( 'title' ); ?>">Title:</label>
46
  <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />
47
  </p>
48
 
49
  <!-- register -->
50
  <p>
51
- <label for="<?php echo $this->get_field_name( 'register' ); ?>">Show 'Register/Admin' link?</label>
52
  <input id="<?php echo $this->get_field_id( 'register' ); ?>" name="<?php echo $this->get_field_name( 'register' ); ?>" type="checkbox" value="1" <?php checked( $instance['register'] ); ?> />
53
  </p>
54
 
55
  <!-- login -->
56
  <p>
57
- <label for="<?php echo $this ->get_field_name( 'login' ); ?>">Show 'Log in/out' link?</label>
58
  <input id="<?php echo $this->get_field_id( 'login' ); ?>" name="<?php echo $this->get_field_name( 'login' ); ?>" type="checkbox" value="1" <?php checked( $instance['login'] ); ?> />
59
  </p>
60
 
61
  <!-- entry RSS -->
62
  <p>
63
- <label for="<?php echo $this->get_field_name( 'entryrss' ); ?>">Show 'Entries RSS' link?</label>
64
  <input id="<?php echo $this->get_field_id( 'entryrss' ); ?>" name="<?php echo $this->get_field_name( 'entryrss' ); ?>" type="checkbox" value="1" <?php checked( $instance['entryrss'] ); ?> />
65
  </p>
66
 
67
  <!-- comment RSS -->
68
  <p>
69
- <label for="<?php echo $this->get_field_name( 'commentrss' ); ?>">Show 'Comments RSS' link?</label>
70
  <input id="<?php echo $this->get_field_id( 'commentrss' ); ?>" name="<?php echo $this->get_field_name( 'commentrss' ); ?>" type="checkbox" value="1" <?php checked( $instance['commentrss'] ); ?> />
71
  </p>
72
 
73
  <!-- wordpress -->
74
  <p>
75
- <label for="<?php echo $this->get_field_name( 'wordpress' ); ?>">Show 'Wordpress' link?</label>
76
  <input id="<?php echo $this->get_field_id( 'wordpress' ); ?>" name="<?php echo $this->get_field_name( 'wordpress' ); ?>" type="checkbox" value="1" <?php checked( $instance['wordpress'] ); ?> />
77
  </p>
78
 
79
  <!-- custom -->
80
  <p>
81
- <label for="<?php echo $this->get_field_name( 'showcustom' ); ?>">Show Custom link?&nbsp;</label>
82
  <input id="<?php echo $this->get_field_id( 'showcustom' ); ?>" name="<?php echo $this->get_field_name( 'showcustom' ); ?>" type="checkbox" value="1" <?php checked( $instance['showcustom'] ); ?> />
83
 
84
  <div style="margin-left:20px;">
85
- <label for="<?php echo $this->get_field_name( 'customurl' ); ?>">URL:&nbsp;</label>
86
  <input id="<?php echo $this->get_field_id( 'customurl' ); ?>" name="<?php echo $this->get_field_name( 'customurl' ); ?>" type="text" value="<?php echo esc_attr( $instance['customurl'] ); ?>" />
87
  </div>
88
 
89
  <div style="margin-left:20px;">
90
- <label for="<?php echo $this->get_field_name( 'customtext' ); ?>">Text:&nbsp;&nbsp;</label>
91
  <input id="<?php echo $this->get_field_id( 'customtext' ); ?>" name="<?php echo $this->get_field_name( 'customtext' ); ?>" type="text" value="<?php echo esc_attr( $instance['customtext'] ); ?>" />
92
  </div>
93
  </p>
94
 
95
  <!-- linklove -->
96
  <p>
97
- <label for="<?php echo $this->get_field_name( 'linklove' ); ?>">Show Plugin link?&nbsp;</label>
98
  <input id="<?php echo $this->get_field_id( 'linklove' ); ?>" name="<?php echo $this->get_field_name( 'linklove' ); ?>" type="checkbox" value="1" <?php checked( $instance['linklove'] ); ?> />
99
  <br />
100
- <small>(An awesome way to support this free plugin!)</small></p>
101
 
102
  <?php // check for errors
103
  if ( esc_attr($instance['showcustom']) ) { // IF 'showcustom' is checked, AND
104
 
105
  // 1. no link and no URL
106
  if( empty($instance['customtext']) && empty($instance['customurl']) )
107
- echo '<p style="color:#FF0000; font-weight:bold;" >You have a custom link with no URL or text!</p>';
108
  // 2. no link
109
  else if ( empty($instance['customtext']) )
110
- echo '<p style="color:#FF0000; font-weight:bold;" >You have a custom link with no text!</p>';
111
 
112
  // 3. no url
113
  else if ( empty($instance['customurl']) )
114
- echo '<p style="color:#FF0000; font-weight:bold;" >You have a custom link with no URL!</p>';
115
  }
116
  }
117
 
@@ -166,18 +166,18 @@ Plugin URL: http://wikiduh.com/plugins/custom-meta-widget
166
  if( esc_attr( $instance['entryrss'] ) ) {
167
  echo '<li><a href="';
168
  bloginfo( 'rss2_url' );
169
- echo '" title="Syndicate this site using RSS 2.0">Entries <abbr title="Really Simple Syndication">RSS</abbr></a></li>';
170
  }
171
 
172
  // 4. comments RSS link
173
  if( esc_attr( $instance['commentrss'] ) ) {
174
  echo '<li><a href="';
175
  bloginfo( 'comments_rss2_url' );
176
- echo '" title="Syndicate this site using RSS 2.0">Comments <abbr title="Really Simple Syndication">RSS</abbr></a></li>';
177
  }
178
 
179
  // 5. wordpress.org link
180
- if( esc_attr( $instance['wordpress'] ) ) echo '<li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress.org</a></li>';
181
 
182
  // 6. custom link
183
  if( esc_attr( $instance['showcustom'] ) ) {
@@ -185,8 +185,7 @@ Plugin URL: http://wikiduh.com/plugins/custom-meta-widget
185
  if( !empty( $instance['customtext'] ) && !empty( $instance['customurl'] ) ) echo '<li><a href="' . esc_attr( $instance['customurl'] ) . '">' . esc_attr( $instance['customtext'] ) . '</a></li>';
186
  // otherwise insert error comment
187
  else echo '
188
- <!-- Error: \'Show Custom Link\' is checked, but either the text or URL for that link are not specified.
189
- The link was not displayed because it would be broken. Check the settings for your Custom Meta widget. -->
190
  ';
191
  }
192
 
3
  Plugin Name: Custom Meta Widget
4
  Plugin URI: http://wikiduh.com/plugins/custom-meta-widget
5
  Description: Clone of the standard Meta widget plus options to hide log in/out, admin, feed and WordPress/custom links.
6
+ Version: 1.3.3
7
  Author: bitacre
8
  Author URI: http://wikiduh.com/
9
  License: GPLv2
17
  // as shown on the Dashboard > Appearance > Widgets page
18
  $widget_ops = array (
19
  'classname' => 'customMetaWidget',
20
+ 'description' => __( 'Clone of the standard Meta widget with options to show or hide log in/out, admin, feed, WordPress/custom links.' )
21
  );
22
 
23
  $this->WP_Widget( 'customMetaWidget', 'Custom Meta', $widget_ops );
27
  function form( $instance ) {
28
  // set default form values
29
  $instance = wp_parse_args( ( array ) $instance, array (
30
+ 'title' => __( 'Meta' ),
31
  'register' => 1,
32
  'login' => 1,
33
  'entryrss' => 1,
42
  // output HTML for the options form ?>
43
  <!-- title -->
44
  <p>
45
+ <label for="<?php echo $this->get_field_name( 'title' ); ?>"><?php _e( 'Title' ); ?>:</label>
46
  <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />
47
  </p>
48
 
49
  <!-- register -->
50
  <p>
51
+ <label for="<?php echo $this->get_field_name( 'register' ); ?>"><?php _e( 'Show "Register/Admin" link?' ); ?></label>
52
  <input id="<?php echo $this->get_field_id( 'register' ); ?>" name="<?php echo $this->get_field_name( 'register' ); ?>" type="checkbox" value="1" <?php checked( $instance['register'] ); ?> />
53
  </p>
54
 
55
  <!-- login -->
56
  <p>
57
+ <label for="<?php echo $this ->get_field_name( 'login' ); ?>"><?php _e( 'Show "Log in/out" link?' ); ?></label>
58
  <input id="<?php echo $this->get_field_id( 'login' ); ?>" name="<?php echo $this->get_field_name( 'login' ); ?>" type="checkbox" value="1" <?php checked( $instance['login'] ); ?> />
59
  </p>
60
 
61
  <!-- entry RSS -->
62
  <p>
63
+ <label for="<?php echo $this->get_field_name( 'entryrss' ); ?>"><?php _e( 'Show "Entries RSS" link?' ); ?></label>
64
  <input id="<?php echo $this->get_field_id( 'entryrss' ); ?>" name="<?php echo $this->get_field_name( 'entryrss' ); ?>" type="checkbox" value="1" <?php checked( $instance['entryrss'] ); ?> />
65
  </p>
66
 
67
  <!-- comment RSS -->
68
  <p>
69
+ <label for="<?php echo $this->get_field_name( 'commentrss' ); ?>"><?php _e( 'Show "Comments RSS" link?' ); ?></label>
70
  <input id="<?php echo $this->get_field_id( 'commentrss' ); ?>" name="<?php echo $this->get_field_name( 'commentrss' ); ?>" type="checkbox" value="1" <?php checked( $instance['commentrss'] ); ?> />
71
  </p>
72
 
73
  <!-- wordpress -->
74
  <p>
75
+ <label for="<?php echo $this->get_field_name( 'wordpress' ); ?>"><?php _e( 'Show "Wordpress" link?'); ?></label>
76
  <input id="<?php echo $this->get_field_id( 'wordpress' ); ?>" name="<?php echo $this->get_field_name( 'wordpress' ); ?>" type="checkbox" value="1" <?php checked( $instance['wordpress'] ); ?> />
77
  </p>
78
 
79
  <!-- custom -->
80
  <p>
81
+ <label for="<?php echo $this->get_field_name( 'showcustom' ); ?>"><?php _e( 'Show Custom link?'); ?>&nbsp;</label>
82
  <input id="<?php echo $this->get_field_id( 'showcustom' ); ?>" name="<?php echo $this->get_field_name( 'showcustom' ); ?>" type="checkbox" value="1" <?php checked( $instance['showcustom'] ); ?> />
83
 
84
  <div style="margin-left:20px;">
85
+ <label for="<?php echo $this->get_field_name( 'customurl' ); ?>"><?php _e( 'URL' ); ?>:&nbsp;</label>
86
  <input id="<?php echo $this->get_field_id( 'customurl' ); ?>" name="<?php echo $this->get_field_name( 'customurl' ); ?>" type="text" value="<?php echo esc_attr( $instance['customurl'] ); ?>" />
87
  </div>
88
 
89
  <div style="margin-left:20px;">
90
+ <label for="<?php echo $this->get_field_name( 'customtext' ); ?>"><?php _e( 'Text' ); ?>:&nbsp;&nbsp;</label>
91
  <input id="<?php echo $this->get_field_id( 'customtext' ); ?>" name="<?php echo $this->get_field_name( 'customtext' ); ?>" type="text" value="<?php echo esc_attr( $instance['customtext'] ); ?>" />
92
  </div>
93
  </p>
94
 
95
  <!-- linklove -->
96
  <p>
97
+ <label for="<?php echo $this->get_field_name( 'linklove' ); ?>"><?php _e( 'Show Plugin link?' ); ?>&nbsp;</label>
98
  <input id="<?php echo $this->get_field_id( 'linklove' ); ?>" name="<?php echo $this->get_field_name( 'linklove' ); ?>" type="checkbox" value="1" <?php checked( $instance['linklove'] ); ?> />
99
  <br />
100
+ <small>(<?php _e( 'An awesome way to support this free plugin!' ); ?>)</small></p>
101
 
102
  <?php // check for errors
103
  if ( esc_attr($instance['showcustom']) ) { // IF 'showcustom' is checked, AND
104
 
105
  // 1. no link and no URL
106
  if( empty($instance['customtext']) && empty($instance['customurl']) )
107
+ echo '<p style="color:#FF0000; font-weight:bold;" >' . __( 'You have a custom link with no URL or text!' ) . '</p>';
108
  // 2. no link
109
  else if ( empty($instance['customtext']) )
110
+ echo '<p style="color:#FF0000; font-weight:bold;" >' . __( 'You have a custom link with no text!') . '</p>';
111
 
112
  // 3. no url
113
  else if ( empty($instance['customurl']) )
114
+ echo '<p style="color:#FF0000; font-weight:bold;" >' . __( 'You have a custom link with no URL!') . '</p>';
115
  }
116
  }
117
 
166
  if( esc_attr( $instance['entryrss'] ) ) {
167
  echo '<li><a href="';
168
  bloginfo( 'rss2_url' );
169
+ echo '" title="' . __( 'Syndicate this site using RSS 2.0' ) . '">' . __( 'Entries' ) . ' <abbr title="' . __( 'Really Simple Syndication' ) . '">RSS</abbr></a></li>';
170
  }
171
 
172
  // 4. comments RSS link
173
  if( esc_attr( $instance['commentrss'] ) ) {
174
  echo '<li><a href="';
175
  bloginfo( 'comments_rss2_url' );
176
+ echo '" title="' . __( 'Syndicate this site using RSS 2.0' ) . '">' . __( 'Comments' ) . ' <abbr title="' . __( 'Really Simple Syndication' ) . '">RSS</abbr></a></li>';
177
  }
178
 
179
  // 5. wordpress.org link
180
+ if( esc_attr( $instance['wordpress'] ) ) echo '<li><a href="http://wordpress.org/" title="' . __( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ) . '">WordPress.org</a></li>';
181
 
182
  // 6. custom link
183
  if( esc_attr( $instance['showcustom'] ) ) {
185
  if( !empty( $instance['customtext'] ) && !empty( $instance['customurl'] ) ) echo '<li><a href="' . esc_attr( $instance['customurl'] ) . '">' . esc_attr( $instance['customtext'] ) . '</a></li>';
186
  // otherwise insert error comment
187
  else echo '
188
+ <!-- ' . __( 'Error: "Show Custom Link" is checked, but either the text or URL for that link are not specified. The link was not displayed because it would be broken. Check the settings for your Custom Meta widget.' ) . ' -->
 
189
  ';
190
  }
191
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://wikiduh.com/donate
5
  Tags: meta, hide, link, admin, simple, widget, default, wordpress.org, change, rss, remove, login
6
  Requires at least: 2.8
7
  Tested up to: 3.3.1
8
- Stable tag: 1.3.2
9
 
10
  Clone of the standard Meta widget plus options to hide log in/out, admin, feed and Wordpress.org/custom links.
11
 
@@ -47,6 +47,9 @@ Most people, myself included, are understandably reluctant to donate real curren
47
  3. Comparison of options between the standard and Custom Meta Widget.
48
 
49
  == Changelog ==
 
 
 
50
  = 1.3.2 =
51
  * Added additional error handling for the custom link url input.
52
  * Added an option to beg you for link love (disabled by default, and not annoying).
@@ -75,6 +78,8 @@ Most people, myself included, are understandably reluctant to donate real curren
75
  * There may still be bugs, but I can't find any.
76
 
77
  == Upgrade Notice ==
 
 
78
 
79
  = 1.3.2 =
80
  Adds some more error handling, small cosmetic tweaks, and shameless self-promotion.
5
  Tags: meta, hide, link, admin, simple, widget, default, wordpress.org, change, rss, remove, login
6
  Requires at least: 2.8
7
  Tested up to: 3.3.1
8
+ Stable tag: 1.3.3
9
 
10
  Clone of the standard Meta widget plus options to hide log in/out, admin, feed and Wordpress.org/custom links.
11
 
47
  3. Comparison of options between the standard and Custom Meta Widget.
48
 
49
  == Changelog ==
50
+ = 1.3.3 =
51
+ * Internationalized all displayed text.
52
+
53
  = 1.3.2 =
54
  * Added additional error handling for the custom link url input.
55
  * Added an option to beg you for link love (disabled by default, and not annoying).
78
  * There may still be bugs, but I can't find any.
79
 
80
  == Upgrade Notice ==
81
+ = 1.3.3 =
82
+ Adds internationalization, helpful for non-english users.
83
 
84
  = 1.3.2 =
85
  Adds some more error handling, small cosmetic tweaks, and shameless self-promotion.