Plugin Directory

Changeset 2160663


Ignore:
Timestamp:
09/21/2019 01:38:25 PM (6 years ago)
Author:
dewtechnolab
Message:

Submit new 1.0.1 version

Location:
dew-profile-picture
Files:
8 added
2 edited

Legend:

Unmodified
Added
Removed
  • dew-profile-picture/trunk/dew-profile-picture.php

    r1829585 r2160663  
    55* Description: Use the native WP uploader on your user profile page.
    66* Author: Dew Technolab
    7 * Version: 1.0.0
     7* Version: 1.0.1
    88* Requires at least: 4.9
    9 * Author URI: http://dewtechnolab.in/
     9* Author URI: http://dewtechnolab.com/
    1010* Text Domain: dew-profile-picture
    1111*/
     
    4747    public function insert_upload_form() {
    4848        $user_id = isset( $_GET[ 'user_id' ] ) ? absint( $_GET[ 'user_id' ] ) : 0;
    49         if ( $user_id == 0 && IS_PROFILE_PAGE ) {
     49        if ( $user_id == 0 && defined( 'IS_PROFILE_PAGE' ) && IS_PROFILE_PAGE == true ) {
    5050            $current_user = wp_get_current_user();
    5151            $user_id = $current_user->ID;
    5252        }
    53         $profile_pic = ($user!=='add-new-user') ? get_user_meta($user_id, 'profilepicture', true): false;
     53        $profile_pic = get_user_meta($user_id, 'profilepicture', true);
    5454?>
    5555        <table class="form-table fh-profile-upload-options">
     
    214214    extract( $args ); //todo - get rid of evil extract
    215215
    216     $profile_pic = ($user!=='add-new-user') ? get_user_meta($user_id, 'profilepicture', true): false;
    217     $profile = '<img alt="" src="'.esc_url($profile_pic).'" class="avatar avatar-'.$size[0].' photo" height="'.$size[0].'" width="'.$size[0].'">';
     216    $Profile = '';
     217    $profile_pic = get_user_meta($user_id, 'profilepicture', true);
     218    if ($profile_pic) {
     219        $profile = '<img alt="" src="'.esc_url($profile_pic).'" class="avatar avatar-'.$size[0].' photo" height="'.$size[0].'" width="'.$size[0].'">';
     220    }
    218221    if ( $echo ) {
    219222        echo $Profile;
  • dew-profile-picture/trunk/readme.txt

    r1830912 r2160663  
    11 User Profile Picture
    22
    3 Contributors: Dew Technolab
     3Contributors: dewtechnolab
    44Tags: users, user, user profile
    55Requires at least: 4.5
    6 Stable tag: 1.0.0
    7 Version: 1.0.0
    8 Tested up to: 4.9
     6Stable tag: 1.0.1
     7Version: 1.0.1
     8Tested up to: 5.2.3
     9Requires PHP: 5.2.4
    910License: GPLv2 or later
    1011License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    100101
    101102
     103= 1.0.1 =
     104
     105* Fix error
     106
     107
     108
    102109= 1.0.0 =
    103110
    104111* Initial release.
     112
     113
     114
     115== Upgrade Notice ==
     116
     117
     118
     119= 1.0.1 =
     120
     121* This version fixes a security related bug.  Upgrade immediately.
Note: See TracChangeset for help on using the changeset viewer.