Version Description
- Released 20 October 2014
- Added a new filter to allow the "Override Avatar" interface to be hidden (and turned on my default).
Download this release
Release Info
Developer | ronalfy |
Plugin | User Profile Picture |
Version | 1.0.23 |
Comparing to | |
See all releases |
Code changes from version 1.0.22 to 1.0.23
- metronet-profile-picture.php +13 -4
- readme.txt +12 -2
metronet-profile-picture.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Metronet Profile Picture
|
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/metronet-profile-picture/
|
5 |
Description: Use the native WP uploader on your user profile page.
|
6 |
Author: Metronet
|
7 |
-
Version: 1.0.
|
8 |
Requires at least: 3.5
|
9 |
Author URI: http://www.metronet.no
|
10 |
Contributors: ronalfy, metronet
|
@@ -312,9 +312,9 @@ class Metronet_Profile_Picture {
|
|
312 |
?>
|
313 |
</a>
|
314 |
</div><!-- #metronet-profile-image -->
|
315 |
-
<div id="metronet-upload-link"
|
316 |
<div id="metronet-override-avatar">
|
317 |
-
<input type="hidden" name="metronet-user-avatar" value="off" />
|
318 |
<?php
|
319 |
//Get the user avatar override option - If not set, see if there's a filter override.
|
320 |
$user_avatar_override = get_user_option( 'metronet_avatar_override', $user_id );
|
@@ -324,8 +324,17 @@ class Metronet_Profile_Picture {
|
|
324 |
} else {
|
325 |
$checked = checked( true, apply_filters( 'mpp_avatar_override', false ), false );
|
326 |
}
|
|
|
|
|
|
|
|
|
327 |
?>
|
328 |
-
<input type="
|
|
|
|
|
|
|
|
|
|
|
329 |
</div><!-- #metronet-override-avatar -->
|
330 |
<div id="metronet-pte">
|
331 |
<?php echo $this->get_post_thumbnail_editor_link( $post_id ); ?>
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/metronet-profile-picture/
|
5 |
Description: Use the native WP uploader on your user profile page.
|
6 |
Author: Metronet
|
7 |
+
Version: 1.0.23
|
8 |
Requires at least: 3.5
|
9 |
Author URI: http://www.metronet.no
|
10 |
Contributors: ronalfy, metronet
|
312 |
?>
|
313 |
</a>
|
314 |
</div><!-- #metronet-profile-image -->
|
315 |
+
<div id="metronet-upload-link"><?php echo $upload_link; ?> - <span class="description"><?php esc_html_e( 'Select "Set profile image" after uploading to choose the profile image', 'metronet_profile_picture' ); ?></span></div><!-- #metronet-upload-link -->
|
316 |
<div id="metronet-override-avatar">
|
317 |
+
<input type="hidden" name="metronet-user-avatar" value="off" />
|
318 |
<?php
|
319 |
//Get the user avatar override option - If not set, see if there's a filter override.
|
320 |
$user_avatar_override = get_user_option( 'metronet_avatar_override', $user_id );
|
324 |
} else {
|
325 |
$checked = checked( true, apply_filters( 'mpp_avatar_override', false ), false );
|
326 |
}
|
327 |
+
|
328 |
+
//Filter for hiding the override interface. If this option is set to true, the mpp_avatar_override filter is ignored and override is enabled by default
|
329 |
+
$hide_override = apply_filters( 'mpp_hide_avatar_override', false );
|
330 |
+
if ( $hide_override ):
|
331 |
?>
|
332 |
+
<input type="hidden" name="metronet-user-avatar" id="metronet-user-avatar" value="on" />
|
333 |
+
<?php
|
334 |
+
else:
|
335 |
+
?>
|
336 |
+
<br /><input type="checkbox" name="metronet-user-avatar" id="metronet-user-avatar" value="on" <?php echo $checked; ?> /><label for="metronet-user-avatar"> <?php esc_html_e( "Override Avatar?", "metronet_profile_picture" ); ?></label>
|
337 |
+
<?php endif; ?>
|
338 |
</div><!-- #metronet-override-avatar -->
|
339 |
<div id="metronet-pte">
|
340 |
<?php echo $this->get_post_thumbnail_editor_link( $post_id ); ?>
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: metronet, ronalfy
|
|
3 |
Tags: users, user, user profile
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 4.0
|
6 |
-
Stable tag: 1.0.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -60,10 +60,13 @@ The `mt_profile_img` function internally uses the <a href="http://codex.wordpres
|
|
60 |
|
61 |
Optionally, if you choose the "Override Avatar" function, you can use <a href="http://codex.wordpress.org/Function_Reference/get_avatar">get_avatar</a> to retrieve the profile image.
|
62 |
|
63 |
-
If you want the "Override Avatar" checkbox to be checked by default, drop this into your theme's `functions.php` file
|
64 |
|
65 |
`add_filter( 'mpp_avatar_override', '__return_true' );`
|
66 |
|
|
|
|
|
|
|
67 |
== Frequently Asked Questions ==
|
68 |
|
69 |
= How do you set a user profile image? =
|
@@ -98,6 +101,10 @@ Yes, but you'll have to set a new profile image per site. This is currently a l
|
|
98 |
|
99 |
== Changelog ==
|
100 |
|
|
|
|
|
|
|
|
|
101 |
= 1.0.22 =
|
102 |
* Released 02 September 2014
|
103 |
* Added minor update to additional user meta for easier querying (props Solinx)
|
@@ -147,6 +154,9 @@ Yes, but you'll have to set a new profile image per site. This is currently a l
|
|
147 |
|
148 |
== Upgrade Notice ==
|
149 |
|
|
|
|
|
|
|
150 |
= 1.0.22 =
|
151 |
Added minor update to additional user meta for easier querying (props Solinx)
|
152 |
|
3 |
Tags: users, user, user profile
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 4.0
|
6 |
+
Stable tag: 1.0.23
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
60 |
|
61 |
Optionally, if you choose the "Override Avatar" function, you can use <a href="http://codex.wordpress.org/Function_Reference/get_avatar">get_avatar</a> to retrieve the profile image.
|
62 |
|
63 |
+
If you want the "Override Avatar" checkbox to be checked by default, drop this into your theme's `functions.php` file or <a href="http://www.wpbeginner.com/beginners-guide/what-why-and-how-tos-of-creating-a-site-specific-wordpress-plugin/">Site-specific plugin</a>:
|
64 |
|
65 |
`add_filter( 'mpp_avatar_override', '__return_true' );`
|
66 |
|
67 |
+
If you want to hide the "Override Avatar" checkbox, use this filter (the override functionality will be enabled by default):
|
68 |
+
`add_filter( 'mpp_hide_avatar_override', '__return_true' );`
|
69 |
+
|
70 |
== Frequently Asked Questions ==
|
71 |
|
72 |
= How do you set a user profile image? =
|
101 |
|
102 |
== Changelog ==
|
103 |
|
104 |
+
= 1.0.23 =
|
105 |
+
* Released 20 October 2014
|
106 |
+
* Added a new filter to allow the "Override Avatar" interface to be hidden (and turned on my default).
|
107 |
+
|
108 |
= 1.0.22 =
|
109 |
* Released 02 September 2014
|
110 |
* Added minor update to additional user meta for easier querying (props Solinx)
|
154 |
|
155 |
== Upgrade Notice ==
|
156 |
|
157 |
+
= 1.0.23 =
|
158 |
+
Added a new filter to allow the "Override Avatar" interface to be hidden (and turned on my default).
|
159 |
+
|
160 |
= 1.0.22 =
|
161 |
Added minor update to additional user meta for easier querying (props Solinx)
|
162 |
|