Plugin Directory

Changeset 2207900


Ignore:
Timestamp:
12/07/2019 10:17:03 PM (6 years ago)
Author:
chrisbergr
Message:

Bugfix: Visible avatar image after File upload in profile

Location:
custom-post-avatar/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • custom-post-avatar/trunk/custom-post-avatar.js

    r2207485 r2207900  
    8080                    jQuery( '#custom-post-avatar-uploader' ).removeClass( 'progress' );
    8181                    if( response['status'] == 'success' ) {
     82
    8283                        //console.log( 'Success', up, file, response );
    8384                        //var file_url = window.wpcpa_user_path_url + file['name'];
    8485                        var file_url = response['attachment']['src'];
    85                         /*
    86                         var $img = jQuery( '<img>' );
    87                         $img.attr( 'src', file_url );
    88                         $img.attr( 'title', file_url.split(/[\\/]/).pop() );
    89                         $img.appendTo( '#custom-post-avatar-list' );
    90                         */
     86
     87                        var $label = jQuery('<label>');
     88
    9189                        var $radio = jQuery('<input type="radio" />');
    9290                        $radio.attr( 'value', file_url.split(/[\\/]/).pop() );
    9391                        $radio.attr( 'name', 'custom_post_avatar_default' );
    94                         $radio.attr( 'style', 'background-image:url(' + file_url + ');' );
    95                         $radio.appendTo( '#custom-post-avatar-list' );
     92                        $radio.appendTo( $label );
     93
     94                        var $img = jQuery( '<img>' );
     95                        $img.attr( 'src', file_url );
     96                        $img.appendTo( $label );
     97
     98                        $label.appendTo( '#custom-post-avatar-list' );
     99
    96100                    } else {
    97101                        console.log( 'Error', up, file, response );
  • custom-post-avatar/trunk/custom-post-avatar.php

    r2207485 r2207900  
    44Plugin URI:  https://wordpress.org/plugins/custom-post-avatar
    55Description: This Plugin gives you the possibility to replace your default avatar by a custom image on each post individually.
    6 Version:     0.9.4
     6Version:     0.9.5
    77Text Domain: custom-post-avatar
    88Author:      Christian Hockenberger
  • custom-post-avatar/trunk/readme.txt

    r2207485 r2207900  
    55Tested up to: 5.3
    66Requires PHP: 5.2.4
    7 Stable tag: 0.9.4
     7Stable tag: 0.9.5
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3636
    3737
     38= 0.9.5 =
     39
     40* Bugfix: Visible avatar image after File upload in profile
     41
    3842= 0.9.4 =
    3943
Note: See TracChangeset for help on using the changeset viewer.