User Profile Picture - Version 2.3.8

Version Description

  • Released 2019-10-30
  • Removing top-level navigation.
Download this release

Release Info

Developer ronalfy
Plugin Icon 128x128 User Profile Picture
Version 2.3.8
Comparing to
See all releases

Code changes from version 2.3.7 to 2.3.8

Files changed (2) hide show
  1. metronet-profile-picture.php +35 -17
  2. readme.txt +7 -3
metronet-profile-picture.php CHANGED
@@ -4,15 +4,15 @@ 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.3.7
8
- Requires at least: 3.5
9
  Author URI: https://www.mediaron.com
10
  Contributors: ronalfy
11
  Text Domain: metronet-profile-picture
12
  Domain Path: /languages
13
  */
14
 
15
- define( 'METRONET_PROFILE_PICTURE_VERSION', '2.3.7' );
16
  define( 'METRONET_PROFILE_PICTURE_PLUGIN_NAME', 'User Profile Picture' );
17
  define( 'METRONET_PROFILE_PICTURE_DIR', plugin_dir_path( __FILE__ ) );
18
  define( 'METRONET_PROFILE_PICTURE_URL', plugins_url( '/', __FILE__ ) );
@@ -147,15 +147,25 @@ class Metronet_Profile_Picture {
147
  * @since 2.3.0
148
  */
149
  public function register_settings_menu() {
150
- $hook = add_menu_page(
151
- __( 'User Profile Picture', 'metronet-profile-picture' ),
152
- __( 'User Profile Picture', 'metronet-profile-picture' ),
153
- 'manage_options',
154
- 'mpp',
155
- array( $this, 'admin_page' ),
156
- 'dashicons-groups',
157
- 100
158
- );
 
 
 
 
 
 
 
 
 
 
159
  }
160
 
161
  /**
@@ -738,11 +748,19 @@ class Metronet_Profile_Picture {
738
  * @return array Settings array.
739
  */
740
  public function plugin_settings_link( $settings ) {
741
- $admin_anchor = sprintf(
742
- '<a href="%s">%s</a>',
743
- esc_url( admin_url( 'admin.php?page=mpp' ) ),
744
- esc_html__( 'Settings', 'metronet-profile-picture' )
745
- );
 
 
 
 
 
 
 
 
746
  if ( ! defined( 'USER_PROFILE_PICTURE_ENHANCED' ) ) {
747
  $admin_anchor .= sprintf(
748
  ' | <a href="%s">%s</a>',
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.3.8
8
+ Requires at least: 4.6
9
  Author URI: https://www.mediaron.com
10
  Contributors: ronalfy
11
  Text Domain: metronet-profile-picture
12
  Domain Path: /languages
13
  */
14
 
15
+ define( 'METRONET_PROFILE_PICTURE_VERSION', '2.3.8' );
16
  define( 'METRONET_PROFILE_PICTURE_PLUGIN_NAME', 'User Profile Picture' );
17
  define( 'METRONET_PROFILE_PICTURE_DIR', plugin_dir_path( __FILE__ ) );
18
  define( 'METRONET_PROFILE_PICTURE_URL', plugins_url( '/', __FILE__ ) );
147
  * @since 2.3.0
148
  */
149
  public function register_settings_menu() {
150
+ if ( defined( 'USER_PROFILE_PICTURE_ENHANCED' ) ) {
151
+ $hook = add_menu_page(
152
+ __( 'User Profile Picture', 'metronet-profile-picture' ),
153
+ __( 'User Profile Picture', 'metronet-profile-picture' ),
154
+ 'manage_options',
155
+ 'mpp',
156
+ array( $this, 'admin_page' ),
157
+ 'dashicons-groups',
158
+ 100
159
+ );
160
+ } else {
161
+ $hook = add_options_page(
162
+ __( 'User Profile Picture', 'metronet-profile-picture' ),
163
+ __( 'User Profile Picture', 'metronet-profile-picture' ),
164
+ 'manage_options',
165
+ 'mpp',
166
+ array( $this, 'admin_page' )
167
+ );
168
+ }
169
  }
170
 
171
  /**
748
  * @return array Settings array.
749
  */
750
  public function plugin_settings_link( $settings ) {
751
+ if ( defined( 'USER_PROFILE_PICTURE_ENHANCED' ) ) {
752
+ $admin_anchor = sprintf(
753
+ '<a href="%s">%s</a>',
754
+ esc_url( admin_url( 'admin.php?page=mpp' ) ),
755
+ esc_html__( 'Settings', 'metronet-profile-picture' )
756
+ );
757
+ } else {
758
+ $admin_anchor = sprintf(
759
+ '<a href="%s">%s</a>',
760
+ esc_url( admin_url( 'options-general.php?page=mpp' ) ),
761
+ esc_html__( 'Settings', 'metronet-profile-picture' )
762
+ );
763
+ }
764
  if ( ! defined( 'USER_PROFILE_PICTURE_ENHANCED' ) ) {
765
  $admin_anchor .= sprintf(
766
  ' | <a href="%s">%s</a>',
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.3
6
- Stable tag: 2.3.7
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -126,6 +126,10 @@ Yes, but you'll have to set a new profile image per site. This is currently a l
126
 
127
  == Changelog ==
128
 
 
 
 
 
129
  = 2.3.7 =
130
  * Released 2019-10-23
131
  * Fixing options not being saved properly.
@@ -339,5 +343,5 @@ Yes, but you'll have to set a new profile image per site. This is currently a l
339
 
340
  == Upgrade Notice ==
341
 
342
- = 2.3.7 =
343
- Fixing options not being saved properly.
3
  Tags: users, user profile, gravatar, avatar, blocks, block
4
  Requires at least: 3.5
5
  Tested up to: 5.3
6
+ Stable tag: 2.3.8
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
126
 
127
  == Changelog ==
128
 
129
+ = 2.3.8 =
130
+ * Released 2019-10-30
131
+ * Removing top-level navigation.
132
+
133
  = 2.3.7 =
134
  * Released 2019-10-23
135
  * Fixing options not being saved properly.
343
 
344
  == Upgrade Notice ==
345
 
346
+ = 2.3.8 =
347
+ Removing top-level navigation.