Version Description
- Some formatting changes to bring closer alignment with the current vanilla WordPress Meta Widget.
- Added ability for links added to the meta widget by other themes/plugins as introduced in 4.4 via
wp_meta()
. - Added compatibility with some new filters introduced since the last major update.
- General code clean-up and modernization.
Download this release
Release Info
Developer | bitacre |
Plugin | Custom Meta Widget |
Version | 1.5.0 |
Comparing to | |
See all releases |
Code changes from version 1.4.8 to 1.5.0
- customMeta.php +130 -98
- readme.txt +221 -213
customMeta.php
CHANGED
@@ -2,50 +2,134 @@
|
|
2 |
Plugin Name: Custom Meta Widget
|
3 |
Plugin URI: http://shinraholdings.com/plugins/custom-meta-widget/
|
4 |
Description: Clone of the standard Meta widget with options to hide thlogin, admin, entry and comment feed, WordPress.org and /custom links.
|
5 |
-
Version: 1.
|
6 |
Author: bitacre
|
7 |
Author URI: http://shinraholdings.com/
|
8 |
License: GPLv2
|
9 |
-
Copyright
|
10 |
*/
|
11 |
|
12 |
-
/**
|
13 |
-
* CLASS customMetaWidget
|
14 |
-
*/
|
15 |
-
class customMetaWidget extends WP_Widget { // start of class
|
16 |
|
17 |
-
/**
|
18 |
-
* Initialize Classwide Variables
|
19 |
-
*/
|
20 |
-
var $homepage = 'http://shinraholdings.com/plugins/custom-meta-widget/';
|
21 |
|
22 |
/**
|
23 |
-
*
|
24 |
*
|
25 |
-
*
|
26 |
-
*
|
27 |
*/
|
28 |
-
|
29 |
-
|
30 |
-
$
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
-
// extend widget
|
36 |
-
parent::__construct( 'customMetaWidget', __('Custom Meta', 'customMetaWidget'), $widget_ops );
|
37 |
}
|
38 |
|
39 |
|
40 |
/**
|
41 |
-
*
|
42 |
-
* (not part of WP_Widget class)
|
43 |
*/
|
44 |
function get_options() {
|
45 |
$keys = array( 'slug', 'type', 'default', 'label', 'before' );
|
46 |
-
|
47 |
-
$values = array(
|
48 |
-
'title' => array( 'title', 'text', __( 'Meta', 'customMetaWidget' ), __( 'Title', 'customMetaWidget' ), '' ),
|
49 |
'register' => array( 'register', 'checkbox', 1, __( 'Show "Register/Admin" link?', 'customMetaWidget' ), '' ),
|
50 |
'login' => array( 'login', 'checkbox', 1, __( 'Show "Log in/out" link?', 'customMetaWidget' ), '' ),
|
51 |
'entryrss' => array( 'entryrss', 'checkbox', 1, __( 'Show "Entries RSS" link?', 'customMetaWidget' ), '' ),
|
@@ -56,7 +140,7 @@ function get_options() {
|
|
56 |
'customtext' => array( 'customtext', 'text', '', __( 'Text', 'customMetaWidget' ), ' style="margin-left:20px;"' ),
|
57 |
'linklove' => array( 'linklove', 'checkbox', 0, '<small>' . __( 'An awesome way to support this free plugin!', 'customMetaWidget' ) . '</small>', '' )
|
58 |
);
|
59 |
-
|
60 |
// build into multi-array
|
61 |
$options = array();
|
62 |
foreach( $values as $slug => $sub_values ) {
|
@@ -64,7 +148,7 @@ function get_options() {
|
|
64 |
for( $i=0; $i<5; $i++ )
|
65 |
$temp[$keys[$i]] = $sub_values[$i];
|
66 |
$options[$slug] = $temp;
|
67 |
-
}
|
68 |
return $options;
|
69 |
}
|
70 |
|
@@ -75,7 +159,7 @@ function get_options() {
|
|
75 |
*/
|
76 |
function get_defaults() {
|
77 |
// create container and loop
|
78 |
-
$defaults = array();
|
79 |
foreach( $this->get_options() as $key => $value )
|
80 |
$defaults[$key] = $value['default'];
|
81 |
return $defaults;
|
@@ -88,7 +172,7 @@ function get_defaults() {
|
|
88 |
*/
|
89 |
function get_keys() {
|
90 |
// create container and loop
|
91 |
-
$keys = array();
|
92 |
foreach( $this->get_options() as $key => $value )
|
93 |
$keys[] = $key;
|
94 |
return $keys;
|
@@ -98,9 +182,9 @@ function get_keys() {
|
|
98 |
/**
|
99 |
* Draw Widget Options
|
100 |
*/
|
101 |
-
function form( $instance ) {
|
102 |
// parse instance values over defaults
|
103 |
-
$instance = wp_parse_args( ( array ) $instance, $this->get_defaults() );
|
104 |
|
105 |
// loop through input option
|
106 |
foreach( $this->get_options() as $slug => $value ) :
|
@@ -118,98 +202,46 @@ function form( $instance ) {
|
|
118 |
$label_tag = '<label style="margin:0 3px;" for="' . $id . '">' . $label . '</label>';
|
119 |
?>
|
120 |
|
121 |
-
|
122 |
<!-- <?php echo $slug; ?> -->
|
123 |
-
|
124 |
<p<?php echo $before; ?>><?php echo ( $type == 'text' ? $label_tag : '' ); ?><input class="<?php echo ( $type == 'text' ? 'widefat' : 'check' ); ?>" id="<?php echo $id; ?>" name="<?php echo $name; ?>" type="<?php echo $type; ?>" value="<?php echo $value; ?>" <?php echo $checked; ?>/><?php echo ( $type == 'checkbox' ? $label_tag : '' ); ?></p>
|
125 |
-
|
126 |
-
<?php endforeach; ?>
|
127 |
|
128 |
-
|
129 |
|
130 |
<?php // check for errors
|
131 |
if( $instance['showcustom'] ) { // IF 'showcustom' is checked, AND
|
132 |
-
|
133 |
-
|
|
|
134 |
$message = 'You have a custom link with no URL or text!';
|
135 |
-
|
136 |
-
|
|
|
137 |
$message = 'You have a custom link with no text!';
|
138 |
-
|
139 |
-
elseif( empty( $instance['customurl' ] ) )
|
140 |
$message = 'You have a custom link with no URL!';
|
141 |
-
|
142 |
}
|
|
|
143 |
if( isset( $message ) ) // set message (or don't)
|
144 |
echo '<p style="color:#f00; font-weight:bold;" >' . __( $message, 'customMetaWidget' ) . '</p>';
|
145 |
}
|
146 |
|
147 |
|
148 |
/**
|
149 |
-
* SAVE WIDGET OPTIONS
|
150 |
*/
|
151 |
function update( $new_instance, $old_instance) {
|
152 |
$instance = $old_instance; // move over unchanged
|
153 |
-
|
154 |
foreach( $this->get_keys() as $key ) // parse new values over
|
155 |
$instance[$key] = $new_instance[$key];
|
156 |
|
157 |
return $instance;
|
158 |
}
|
159 |
|
160 |
-
// ACTUAL WIDGET OUTPUT
|
161 |
-
function widget( $args, $instance ) {
|
162 |
-
extract( $args, EXTR_SKIP ); // extract arguments
|
163 |
-
$title = empty( $instance['title'] ) ? __( 'Meta', 'customMetaWidget' ) : apply_filters( 'widget_title', $instance['title'] ); // if no title, use default ?>
|
164 |
-
|
165 |
-
<!--
|
166 |
-
<?php _e( 'Plugin: Custom Meta Widget', 'customMetaWidget' ); ?>
|
167 |
-
<?php _e( 'Plugin URL', 'customMetaWidget' ); ?>: <?php echo $this->homepage; ?>
|
168 |
-
-->
|
169 |
-
|
170 |
-
|
171 |
-
<?php echo $before_widget; // (from theme) ?>
|
172 |
-
<?php echo $before_title . esc_attr( $instance['title'] ) . $after_title; ?>
|
173 |
-
<ul>
|
174 |
-
|
175 |
-
|
176 |
-
<?php // ADD LINKS
|
177 |
-
$content = array(
|
178 |
-
'register' => wp_register( '<li>', '</li>', false ),
|
179 |
-
|
180 |
-
'login' => '<li>' . wp_loginout( NULL, false ) . '</li>',
|
181 |
-
|
182 |
-
'entryrss' => sprintf( __( '%1$sSyndicate this site using RSS 2.0%2$sEntries %3$sRSS%4$s', 'customMetaWidget' ),
|
183 |
-
'<li><a href="' . get_bloginfo( 'rss2_url' ) . '" title="', '">',
|
184 |
-
'<abbr title="' . __( 'Really Simple Syndication', 'customMetaWidget' ) . '">', '</abbr></a></li>' ),
|
185 |
-
|
186 |
-
'commentrss' => sprintf( __( '%1$sSyndicate this site using RSS 2.0%2$sComments %3$sRSS%4$s', 'customMetaWidget' ),
|
187 |
-
'<li><a href="' . get_bloginfo( 'comments_rss2_url' ) . '" title="', '">',
|
188 |
-
'<abbr title="' . __( 'Really Simple Syndication', 'customMetaWidget' ) . '">', '</abbr></a></li>' ),
|
189 |
-
|
190 |
-
'wordpress' => '<li><a href="http://wordpress.org/" title="' .
|
191 |
-
__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.', 'customMetaWidget' ) .
|
192 |
-
'">WordPress.org</a></li>',
|
193 |
-
|
194 |
-
'showcustom' => ( !empty( $instance['customtext'] ) && !empty( $instance['customurl'] ) ?
|
195 |
-
'<li><a href="' . esc_url( $instance['customurl'] ) . '">' . esc_attr( $instance['customtext'] ) . '</a></li>' :
|
196 |
-
'<!--' . __( '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.', 'customMetaWidget' ) . '-->' ),
|
197 |
-
|
198 |
-
'linklove' => '<li><a href="' . $this->homepage . '" title="' . __( 'WordPress Plugin Homepage', 'customMetaWidget' ) . '">' . __( 'Custom Meta', 'customMetaWidget' ) . '</a></li>'
|
199 |
-
|
200 |
-
);
|
201 |
-
|
202 |
-
|
203 |
-
foreach( $content as $checked => $output )
|
204 |
-
if( (int) esc_attr( $instance[$checked] ) === 1 ) echo $output; ?>
|
205 |
-
|
206 |
-
</ul>
|
207 |
-
|
208 |
-
<?php echo $after_widget;
|
209 |
-
|
210 |
-
}
|
211 |
|
212 |
-
} // end class
|
213 |
|
214 |
|
215 |
/**
|
2 |
Plugin Name: Custom Meta Widget
|
3 |
Plugin URI: http://shinraholdings.com/plugins/custom-meta-widget/
|
4 |
Description: Clone of the standard Meta widget with options to hide thlogin, admin, entry and comment feed, WordPress.org and /custom links.
|
5 |
+
Version: 1.5.0
|
6 |
Author: bitacre
|
7 |
Author URI: http://shinraholdings.com/
|
8 |
License: GPLv2
|
9 |
+
Copyright 2018 Shinra Web Holdings (http://shinraholdings.com)
|
10 |
*/
|
11 |
|
|
|
|
|
|
|
|
|
12 |
|
|
|
|
|
|
|
|
|
13 |
|
14 |
/**
|
15 |
+
* Class used to implement a Meta widget instead of extended the core Widget Class.
|
16 |
*
|
17 |
+
* @ TODO Extends WP_Widget_Meta directly?
|
18 |
+
* @since 4.4.0
|
19 |
*/
|
20 |
+
class customMetaWidget extends WP_Widget
|
21 |
+
{
|
22 |
+
var $homepage = 'http://shinraholdings.com/plugins/custom-meta-widget/';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Sets up a new widget instance
|
26 |
+
*
|
27 |
+
* Thank you to dsmiller for fixing the deprecated constructor
|
28 |
+
*
|
29 |
+
* @See https://wordpress.org/support/topic/updated-constructor?replies=4#post-8147479
|
30 |
+
*/
|
31 |
+
public function __construct() {
|
32 |
+
// set widget options
|
33 |
+
$widget_ops = array (
|
34 |
+
'classname' => 'customMetaWidget',
|
35 |
+
'description' => __( 'Hide the individual log in/out, admin, feed and WordPress links', 'customMetaWidget' ),
|
36 |
+
'customize_selective_refresh' => true
|
37 |
+
);
|
38 |
+
parent::__construct( 'customMetaWidget', __('Custom Meta', 'customMetaWidget'), $widget_ops );
|
39 |
+
}
|
40 |
+
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Outputs the content for the current Custom Meta widget instance.
|
44 |
+
*
|
45 |
+
* @param array $args Display arguments ('before_title', 'after_title', 'before_widget', 'after_widget')
|
46 |
+
* @param array $instance Settings for the current Custom Meta widget instance.
|
47 |
+
*/
|
48 |
+
public function widget( $args, $instance ) {
|
49 |
+
// extract( $args, EXTR_SKIP ); // extract arguments
|
50 |
+
|
51 |
+
/** If no title, use default */
|
52 |
+
$title = ! empty( $instance['title'] ) ? $instance['title'] : __( 'Meta', 'customMetaWidget' );
|
53 |
+
|
54 |
+
/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
|
55 |
+
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
|
56 |
+
|
57 |
+
/** Before widgets filter */
|
58 |
+
echo '<!--' . PHP_EOL . __( 'Plugin: Custom Meta Widget', 'customMetaWidget' ) . PHP_EOL .
|
59 |
+
__( 'Plugin URL', 'customMetaWidget' ) . ': ' . $this->homepage .
|
60 |
+
PHP_EOL . '-->' . PHP_EOL . $args['before_widget'];
|
61 |
+
|
62 |
+
/** Title filter */
|
63 |
+
if ( $title ) { echo $args['before_title'] . $title . $args['after_title']; }
|
64 |
+
|
65 |
+
?>
|
66 |
+
<ul>
|
67 |
+
|
68 |
+
<?php if( (int) esc_attr( $instance['register'] ) === 1 ) : wp_register(); endif; ?>
|
69 |
+
|
70 |
+
<?php if( (int) esc_attr( $instance['login'] ) === 1 ) : ?>
|
71 |
+
<li><?php wp_loginout(); ?></li>
|
72 |
+
<?php endif; ?>
|
73 |
+
|
74 |
+
<?php if( (int) esc_attr( $instance['entryrss'] ) === 1 ): ?>
|
75 |
+
<li><a href="<?php echo esc_url( get_bloginfo( 'rss2_url' ) ); ?>"><?php
|
76 |
+
_e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
|
77 |
+
<?php endif; ?>
|
78 |
+
|
79 |
+
|
80 |
+
<?php if( (int) esc_attr( $instance['commentrss'] ) === 1 ): ?>
|
81 |
+
|
82 |
+
<li><a href="<?php echo esc_url( get_bloginfo( 'comments_rss2_url' ) ); ?>"><?php
|
83 |
+
_e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
|
84 |
+
<?php endif; ?>
|
85 |
+
|
86 |
+
<?php if( (int) esc_attr( $instance['wordpress'] ) === 1 ):
|
87 |
+
/**
|
88 |
+
* Filters the "Powered by WordPress" text in the Meta widget.
|
89 |
+
*
|
90 |
+
* @since 3.6.0
|
91 |
+
* @since 4.9.0 Added the `$instance` parameter.
|
92 |
+
*
|
93 |
+
* @param string $title_text Default title text for the WordPress.org link.
|
94 |
+
* @param array $instance Array of settings for the current widget.
|
95 |
+
*/
|
96 |
+
echo apply_filters( 'widget_meta_poweredby', sprintf( '<li><a href="%s" title="%s">%s</a></li>',
|
97 |
+
esc_url( __( 'https://wordpress.org/' ) ),
|
98 |
+
esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ),
|
99 |
+
_x( 'WordPress.org', 'meta widget link text' )
|
100 |
+
), $instance );
|
101 |
+
endif;
|
102 |
+
|
103 |
+
// @TODO Integrate this into wp_meta()
|
104 |
+
if( (int) esc_attr( $instance['show_custom'] ) === 1 ) :
|
105 |
+
echo ( !empty( $instance['customtext'] ) && !empty( $instance['customurl'] ) ?
|
106 |
+
'<li><a href="' . esc_url( $instance['customurl'] ) . '">' . esc_attr( $instance['customtext'] ) . '</a></li>' :
|
107 |
+
'<!--' . __( '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.', 'customMetaWidget' ) . '-->' );
|
108 |
+
endif;
|
109 |
+
|
110 |
+
if( (int) esc_attr( $instance['linklove'] ) === 1 ):
|
111 |
+
echo '<li><a href="' . $this->homepage . '" title="' . __( 'WordPress Plugin Homepage', 'customMetaWidget' ) . '">' . __( 'Custom Meta', 'customMetaWidget' ) . '</a></li>';
|
112 |
+
endif;
|
113 |
+
|
114 |
+
wp_meta();
|
115 |
+
|
116 |
+
?>
|
117 |
+
</ul>
|
118 |
+
|
119 |
+
<?php echo $args['after_widget'];
|
120 |
|
|
|
|
|
121 |
}
|
122 |
|
123 |
|
124 |
/**
|
125 |
+
* Declare Form Input Options
|
126 |
+
* (not part of vanilla WP_Widget class)
|
127 |
*/
|
128 |
function get_options() {
|
129 |
$keys = array( 'slug', 'type', 'default', 'label', 'before' );
|
130 |
+
|
131 |
+
$values = array(
|
132 |
+
'title' => array( 'title', 'text', __( 'Meta', 'customMetaWidget' ), __( 'Title', 'customMetaWidget' ), '' ),
|
133 |
'register' => array( 'register', 'checkbox', 1, __( 'Show "Register/Admin" link?', 'customMetaWidget' ), '' ),
|
134 |
'login' => array( 'login', 'checkbox', 1, __( 'Show "Log in/out" link?', 'customMetaWidget' ), '' ),
|
135 |
'entryrss' => array( 'entryrss', 'checkbox', 1, __( 'Show "Entries RSS" link?', 'customMetaWidget' ), '' ),
|
140 |
'customtext' => array( 'customtext', 'text', '', __( 'Text', 'customMetaWidget' ), ' style="margin-left:20px;"' ),
|
141 |
'linklove' => array( 'linklove', 'checkbox', 0, '<small>' . __( 'An awesome way to support this free plugin!', 'customMetaWidget' ) . '</small>', '' )
|
142 |
);
|
143 |
+
|
144 |
// build into multi-array
|
145 |
$options = array();
|
146 |
foreach( $values as $slug => $sub_values ) {
|
148 |
for( $i=0; $i<5; $i++ )
|
149 |
$temp[$keys[$i]] = $sub_values[$i];
|
150 |
$options[$slug] = $temp;
|
151 |
+
}
|
152 |
return $options;
|
153 |
}
|
154 |
|
159 |
*/
|
160 |
function get_defaults() {
|
161 |
// create container and loop
|
162 |
+
$defaults = array();
|
163 |
foreach( $this->get_options() as $key => $value )
|
164 |
$defaults[$key] = $value['default'];
|
165 |
return $defaults;
|
172 |
*/
|
173 |
function get_keys() {
|
174 |
// create container and loop
|
175 |
+
$keys = array();
|
176 |
foreach( $this->get_options() as $key => $value )
|
177 |
$keys[] = $key;
|
178 |
return $keys;
|
182 |
/**
|
183 |
* Draw Widget Options
|
184 |
*/
|
185 |
+
function form( $instance ) {
|
186 |
// parse instance values over defaults
|
187 |
+
$instance = wp_parse_args( ( array ) $instance, $this->get_defaults() );
|
188 |
|
189 |
// loop through input option
|
190 |
foreach( $this->get_options() as $slug => $value ) :
|
202 |
$label_tag = '<label style="margin:0 3px;" for="' . $id . '">' . $label . '</label>';
|
203 |
?>
|
204 |
|
|
|
205 |
<!-- <?php echo $slug; ?> -->
|
206 |
+
|
207 |
<p<?php echo $before; ?>><?php echo ( $type == 'text' ? $label_tag : '' ); ?><input class="<?php echo ( $type == 'text' ? 'widefat' : 'check' ); ?>" id="<?php echo $id; ?>" name="<?php echo $name; ?>" type="<?php echo $type; ?>" value="<?php echo $value; ?>" <?php echo $checked; ?>/><?php echo ( $type == 'checkbox' ? $label_tag : '' ); ?></p>
|
|
|
|
|
208 |
|
209 |
+
<?php endforeach; ?>
|
210 |
|
211 |
<?php // check for errors
|
212 |
if( $instance['showcustom'] ) { // IF 'showcustom' is checked, AND
|
213 |
+
|
214 |
+
// 1. no link and no URL
|
215 |
+
if( empty( $instance['customtext']) && empty( $instance['customurl'] ) )
|
216 |
$message = 'You have a custom link with no URL or text!';
|
217 |
+
|
218 |
+
// 2. no link
|
219 |
+
elseif( empty( $instance['customtext'] ) )
|
220 |
$message = 'You have a custom link with no text!';
|
221 |
+
// 3. no url
|
222 |
+
elseif( empty( $instance['customurl' ] ) )
|
223 |
$message = 'You have a custom link with no URL!';
|
|
|
224 |
}
|
225 |
+
|
226 |
if( isset( $message ) ) // set message (or don't)
|
227 |
echo '<p style="color:#f00; font-weight:bold;" >' . __( $message, 'customMetaWidget' ) . '</p>';
|
228 |
}
|
229 |
|
230 |
|
231 |
/**
|
232 |
+
* SAVE WIDGET OPTIONS
|
233 |
*/
|
234 |
function update( $new_instance, $old_instance) {
|
235 |
$instance = $old_instance; // move over unchanged
|
236 |
+
|
237 |
foreach( $this->get_keys() as $key ) // parse new values over
|
238 |
$instance[$key] = $new_instance[$key];
|
239 |
|
240 |
return $instance;
|
241 |
}
|
242 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
|
244 |
+
} // end class
|
245 |
|
246 |
|
247 |
/**
|
readme.txt
CHANGED
@@ -1,213 +1,221 @@
|
|
1 |
-
=== Custom Meta Widget ===
|
2 |
-
Plugin URI: http://shinraholdings.com/plugins/custom-meta-widget/
|
3 |
-
Contributors: bitacre
|
4 |
-
Donate link: http://shinraholdings.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: 4.
|
8 |
-
Stable tag: 1.
|
9 |
-
|
10 |
-
Clone of the standard Meta widget plus options to hide log in/out, admin, feed and WordPress.org/custom links.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
This plugin acts in exactly the same way as the standard Meta widget except that it adds options which allow you control which of the 5 standard Meta widget links should be displayed, with the additional option to add your own custom link.
|
14 |
-
|
15 |
-
The standard Meta widget that comes with WordPress offers no customization and requires you to show all 5 of the standard links (register, login, entries RSS, comments RSS, and WordPress.org).
|
16 |
-
|
17 |
-
== Installation ==
|
18 |
-
1. Download the latest zip file and extract the `custom-meta-widget` directory.
|
19 |
-
2. Upload this directory inside your `/wp-content/plugins/` directory.
|
20 |
-
3. Activate the 'Custom Meta Widget' on the 'Plugins' menu in WordPress.
|
21 |
-
4. Add the 'Custom Meta' widget to your sidebar (using the Appearance > Widgets menu) and choose which customizations you would like.
|
22 |
-
|
23 |
-
== Frequently Asked Questions ==
|
24 |
-
= Why does my Meta widget look the same? =
|
25 |
-
This plugin does not modify the standard WordPress Meta widget. It is a completely separate widget titled 'Custom Meta.' If you are currently using the standard Meta widget, you will have to remove it from your sidebar and replace it with the Custom Meta widget using the Appearance > Widgets menu.
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
*
|
53 |
-
*
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
*
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
*
|
67 |
-
* Added
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
*
|
72 |
-
*
|
73 |
-
|
74 |
-
= 1.4.
|
75 |
-
*
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
*
|
84 |
-
*
|
85 |
-
|
86 |
-
= 1.4.
|
87 |
-
*
|
88 |
-
*
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
*
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
*
|
111 |
-
|
112 |
-
= 1.3.
|
113 |
-
* Added error handling
|
114 |
-
*
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
*
|
119 |
-
*
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
*
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
*
|
129 |
-
|
130 |
-
= 1.
|
131 |
-
*
|
132 |
-
*
|
133 |
-
|
134 |
-
|
135 |
-
= 1.
|
136 |
-
*
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
*
|
204 |
-
|
205 |
-
|
206 |
-
*
|
207 |
-
|
208 |
-
|
209 |
-
* [
|
210 |
-
* [
|
211 |
-
|
212 |
-
|
213 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Custom Meta Widget ===
|
2 |
+
Plugin URI: http://shinraholdings.com/plugins/custom-meta-widget/
|
3 |
+
Contributors: bitacre
|
4 |
+
Donate link: http://shinraholdings.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: 4.9.4
|
8 |
+
Stable tag: 1.5.0
|
9 |
+
|
10 |
+
Clone of the standard Meta widget plus options to hide log in/out, admin, feed and WordPress.org/custom links.
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
This plugin acts in exactly the same way as the standard Meta widget except that it adds options which allow you control which of the 5 standard Meta widget links should be displayed, with the additional option to add your own custom link.
|
14 |
+
|
15 |
+
The standard Meta widget that comes with WordPress offers no customization and requires you to show all 5 of the standard links (register, login, entries RSS, comments RSS, and WordPress.org, as well as any links added by themes or other plugins).
|
16 |
+
|
17 |
+
== Installation ==
|
18 |
+
1. Download the latest zip file and extract the `custom-meta-widget` directory.
|
19 |
+
2. Upload this directory inside your `/wp-content/plugins/` directory.
|
20 |
+
3. Activate the 'Custom Meta Widget' on the 'Plugins' menu in WordPress.
|
21 |
+
4. Add the 'Custom Meta' widget to your sidebar (using the Appearance > Widgets menu) and choose which customizations you would like.
|
22 |
+
|
23 |
+
== Frequently Asked Questions ==
|
24 |
+
= Why does my Meta widget look the same? =
|
25 |
+
This plugin does not modify the standard WordPress Meta widget. It is a completely separate widget titled 'Custom Meta.' If you are currently using the standard Meta widget, you will have to remove it from your sidebar and replace it with the Custom Meta widget using the Appearance > Widgets menu.
|
26 |
+
|
27 |
+
It also looks identical to the standard Meta Widget unless you opt to change which links are shown/hidden in the Appearance > Widgets menu, under the expanded 'Custom Meta' widget.
|
28 |
+
|
29 |
+
= Which links can I hide/show? =
|
30 |
+
You can remove any, all, or none of the links which appear on the standard Meta widget. You are also able to add a custom link to the list if you wish.
|
31 |
+
|
32 |
+
= Why did you make this? =
|
33 |
+
I didn't like having the 'Comments RSS' link on the sidebar, but did like having the rest of them. I couldn't find a plugin to do that and manually editing the code to accomplish this, while simple, is a dirty hack that breaks with every WordPress update, so I created a crude plugin to remove just the 'Comments RSS' link. I then cleaned this up and added an options page for all the links so that no one else would have to do this in the future.
|
34 |
+
|
35 |
+
= Can you add this feature I just thought of? =
|
36 |
+
Can I? Yes. Will I? Yes, if I think it would be a helpful addition. I'm trying to keep things clean and simple, but there's always room for improvement, so let me know if you think a feature is lacking!
|
37 |
+
|
38 |
+
= Will vanilla WordPress ever implement some variation of this? =
|
39 |
+
I don't know man. They haven't yet, so it doesn't look very likely. But I think they should and I would be glad if they did.
|
40 |
+
|
41 |
+
= Why did you add an option to link to the plugin site, you horrible sellout? =
|
42 |
+
Most people, myself included, are understandably reluctant to donate real currency for free stuff. However, putting a link to my site from your site is just as helpful and a much more comfortable and forthcoming mode of charity, especially in the webmaster community. Also, because I'm a horrible sellout.
|
43 |
+
|
44 |
+
== Screenshots ==
|
45 |
+
1. The widget's options page on the Appearance > Widgets menu.
|
46 |
+
2. The widget displayed on the sidebar with 3 links hidden and a custom link added.
|
47 |
+
3. Comparison of options between the standard and Custom Meta Widget.
|
48 |
+
|
49 |
+
== Changelog ==
|
50 |
+
= 1.5.0 =
|
51 |
+
* Some formatting changes to bring closer alignment with the current vanilla WordPress Meta Widget.
|
52 |
+
* Added ability for links added to the meta widget by other themes/plugins as introduced in 4.4 via `wp_meta()`.
|
53 |
+
* Added compatibility with some new filters introduced since the last major update.
|
54 |
+
* General code clean-up and modernization.
|
55 |
+
|
56 |
+
= 1.4.8 =
|
57 |
+
* Updated deprecated __construct() method
|
58 |
+
* Thank you to [dsmiller](https://wordpress.org/support/topic/updated-constructor?replies=4#post-8147479)
|
59 |
+
|
60 |
+
= 1.4.7 =
|
61 |
+
* Purely cosmetic update for WordPress 4.4
|
62 |
+
|
63 |
+
= 1.4.6 =
|
64 |
+
* WordPress 3.6.1 update
|
65 |
+
* Added fr_FR (French) translation
|
66 |
+
* Added nl_NL (Dutch) translation
|
67 |
+
* Added pl_PL (Polish) translation
|
68 |
+
* Added sr_RS (Serbian) translation
|
69 |
+
|
70 |
+
= 1.4.5 =
|
71 |
+
* WordPress 3.5.1 update
|
72 |
+
* Added sk_SK (Slovak) translation
|
73 |
+
|
74 |
+
= 1.4.4 =
|
75 |
+
* Added de_DE (German) translation
|
76 |
+
* General update to language files
|
77 |
+
* Major code efficiency upgrades
|
78 |
+
|
79 |
+
= 1.4.3 =
|
80 |
+
* Small correction to the ru_RU (Russian) translation
|
81 |
+
|
82 |
+
= 1.4.2 =
|
83 |
+
* WordPress 3.5 update
|
84 |
+
* Added translations for ru_RU
|
85 |
+
|
86 |
+
= 1.4.1 =
|
87 |
+
* Added missed textdomains for more complete i18n
|
88 |
+
* Added translations for da_DK, en_NZ, en_PH, and en_NZ
|
89 |
+
* Updated/fixed all translation files
|
90 |
+
|
91 |
+
= 1.4.0 =
|
92 |
+
* Code efficiency improvements (better loops)
|
93 |
+
* Now removes default Meta Widget (to avoid confusion)
|
94 |
+
|
95 |
+
= 1.3.6 =
|
96 |
+
* Small metadata update
|
97 |
+
|
98 |
+
= 1.3.5_a =
|
99 |
+
* Updated for WordPress version 3.3.2
|
100 |
+
* Fixed the 1 missed textdomain for i18n
|
101 |
+
|
102 |
+
= 1.3.5 =
|
103 |
+
* Fixed typo introduced in i18n transition.
|
104 |
+
* Adds translation files for en-AU, en-CA, en-GB, en-IE, and es-MX.
|
105 |
+
|
106 |
+
= 1.3.4 =
|
107 |
+
* Fixed minor issues with i18n text domains.
|
108 |
+
|
109 |
+
= 1.3.3 =
|
110 |
+
* Internationalized all displayed text.
|
111 |
+
|
112 |
+
= 1.3.2 =
|
113 |
+
* Added additional error handling for the custom link url input.
|
114 |
+
* Added an option to beg you for link love (disabled by default, and not annoying).
|
115 |
+
* Slightly changed widget options to look more like the vanilla widget's.
|
116 |
+
|
117 |
+
= 1.3.1 =
|
118 |
+
* Added error handling to prevent blank custom links from being inserted on the sidebar.
|
119 |
+
* Cleaned up code formatting.
|
120 |
+
|
121 |
+
= 1.3 =
|
122 |
+
* Added a custom link option (disabled by default).
|
123 |
+
* Updated screenshots 1-3.
|
124 |
+
* Changed plugin name on Appearance > Widgets menu to 'Custom Meta' instead of 'Custom Meta Widget' which was redundant.
|
125 |
+
* Added additional code commenting.
|
126 |
+
|
127 |
+
= 1.2 =
|
128 |
+
* Fixed reference to non-existent instance error.
|
129 |
+
|
130 |
+
= 1.1 =
|
131 |
+
* Minor improvements to code architecture.
|
132 |
+
* Increased compliance with WordPress style standards.
|
133 |
+
* Significantly more code commenting.
|
134 |
+
|
135 |
+
= 1.0 =
|
136 |
+
* First released version.
|
137 |
+
* There may still be bugs, but I can't find any.
|
138 |
+
|
139 |
+
== Upgrade Notice ==
|
140 |
+
= 1.5.0 =
|
141 |
+
This update implements new functionality implemented after WordPress 4.4. If you are, amazingly, somehow, still using a version of WordPress older than 4.4, this may cause problems. (But if your install is *that* old, you already have problems :D)
|
142 |
+
|
143 |
+
= 1.4.8 =
|
144 |
+
Replaces deprecated function throwing debug error message
|
145 |
+
|
146 |
+
= 1.4.7 =
|
147 |
+
Purely cosmetic update for WordPress 4.4
|
148 |
+
|
149 |
+
= 1.4.6 =
|
150 |
+
Optional upgrade, new translations pl_PL (Polish), fr_FR (French), sr_RS (Serbian), and nl_NL (Dutch).
|
151 |
+
|
152 |
+
= 1.4.5 =
|
153 |
+
Optional upgrade, new translation sk_SK (Slovak).
|
154 |
+
|
155 |
+
= 1.4.4 =
|
156 |
+
Recommended upgrade, new languages and performance improvement.
|
157 |
+
|
158 |
+
= 1.4.3 =
|
159 |
+
Small correction to ru_RU (Russian) language translation files, recommended upgrade.
|
160 |
+
|
161 |
+
= 1.4.2 =
|
162 |
+
Russian language files and WordPress 3.5 compatibility update, not a critical upgrade.
|
163 |
+
|
164 |
+
= 1.4.1 =
|
165 |
+
Fixes some i18n issues and adds additional languages, recommended upgrade.
|
166 |
+
|
167 |
+
= 1.4.0 =
|
168 |
+
Improves code efficiency, new features, recommended upgrade.
|
169 |
+
|
170 |
+
= 1.3.6 =
|
171 |
+
Updated metadata, not an essential upgrade.
|
172 |
+
|
173 |
+
= 1.3.5_a =
|
174 |
+
Fixes one textdomain missed in the internationalization update and update for WordPress 3.3.2.
|
175 |
+
|
176 |
+
= 1.3.5 =
|
177 |
+
Adds translations for several languages.
|
178 |
+
|
179 |
+
= 1.3.4 =
|
180 |
+
Minor improvements to i18n for translators.
|
181 |
+
|
182 |
+
= 1.3.3 =
|
183 |
+
Adds internationalization, helpful for non-English users.
|
184 |
+
|
185 |
+
= 1.3.2 =
|
186 |
+
Adds some more error handling, small cosmetic tweaks, and shameless self-promotion.
|
187 |
+
|
188 |
+
= 1.3.1 =
|
189 |
+
Adds error handling if a custom link with no url/text is added.
|
190 |
+
|
191 |
+
= 1.3 =
|
192 |
+
Adds new custom link functionality.
|
193 |
+
|
194 |
+
= 1.2 =
|
195 |
+
Fixes a code error.
|
196 |
+
|
197 |
+
= 1.1 =
|
198 |
+
Not essential, no bug fixes just minor structural code changes. (Mostly a test of the SVN repository system which I am new at.)
|
199 |
+
|
200 |
+
== Translation Help ==
|
201 |
+
If you would like to help make this plugin available in your native language, please send your `.po` file to [plugins@shinraholdings.com](mailto:plugins@shinraholdings.com), and I will include it in the next version. The all the language files are in the `lang` subdirectory of the plugin.
|
202 |
+
|
203 |
+
* en_XX - [bitacre](mailto:lang@shinraholdings.com)
|
204 |
+
* da_DK - [Kris Thomsen](mailto:mail@kristhomsen.dk)
|
205 |
+
* ru_RU - VadDevArt
|
206 |
+
* de_DE - [Dr. Paolo Colombani](mailto:paolo.colombani@gmail.com)
|
207 |
+
* sk_SK - [Branco Radenovich](http://webhostinggeeks.com/user-reviews/)
|
208 |
+
* fr_FR - [Sylvain Taufour](mailto:sylvain.taufour@gmail.com)
|
209 |
+
* pl_PL - [Waldemar Jastalski](http://waldzias.p.ht/)
|
210 |
+
* nl_NL - [Niko Strijbol](mailto:strijbol.niko@gmail.com)
|
211 |
+
* sr_RS - [Diana S](http://wpdiscounts.com)
|
212 |
+
|
213 |
+
== Readme Generator ==
|
214 |
+
* This plugin's readme.txt file was generated by the [bitacre Readme Generator](http://shinraholdings.com/tools/readme-gen/) for WordPress Plugins.
|
215 |
+
|
216 |
+
== Support ==
|
217 |
+
* [Plugin Homepage](http://shinraholdings.com/plugins/custom-meta-widget/)
|
218 |
+
* [plugins@shinraholdings.com](mailto:plugins@shinraholdings.com)
|
219 |
+
|
220 |
+
== Donations ==
|
221 |
+
[Donations](http://shinraholdings.com/donate) are graciously accepted to support the continued development and maintenance of this and other plugins. We currently accept PayPal, link backs, and kind words. Also, checking the 'show plugin link' option on the widget helps us out greatly!
|