Version Description
- Released 20 May 2015
- Revised post type initialization to make sure post type is completely hidden.
- Refactored function mt_profile_img to use a different API call so that output isn't inadvertently filtered.
- Added new filter, mpp_thumbnail_html, to filter output.
Download this release
Release Info
| Developer | ronalfy |
| Plugin | |
| Version | 1.2.3 |
| Comparing to | |
| See all releases | |
Code changes from version 1.2.2 to 1.2.3
- metronet-profile-picture.php +9 -4
- readme.txt +10 -1
metronet-profile-picture.php
CHANGED
|
@@ -4,7 +4,7 @@ Plugin Name: User 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: ronalfy
|
| 7 |
-
Version: 1.2.
|
| 8 |
Requires at least: 3.5
|
| 9 |
Author URI: http://www.ronalfy.com
|
| 10 |
Contributors: ronalfy
|
|
@@ -309,7 +309,7 @@ class Metronet_Profile_Picture {
|
|
| 309 |
//Register post types
|
| 310 |
$post_type_args = array(
|
| 311 |
'public' => false,
|
| 312 |
-
'publicly_queryable' =>
|
| 313 |
'show_ui' => false,
|
| 314 |
'show_in_menu' => false,
|
| 315 |
'query_var' => true,
|
|
@@ -506,13 +506,18 @@ function mt_profile_img( $user_id, $args = array() ) {
|
|
| 506 |
);
|
| 507 |
$args = wp_parse_args( $args, $defaults );
|
| 508 |
extract( $args );
|
|
|
|
|
|
|
|
|
|
| 509 |
//Return false or echo nothing if there is no post thumbnail
|
| 510 |
-
if(
|
| 511 |
if ( $echo ) echo '';
|
| 512 |
else return false;
|
| 513 |
return;
|
| 514 |
}
|
| 515 |
-
|
|
|
|
|
|
|
| 516 |
if ( $echo ) {
|
| 517 |
echo $post_thumbnail;
|
| 518 |
} else {
|
| 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: ronalfy
|
| 7 |
+
Version: 1.2.3
|
| 8 |
Requires at least: 3.5
|
| 9 |
Author URI: http://www.ronalfy.com
|
| 10 |
Contributors: ronalfy
|
| 309 |
//Register post types
|
| 310 |
$post_type_args = array(
|
| 311 |
'public' => false,
|
| 312 |
+
'publicly_queryable' => false,
|
| 313 |
'show_ui' => false,
|
| 314 |
'show_in_menu' => false,
|
| 315 |
'query_var' => true,
|
| 506 |
);
|
| 507 |
$args = wp_parse_args( $args, $defaults );
|
| 508 |
extract( $args );
|
| 509 |
+
|
| 510 |
+
$post_thumbnail_id = get_post_thumbnail_id( $profile_post_id );
|
| 511 |
+
|
| 512 |
//Return false or echo nothing if there is no post thumbnail
|
| 513 |
+
if( !$post_thumbnail_id ) {
|
| 514 |
if ( $echo ) echo '';
|
| 515 |
else return false;
|
| 516 |
return;
|
| 517 |
}
|
| 518 |
+
|
| 519 |
+
$post_thumbnail = wp_get_attachment_image( $post_thumbnail_id, $size, false, $attr );
|
| 520 |
+
$post_thumbnail = apply_filters( 'mpp_thumbnail_html', $post_thumbnail, $profile_post_id, $post_thumbnail_id, $user_id );
|
| 521 |
if ( $echo ) {
|
| 522 |
echo $post_thumbnail;
|
| 523 |
} else {
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: ronalfy
|
|
| 3 |
Tags: users, user, user profile
|
| 4 |
Requires at least: 3.5
|
| 5 |
Tested up to: 4.2
|
| 6 |
-
Stable tag: 1.2.
|
| 7 |
License: GPLv2 or later
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 9 |
|
|
@@ -105,6 +105,12 @@ Yes, but you'll have to set a new profile image per site. This is currently a l
|
|
| 105 |
|
| 106 |
== Changelog ==
|
| 107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
= 1.2.2 =
|
| 109 |
* Released 16 April 2015
|
| 110 |
* Added compatibility to Advanced Custom Fields.
|
|
@@ -180,6 +186,9 @@ Yes, but you'll have to set a new profile image per site. This is currently a l
|
|
| 180 |
|
| 181 |
== Upgrade Notice ==
|
| 182 |
|
|
|
|
|
|
|
|
|
|
| 183 |
= 1.2.2 =
|
| 184 |
Added compatibility to Advanced Custom Fields. Ensuring WordPress 4.2 compatibility.
|
| 185 |
|
| 3 |
Tags: users, user, user profile
|
| 4 |
Requires at least: 3.5
|
| 5 |
Tested up to: 4.2
|
| 6 |
+
Stable tag: 1.2.3
|
| 7 |
License: GPLv2 or later
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 9 |
|
| 105 |
|
| 106 |
== Changelog ==
|
| 107 |
|
| 108 |
+
= 1.2.3 =
|
| 109 |
+
* Released 20 May 2015
|
| 110 |
+
* Revised post type initialization to make sure post type is completely hidden.
|
| 111 |
+
* Refactored function mt_profile_img to use a different API call so that output isn't inadvertently filtered.
|
| 112 |
+
* Added new filter, mpp_thumbnail_html, to filter output.
|
| 113 |
+
|
| 114 |
= 1.2.2 =
|
| 115 |
* Released 16 April 2015
|
| 116 |
* Added compatibility to Advanced Custom Fields.
|
| 186 |
|
| 187 |
== Upgrade Notice ==
|
| 188 |
|
| 189 |
+
= 1.2.3 =
|
| 190 |
+
Made MPP post type completely hidden. mt_profile_img refactored to avoid filtered output.
|
| 191 |
+
|
| 192 |
= 1.2.2 =
|
| 193 |
Added compatibility to Advanced Custom Fields. Ensuring WordPress 4.2 compatibility.
|
| 194 |
|
