Changeset 1123220
- Timestamp:
- 03/29/2015 07:50:03 PM (11 years ago)
- Location:
- birthdays-widget
- Files:
-
- 43 added
- 4 edited
-
tags/1.7.1 (added)
-
tags/1.7.1/birthday-widget.php (added)
-
tags/1.7.1/birthdays-widget-ajax-callback.php (added)
-
tags/1.7.1/class-birthdays-widget-installer.php (added)
-
tags/1.7.1/class-birthdays-widget-settings.php (added)
-
tags/1.7.1/class-birthdays-widget.php (added)
-
tags/1.7.1/css (added)
-
tags/1.7.1/css/bic_calendar.css (added)
-
tags/1.7.1/css/birthdays-widget.css (added)
-
tags/1.7.1/css/bootstrap.css (added)
-
tags/1.7.1/css/bootstrap.min.css (added)
-
tags/1.7.1/css/jquery.dataTables.min.css (added)
-
tags/1.7.1/fonts (added)
-
tags/1.7.1/fonts/glyphicons-halflings-regular.eot (added)
-
tags/1.7.1/fonts/glyphicons-halflings-regular.svg (added)
-
tags/1.7.1/fonts/glyphicons-halflings-regular.ttf (added)
-
tags/1.7.1/fonts/glyphicons-halflings-regular.woff (added)
-
tags/1.7.1/images (added)
-
tags/1.7.1/images/birthday_cake.png (added)
-
tags/1.7.1/images/birthday_cake_icon.png (added)
-
tags/1.7.1/images/default_user.png (added)
-
tags/1.7.1/images/sort_asc.png (added)
-
tags/1.7.1/images/sort_both.png (added)
-
tags/1.7.1/images/sort_desc.png (added)
-
tags/1.7.1/js (added)
-
tags/1.7.1/js/bic_calendar.js (added)
-
tags/1.7.1/js/bic_calendar.min.js (added)
-
tags/1.7.1/js/bootstrap.min.js (added)
-
tags/1.7.1/js/date-picker.js (added)
-
tags/1.7.1/js/jquery.dataTables.min.js (added)
-
tags/1.7.1/js/script.js (added)
-
tags/1.7.1/js/shortcode.js (added)
-
tags/1.7.1/js/unused.js (added)
-
tags/1.7.1/languages (added)
-
tags/1.7.1/languages/birthdays-widget-el.mo (added)
-
tags/1.7.1/languages/birthdays-widget-el.po (added)
-
tags/1.7.1/languages/birthdays-widget.pot (added)
-
tags/1.7.1/readme.txt (added)
-
tags/1.7.1/screenshot-1.jpg (added)
-
tags/1.7.1/screenshot-2.jpg (added)
-
tags/1.7.1/screenshot-3.jpg (added)
-
tags/1.7.1/uninstall.php (added)
-
tags/1.7.1/uploads (added)
-
trunk/birthday-widget.php (modified) (2 diffs)
-
trunk/birthdays-widget-ajax-callback.php (modified) (1 diff)
-
trunk/class-birthdays-widget.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
birthdays-widget/trunk/birthday-widget.php
r1084613 r1123220 5 5 Description: Birthdays widget plugin produces a widget which displays a customizable happy birthday image and wish to your clients/users. 6 6 Author: lion2486, Sudavar 7 Version: 1.7 7 Version: 1.7.1 8 8 Author URI: http://www.codescar.eu 9 9 Contributors: lion2486, Sudavar … … 16 16 */ 17 17 18 define( 'BW', '1.7 ' );18 define( 'BW', '1.7.1' ); 19 19 require_once dirname( __FILE__ ) . '/class-birthdays-widget.php'; 20 20 require_once dirname( __FILE__ ) . '/class-birthdays-widget-installer.php'; -
birthdays-widget/trunk/birthdays-widget-ajax-callback.php
r1084580 r1123220 29 29 foreach ( $users as $user ) { 30 30 //If this meta key exists for this user, and it's his/her birthday 31 if ( isset( $user->{$birthday_date_meta_field} ) ) {32 $date = date( "-m-d", strtotime( $user->{$birthday_date_meta_field}) );31 if ( isset( $user->{$birthday_date_meta_field} ) && !empty( $user->{$birthday_date_meta_field} ) ) { 32 $date = date( "-m-d", strtotime( str_replace('/', '-', $user->{$birthday_date_meta_field} ) ) ); 33 33 if ( ( !$all && $date == date_i18n( '-m-d' ) ) || $all ) { 34 34 $tmp_user = new stdClass(); 35 35 $tmp_user->name = $user->{$meta_key}; 36 36 $tmp_user->email = $user->user_email; 37 $tmp_user->date = date( "Y-m-d", strtotime( str_replace('/', '-', $user->{$birthday_date_meta_field} ) ) ); 37 38 //If user's image is drawn from Gravatar 38 39 if ( $birthdays_settings[ 'wp_user_gravatar' ] ) { -
birthdays-widget/trunk/class-birthdays-widget.php
r1084594 r1123220 88 88 $days_organized = array(); 89 89 foreach ( $filtered as $user_birt ) { 90 if( !isset( $user_birt->date ) ) 91 var_dump( $user_birt ); 90 92 $user_birt->tmp = substr( $user_birt->date, 5 ); 91 93 if ( !isset ( $days_organized[ $user_birt->tmp ] ) ) { … … 145 147 //Check if this is record represents a WordPress user 146 148 $wp_usr = strpos( $row->name, $prefix ); 147 if ( $instance[ 'template' ] == 2 ) { 148 $row->image = wp_get_attachment_image_src( $row->image, array( 150, 150 ) ); 149 } else { 150 $row->image = wp_get_attachment_image_src( $row->image, 'medium' ); 151 } 152 $row->image = $row->image[ 0 ]; 149 //var_dump( $row ); 150 if ( is_numeric( $row->image ) || $row->image == NULL ) { 151 if ( $instance[ 'template' ] == 2 ) { 152 $row->image = wp_get_attachment_image_src( $row->image, array( 150, 150 ) ); 153 } else { 154 $row->image = wp_get_attachment_image_src( $row->image, 'medium' ); 155 } 156 $row->image = $row->image[ 0 ]; 157 } 153 158 if ( $wp_usr !== false ) { 154 159 //If birthdays are disabled for WP Users, or birthday date is drown from WP Profile, skip the record … … 268 273 $html .= '<img src="' . $user->image . '" width="150" /><div class="birthday_center birthday_name">' . $user->name; 269 274 if( $birthdays_settings[ 'user_age' ] ) { 270 $bdate = new DateTime( $user->date ); 271 $date_now = new DateTime(); 272 $interval = $date_now->diff( $bdate ); 273 $age = $interval->y; 275 $age = date( "Y" ) - date( "Y", strtotime( $user->date ) ); 274 276 $html .= '<span class="birthday_age"> ' . $age . ' ' . __( 'years old', 'birthdays-widget' ) . '</span>'; 275 277 } -
birthdays-widget/trunk/readme.txt
r1084610 r1123220 4 4 Description: Birthdays widget plugin produces a widget which displays a customizable happy birthday image and wish to your clients/users. 5 5 Author: lion2486, Sudavar 6 Version: 1.7 6 Version: 1.7.1 7 7 Author URI: http://www.codescar.eu 8 8 Contributors: lion2486, Sudavar … … 11 11 Requires at least: 3.0.1 12 12 Tested up to: 4.0 13 Stable tag: 1.7 13 Stable tag: 1.7.1 14 14 Text Domain: birthdays-widget 15 15 License: GPLv2 … … 51 51 52 52 == Changelog == 53 54 = 1.7.1 = 55 * Bug fix for the WP User drawing date wrongly from Custom Meta Field 56 * Fix the user's image from gravatar 57 * Minor changes 53 58 54 59 = 1.7 =
Note: See TracChangeset
for help on using the changeset viewer.