Version Description
- Released 2019-06-10
- Fixing permissions in REST API
Download this release
Release Info
Developer | ronalfy |
Plugin | User Profile Picture |
Version | 2.2.6 |
Comparing to | |
See all releases |
Code changes from version 2.2.5 to 2.2.6
- languages/metronet-profile-picture.pot +22 -21
- metronet-profile-picture.php +10 -5
- readme.txt +8 -1
languages/metronet-profile-picture.pot
CHANGED
@@ -2,15 +2,15 @@
|
|
2 |
# This file is distributed under the same license as the User Profile Picture plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: User Profile Picture 2.2.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/user-profile-picture\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2019-06-
|
13 |
-
"PO-Revision-Date: 2019-06-
|
14 |
"X-Generator: WP-CLI 2.0.1\n"
|
15 |
"X-Domain: metronet-profile-picture\n"
|
16 |
|
@@ -84,58 +84,61 @@ msgid "You must be able to upload files."
|
|
84 |
msgstr ""
|
85 |
|
86 |
#: metronet-profile-picture.php:851
|
87 |
-
#: metronet-profile-picture.php:
|
88 |
-
#: metronet-profile-picture.php:
|
89 |
-
#: metronet-profile-picture.php:
|
90 |
msgid "User not found."
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: metronet-profile-picture.php:
|
|
|
|
|
|
|
|
|
94 |
msgid "User not owner."
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: metronet-profile-picture.php:
|
98 |
-
#: metronet-profile-picture.php:
|
99 |
msgid "Profile picture not found."
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: metronet-profile-picture.php:
|
103 |
msgid "Author"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: metronet-profile-picture.php:
|
107 |
#: gutenberg/class-gutenberg.php:212
|
108 |
msgid "Latest Posts"
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: metronet-profile-picture.php:
|
112 |
msgid "Author Information"
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: metronet-profile-picture.php:
|
116 |
-
#: metronet-profile-picture.php:
|
117 |
#: gutenberg/class-gutenberg.php:307
|
118 |
#: gutenberg/class-gutenberg.php:363
|
119 |
#: dist/blocks.build.js:1
|
120 |
-
#: src/block/block.js:220
|
121 |
msgid "View Posts"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: metronet-profile-picture.php:
|
125 |
-
#: metronet-profile-picture.php:
|
126 |
#: gutenberg/class-gutenberg.php:312
|
127 |
#: gutenberg/class-gutenberg.php:368
|
128 |
#: dist/blocks.build.js:1
|
129 |
msgid "View Website"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: metronet-profile-picture.php:
|
133 |
#: gutenberg/class-gutenberg.php:336
|
134 |
#: dist/blocks.build.js:1
|
135 |
msgid "View all posts by"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: metronet-profile-picture.php:
|
139 |
#: gutenberg/class-gutenberg.php:340
|
140 |
#: dist/blocks.build.js:1
|
141 |
msgid "Website"
|
@@ -147,12 +150,10 @@ msgid "Author Details"
|
|
147 |
msgstr ""
|
148 |
|
149 |
#: dist/blocks.build.js:1
|
150 |
-
#: src/block/block.js:124
|
151 |
msgid "User Profile Legacy"
|
152 |
msgstr ""
|
153 |
|
154 |
#: dist/blocks.build.js:1
|
155 |
-
#: src/block/block.js:244
|
156 |
msgid "User Profile"
|
157 |
msgstr ""
|
158 |
|
2 |
# This file is distributed under the same license as the User Profile Picture plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: User Profile Picture 2.2.6\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/user-profile-picture\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2019-06-10T16:20:09+00:00\n"
|
13 |
+
"PO-Revision-Date: 2019-06-10T16:20:09+00:00\n"
|
14 |
"X-Generator: WP-CLI 2.0.1\n"
|
15 |
"X-Domain: metronet-profile-picture\n"
|
16 |
|
84 |
msgstr ""
|
85 |
|
86 |
#: metronet-profile-picture.php:851
|
87 |
+
#: metronet-profile-picture.php:889
|
88 |
+
#: metronet-profile-picture.php:916
|
89 |
+
#: metronet-profile-picture.php:954
|
90 |
msgid "User not found."
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: metronet-profile-picture.php:854
|
94 |
+
msgid "You must have a role of editor or above to set a new profile image."
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: metronet-profile-picture.php:858
|
98 |
msgid "User not owner."
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: metronet-profile-picture.php:925
|
102 |
+
#: metronet-profile-picture.php:961
|
103 |
msgid "Profile picture not found."
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: metronet-profile-picture.php:1154
|
107 |
msgid "Author"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: metronet-profile-picture.php:1155
|
111 |
#: gutenberg/class-gutenberg.php:212
|
112 |
msgid "Latest Posts"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: metronet-profile-picture.php:1156
|
116 |
msgid "Author Information"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: metronet-profile-picture.php:1193
|
120 |
+
#: metronet-profile-picture.php:1249
|
121 |
#: gutenberg/class-gutenberg.php:307
|
122 |
#: gutenberg/class-gutenberg.php:363
|
123 |
#: dist/blocks.build.js:1
|
|
|
124 |
msgid "View Posts"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: metronet-profile-picture.php:1198
|
128 |
+
#: metronet-profile-picture.php:1254
|
129 |
#: gutenberg/class-gutenberg.php:312
|
130 |
#: gutenberg/class-gutenberg.php:368
|
131 |
#: dist/blocks.build.js:1
|
132 |
msgid "View Website"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: metronet-profile-picture.php:1222
|
136 |
#: gutenberg/class-gutenberg.php:336
|
137 |
#: dist/blocks.build.js:1
|
138 |
msgid "View all posts by"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: metronet-profile-picture.php:1226
|
142 |
#: gutenberg/class-gutenberg.php:340
|
143 |
#: dist/blocks.build.js:1
|
144 |
msgid "Website"
|
150 |
msgstr ""
|
151 |
|
152 |
#: dist/blocks.build.js:1
|
|
|
153 |
msgid "User Profile Legacy"
|
154 |
msgstr ""
|
155 |
|
156 |
#: dist/blocks.build.js:1
|
|
|
157 |
msgid "User Profile"
|
158 |
msgstr ""
|
159 |
|
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: Ronald Huereca
|
7 |
-
Version: 2.2.
|
8 |
Requires at least: 3.5
|
9 |
Author URI: https://www.mediaron.com
|
10 |
Contributors: ronalfy
|
@@ -12,7 +12,7 @@ Text Domain: metronet-profile-picture
|
|
12 |
Domain Path: /languages
|
13 |
*/
|
14 |
|
15 |
-
define( 'METRONET_PROFILE_PICTURE_VERSION', '2.2.
|
16 |
|
17 |
/**
|
18 |
* Main Class for User Profile Picture
|
@@ -850,11 +850,16 @@ class Metronet_Profile_Picture {
|
|
850 |
if ( ! $user_id ) {
|
851 |
return new WP_Error( 'mpp_no_user', __( 'User not found.', 'metronet-profile-picture' ), array( 'status' => 403 ) );
|
852 |
}
|
853 |
-
|
854 |
-
|
855 |
-
|
|
|
|
|
|
|
|
|
856 |
}
|
857 |
|
|
|
858 |
$post_id = $this->get_post_id( $user_id );
|
859 |
//Save user meta
|
860 |
update_user_option( $user_id, 'metronet_post_id', $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: Ronald Huereca
|
7 |
+
Version: 2.2.6
|
8 |
Requires at least: 3.5
|
9 |
Author URI: https://www.mediaron.com
|
10 |
Contributors: ronalfy
|
12 |
Domain Path: /languages
|
13 |
*/
|
14 |
|
15 |
+
define( 'METRONET_PROFILE_PICTURE_VERSION', '2.2.6' );
|
16 |
|
17 |
/**
|
18 |
* Main Class for User Profile Picture
|
850 |
if ( ! $user_id ) {
|
851 |
return new WP_Error( 'mpp_no_user', __( 'User not found.', 'metronet-profile-picture' ), array( 'status' => 403 ) );
|
852 |
}
|
853 |
+
if ( ! current_user_can( 'edit_others_posts' ) ) {
|
854 |
+
return new WP_Error( 'mpp_not_privs', __( 'You must have a role of editor or above to set a new profile image.', 'metronet-profile-picture' ), array( 'status' => 403 ) );
|
855 |
+
} else {
|
856 |
+
$is_post_owner = ( get_post( $media_id )->post_author === $user_id ) ? true : false;
|
857 |
+
if ( ! $is_post_owner ) {
|
858 |
+
return new WP_Error( 'mpp_not_owner', __( 'User not owner.', 'metronet-profile-picture' ), array( 'status' => 403 ) );
|
859 |
+
}
|
860 |
}
|
861 |
|
862 |
+
|
863 |
$post_id = $this->get_post_id( $user_id );
|
864 |
//Save user meta
|
865 |
update_user_option( $user_id, 'metronet_post_id', $post_id );
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: ronalfy, Alaadiaa
|
|
3 |
Tags: users, user profile, gravatar, avatar, blocks, block
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 5.2
|
6 |
-
Stable tag: 2.2.
|
7 |
Requires PHP: 5.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -124,6 +124,10 @@ Yes, but you'll have to set a new profile image per site. This is currently a l
|
|
124 |
|
125 |
== Changelog ==
|
126 |
|
|
|
|
|
|
|
|
|
127 |
= 2.2.5 =
|
128 |
* Released 2019-06-02
|
129 |
* Code cleanup.
|
@@ -299,5 +303,8 @@ Yes, but you'll have to set a new profile image per site. This is currently a l
|
|
299 |
|
300 |
== Upgrade Notice ==
|
301 |
|
|
|
|
|
|
|
302 |
= 2.2.5 =
|
303 |
Code cleanup. Leaner Gutenberg JavaScript. Gutenberg improvements. Security improvements.
|
3 |
Tags: users, user profile, gravatar, avatar, blocks, block
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 5.2
|
6 |
+
Stable tag: 2.2.6
|
7 |
Requires PHP: 5.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
124 |
|
125 |
== Changelog ==
|
126 |
|
127 |
+
= 2.2.6 =
|
128 |
+
* Released 2019-06-10
|
129 |
+
* Fixing permissions in REST API
|
130 |
+
|
131 |
= 2.2.5 =
|
132 |
* Released 2019-06-02
|
133 |
* Code cleanup.
|
303 |
|
304 |
== Upgrade Notice ==
|
305 |
|
306 |
+
= 2.2.6 =
|
307 |
+
Fixing permissions in REST API.
|
308 |
+
|
309 |
= 2.2.5 =
|
310 |
Code cleanup. Leaner Gutenberg JavaScript. Gutenberg improvements. Security improvements.
|