Changeset 2008146
- Timestamp:
- 01/08/2019 03:18:33 AM (7 years ago)
- Location:
- podamibe-custom-user-gravatar/trunk
- Files:
-
- 2 added
- 3 edited
-
assets/js/pcg-custom-gravatar.js (modified) (2 diffs)
-
languages (added)
-
languages/pcg.pot (added)
-
pod-custom-user-gravatar.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
podamibe-custom-user-gravatar/trunk/assets/js/pcg-custom-gravatar.js
r1516426 r2008146 2 2 $(document).ready(function(){ 3 3 var frame, 4 uploadImageBtn = $("#pcg-upload-profile-pic"); 4 uploadImageBtn = $("#pcg-upload-profile-pic"), 5 removeImageBtn = $('#pcg-remove-img'); 5 6 6 7 uploadImageBtn.on( 'click', function( event ){ … … 23 24 24 25 frame.on( 'select', function() { 25 var attachment = frame.state().get('selection').first().toJSON(); 26 console.log(attachment.sizes); 27 $( "#pcg-custom-gravatar" ).val(attachment.id); 28 $("#pcg-custom-gravatar-pic img").attr( "src", attachment.sizes.thumbnail.url ); 26 var attachment = frame.state().get('selection').first().toJSON(); 27 $( "#pcg-custom-gravatar" ).val(attachment.id); 28 $("#pcg-custom-gravatar-pic img").attr( "src", attachment.url ); 29 29 }); 30 30 31 31 frame.open(); 32 }); 33 34 if( $( "#pcg-use-custom-gravatar" ).is(":checked") ){ 32 }); 33 34 /** 35 * Remove Image Btn 36 */ 37 removeImageBtn.on( 'click', function( event ){ 38 $( "#pcg-custom-gravatar" ).val(''); 39 $("#pcg-custom-gravatar-pic img").attr( "src", '' ); 40 }); 41 42 if( $( "#pcg-use-custom-gravatar" ).is(":checked") ){ 35 43 $( "#pcg-upload-profile-pic" ).closest("tr").show(); 36 44 } -
podamibe-custom-user-gravatar/trunk/pod-custom-user-gravatar.php
r1793410 r2008146 1 1 2 <?php 2 /** 3 * Plugin Name: Podamibe Custom User Gravatar 4 * Plugin URI: http://podamibenepal.com/wordpress-plugins/ 5 * Description: Allows users to use pictures in the media gallery as gravatar. 6 * Version: 1.0.5 7 * Author: Podamibe Nepal 8 * Author URI: http://podamibenepal.com/ 9 * License: GPLv2 or later 10 * Text Domain: pcg 11 **/ 3 /* 4 * Plugin Name: Podamibe Custom User Gravatar 5 * Plugin URI: http://podamibenepal.com/wordpress-plugins/ 6 * Description: Allows users to use pictures in the media gallery as gravatar. 7 * Version: 1.0.6 8 * Author: Podamibe Nepal 9 * Author URI: http://podamibenepal.com/ 10 * Requires at least: 4.0 11 * Tested up to: 5.0 12 * Text Domain: pcg 13 * Domain Path: languages 14 * 15 * @package Podamibe Custom User Gravatar 16 * @author Podamibe Nepal 17 * @category Core 18 */ 12 19 13 20 if( ! defined( "ABSPATH" ) ){ … … 120 127 <label for="pcg-upload-profile-pic"><a href="javascript:void(0);" class="button" id="pcg-upload-profile-pic"><?php esc_html_e("Select Picture", PCG_TEXT_DOMAIN ); ?></a></label> 121 128 <input name="pcg_custom_gravatar" id="pcg-custom-gravatar" value="<?php echo get_user_meta( $user->ID, "pcg_custom_gravatar", true ); ?>" type="hidden" /> 129 <a href="javascript:void(0)" id="pcg-remove-img" class="pcg-remove-img"><?php echo esc_html__('Remove','pcg'); ?></a> 122 130 <?php }else{?> 123 131 <div id="pcg-custom-gravatar-pic"><?php echo get_avatar(NULl); ?></div> -
podamibe-custom-user-gravatar/trunk/readme.txt
r1793425 r2008146 3 3 Tags: gravatar, custom gravatar, change gravatar, podamibe 4 4 Requires at least: 3.7.0 5 Tested up to: 4.9.16 Stable tag: 1.0. 55 Tested up to: 5.0 6 Stable tag: 1.0.6 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 34 34 35 35 == Changelog == 36 = 1.0.6 = 37 * add the languages support 38 * add the remove buttom 36 39 37 40 = 1.0.5 =
Note: See TracChangeset
for help on using the changeset viewer.