Version Description
- Released 13 May 2012.
- Added a filter for turning on "Override Avatar" by default.
Download this release
Release Info
Developer | ronalfy |
Plugin | User Profile Picture |
Version | 1.0.20 |
Comparing to | |
See all releases |
Code changes from version 1.0.19 to 1.0.20
- metronet-profile-picture.php +13 -3
- readme.txt +12 -1
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
|
@@ -311,7 +311,17 @@ class Metronet_Profile_Picture {
|
|
311 |
<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 -->
|
312 |
<div id="metronet-override-avatar">
|
313 |
<input type="hidden" name="metronet-user-avatar" value="off" /> -
|
314 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
</div><!-- #metronet-override-avatar -->
|
316 |
<div id="metronet-pte">
|
317 |
<?php echo $this->get_post_thumbnail_editor_link( $post_id ); ?>
|
@@ -331,7 +341,7 @@ class Metronet_Profile_Picture {
|
|
331 |
wp_enqueue_media( array( 'post' => $post_id ) );
|
332 |
|
333 |
$script_deps = array( 'media-editor' );
|
334 |
-
wp_enqueue_script( 'mt-pp', $this->get_plugin_url( '/js/mpp.js' ), $script_deps, '1.0.
|
335 |
wp_localize_script( 'mt-pp', 'metronet_profile_image',
|
336 |
array(
|
337 |
'set_profile_text' => __( 'Set profile image', '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.20
|
8 |
Requires at least: 3.5
|
9 |
Author URI: http://www.metronet.no
|
10 |
Contributors: ronalfy, metronet
|
311 |
<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 -->
|
312 |
<div id="metronet-override-avatar">
|
313 |
<input type="hidden" name="metronet-user-avatar" value="off" /> -
|
314 |
+
<?php
|
315 |
+
//Get the user avatar override option - If not set, see if there's a filter override.
|
316 |
+
$user_avatar_override = get_user_option( 'metronet_avatar_override', $user_id );
|
317 |
+
$checked = '';
|
318 |
+
if ( $user_avatar_override ) {
|
319 |
+
$checked = checked( 'on', $user_avatar_override, false );
|
320 |
+
} else {
|
321 |
+
$checked = checked( true, apply_filters( 'mpp_avatar_override', false ), false );
|
322 |
+
}
|
323 |
+
?>
|
324 |
+
<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>
|
325 |
</div><!-- #metronet-override-avatar -->
|
326 |
<div id="metronet-pte">
|
327 |
<?php echo $this->get_post_thumbnail_editor_link( $post_id ); ?>
|
341 |
wp_enqueue_media( array( 'post' => $post_id ) );
|
342 |
|
343 |
$script_deps = array( 'media-editor' );
|
344 |
+
wp_enqueue_script( 'mt-pp', $this->get_plugin_url( '/js/mpp.js' ), $script_deps, '1.0.20', true );
|
345 |
wp_localize_script( 'mt-pp', 'metronet_profile_image',
|
346 |
array(
|
347 |
'set_profile_text' => __( 'Set profile image', 'metronet_profile_picture' ),
|
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: 3.6
|
6 |
-
Stable tag: 1.0.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -60,6 +60,10 @@ 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 |
== Frequently Asked Questions ==
|
64 |
|
65 |
= How do you set a user profile image? =
|
@@ -93,6 +97,10 @@ Yes, but you'll have to set a new profile image per site. This is currently a l
|
|
93 |
3. Post Thumbnail Editor compatibility.
|
94 |
|
95 |
== Changelog ==
|
|
|
|
|
|
|
|
|
96 |
= 1.0.19 =
|
97 |
* Added support for 2.0.x version of <a href='http://wordpress.org/extend/plugins/post-thumbnail-editor/'>Post Thumbnail Editor</a>
|
98 |
|
@@ -130,6 +138,9 @@ Yes, but you'll have to set a new profile image per site. This is currently a l
|
|
130 |
|
131 |
== Upgrade Notice ==
|
132 |
|
|
|
|
|
|
|
133 |
= 1.0.19 =
|
134 |
Added support for version 2.0.x of Post Thumbnail Editor
|
135 |
|
3 |
Tags: users, user, user profile
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 3.6
|
6 |
+
Stable tag: 1.0.20
|
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:
|
64 |
+
|
65 |
+
`add_filter( 'mpp_avatar_override', '__return_true' );`
|
66 |
+
|
67 |
== Frequently Asked Questions ==
|
68 |
|
69 |
= How do you set a user profile image? =
|
97 |
3. Post Thumbnail Editor compatibility.
|
98 |
|
99 |
== Changelog ==
|
100 |
+
= 1.0.20 =
|
101 |
+
* Released 13 May 2012.
|
102 |
+
* Added a filter for turning on "Override Avatar" by default.
|
103 |
+
|
104 |
= 1.0.19 =
|
105 |
* Added support for 2.0.x version of <a href='http://wordpress.org/extend/plugins/post-thumbnail-editor/'>Post Thumbnail Editor</a>
|
106 |
|
138 |
|
139 |
== Upgrade Notice ==
|
140 |
|
141 |
+
= 1.0.20 =
|
142 |
+
Added a filter for turning on "Override Avatar" by default.
|
143 |
+
|
144 |
= 1.0.19 =
|
145 |
Added support for version 2.0.x of Post Thumbnail Editor
|
146 |
|