Changeset 1258200
- Timestamp:
- 10/02/2015 12:18:15 PM (10 years ago)
- Location:
- woocommerce-hear-about-us
- Files:
-
- 2 added
- 2 deleted
- 10 edited
- 20 copied
-
assets/screenshot-1.png (modified) (previous)
-
assets/screenshot-2.png (modified) (previous)
-
tags/1.4.2 (copied) (copied from woocommerce-hear-about-us/trunk)
-
tags/1.4.2/README.md (copied) (copied from woocommerce-hear-about-us/trunk/README.md)
-
tags/1.4.2/assets (copied) (copied from woocommerce-hear-about-us/trunk/assets)
-
tags/1.4.2/assets/js/other-field.js (copied) (copied from woocommerce-hear-about-us/trunk/assets/js/other-field.js)
-
tags/1.4.2/i18n (copied) (copied from woocommerce-hear-about-us/trunk/i18n)
-
tags/1.4.2/i18n/languages/nl_NL.mo (deleted)
-
tags/1.4.2/i18n/languages/nl_NL.po (deleted)
-
tags/1.4.2/i18n/languages/woocommerce-hear-about-us-he_IL.mo (copied) (copied from woocommerce-hear-about-us/trunk/i18n/languages/woocommerce-hear-about-us-he_IL.mo)
-
tags/1.4.2/i18n/languages/woocommerce-hear-about-us-he_IL.po (copied) (copied from woocommerce-hear-about-us/trunk/i18n/languages/woocommerce-hear-about-us-he_IL.po)
-
tags/1.4.2/i18n/languages/woocommerce-hear-about-us-nl_NL.mo (copied) (copied from woocommerce-hear-about-us/trunk/i18n/languages/woocommerce-hear-about-us-nl_NL.mo)
-
tags/1.4.2/i18n/languages/woocommerce-hear-about-us-nl_NL.po (copied) (copied from woocommerce-hear-about-us/trunk/i18n/languages/woocommerce-hear-about-us-nl_NL.po) (1 diff)
-
tags/1.4.2/i18n/languages/woocommerce-hear-about-us-zh_CN.mo (copied) (copied from woocommerce-hear-about-us/trunk/i18n/languages/woocommerce-hear-about-us-zh_CN.mo)
-
tags/1.4.2/i18n/languages/woocommerce-hear-about-us-zh_CN.po (copied) (copied from woocommerce-hear-about-us/trunk/i18n/languages/woocommerce-hear-about-us-zh_CN.po)
-
tags/1.4.2/i18n/languages/woocommerce-hear-about-us.pot (copied) (copied from woocommerce-hear-about-us/trunk/i18n/languages/woocommerce-hear-about-us.pot) (1 diff)
-
tags/1.4.2/includes (copied) (copied from woocommerce-hear-about-us/trunk/includes)
-
tags/1.4.2/includes/admin/wchau-admin-column.php (added)
-
tags/1.4.2/includes/admin/wchau-admin-display-on-order.php (copied) (copied from woocommerce-hear-about-us/trunk/includes/admin/wchau-admin-display-on-order.php) (1 diff)
-
tags/1.4.2/includes/admin/wchau-admin-setting-fields.php (copied) (copied from woocommerce-hear-about-us/trunk/includes/admin/wchau-admin-setting-fields.php)
-
tags/1.4.2/includes/wchau-custom-field.php (copied) (copied from woocommerce-hear-about-us/trunk/includes/wchau-custom-field.php) (2 diffs)
-
tags/1.4.2/includes/wchau-functions.php (modified) (1 diff)
-
tags/1.4.2/index.php (copied) (copied from woocommerce-hear-about-us/trunk/index.php)
-
tags/1.4.2/readme.txt (copied) (copied from woocommerce-hear-about-us/trunk/readme.txt) (2 diffs)
-
tags/1.4.2/templates (copied) (copied from woocommerce-hear-about-us/trunk/templates)
-
tags/1.4.2/woocommerce-hear-about-us.php (copied) (copied from woocommerce-hear-about-us/trunk/woocommerce-hear-about-us.php) (4 diffs)
-
trunk/i18n/languages/woocommerce-hear-about-us-nl_NL.po (modified) (1 diff)
-
trunk/i18n/languages/woocommerce-hear-about-us.pot (modified) (1 diff)
-
trunk/includes/admin/wchau-admin-column.php (added)
-
trunk/includes/admin/wchau-admin-display-on-order.php (modified) (1 diff)
-
trunk/includes/wchau-custom-field.php (modified) (2 diffs)
-
trunk/includes/wchau-functions.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/woocommerce-hear-about-us.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-hear-about-us/tags/1.4.2/i18n/languages/woocommerce-hear-about-us-nl_NL.po
r1242188 r1258200 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WooCommerce Hear About Us 1.4. 1\n"5 "Project-Id-Version: WooCommerce Hear About Us 1.4.2\n" 6 6 "Report-Msgid-Bugs-To: https://github.com/siteoptimo/woocommerce-hear-about-us/issues\n" 7 7 "POT-Creation-Date: 2015-09-09 12:22:59+00:00\n" -
woocommerce-hear-about-us/tags/1.4.2/i18n/languages/woocommerce-hear-about-us.pot
r1242188 r1258200 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WooCommerce Hear About Us 1.4. 1\n"5 "Project-Id-Version: WooCommerce Hear About Us 1.4.2\n" 6 6 "Report-Msgid-Bugs-To: https://github.com/siteoptimo/woocommerce-hear-about-us/issues\n" 7 7 "POT-Creation-Date: 2015-09-09 12:22:59+00:00\n" -
woocommerce-hear-about-us/tags/1.4.2/includes/admin/wchau-admin-display-on-order.php
r1116079 r1258200 18 18 19 19 function display_source_with_order_meta( $order ) { 20 $options = WCHAU_Custom_Field::get_options(); 21 $order_source = get_post_meta( $order->id, 'source', true ); 22 if ( $order_source == '' ) { 23 $order_source = __( 'N/A', 'woocommerce-hear-about-us' ); 24 } 25 26 if(isset($options[$order_source])) { 27 $order_source = $options[$order_source]; 28 } 20 $order_source = wchau_get_option_value(get_post_meta( $order->id, 'source', true )); 29 21 30 22 echo '<p><strong>' . __( 'Source', 'woocommerce-hear-about-us' ) . ':</strong> ' . $order_source . '</p>'; 31 32 23 } 33 24 -
woocommerce-hear-about-us/tags/1.4.2/includes/wchau-custom-field.php
r1242188 r1258200 74 74 if ( ! empty( $_POST['wchau_source'] ) ) { 75 75 76 $options = $this->get_options();77 76 $source = $_POST['wchau_source']; 78 77 79 $source = sanitize_text_field( isset( $options[ $source ] ) ? $options[ $source ] : $source);78 $source = sanitize_text_field( wchau_get_option_value( $source ) ); 80 79 81 80 update_user_meta( $user_id, '_wchau_source', $source ); … … 85 84 function save_source_to_order_meta( $order_id ) { 86 85 if ( ! empty( $_POST['wchau_source'] ) ) { 87 update_post_meta( $order_id, 'source', sanitize_text_field( $_POST['wchau_source']) );86 update_post_meta( $order_id, 'source', wchau_get_option_value( sanitize_text_field( $_POST['wchau_source'] ) ) ); 88 87 } 89 88 } -
woocommerce-hear-about-us/tags/1.4.2/includes/wchau-functions.php
r1000516 r1258200 25 25 return $filtered; 26 26 } 27 28 function wchau_get_option_value($option, $empty_value = null) { 29 $options = WCHAU_Custom_Field::get_options(); 30 if ( empty( $option ) ) { 31 return !isset($empty_value) ? __( 'N/A', 'woocommerce-hear-about-us' ) : $empty_value; 32 } 33 34 // for compatibility reasons. 35 if(isset($options[$option])) { 36 return $options[$option]; 37 } 38 39 return $option; 40 } -
woocommerce-hear-about-us/tags/1.4.2/readme.txt
r1242188 r1258200 7 7 Requires at least: WordPress 3.8 and WooCommerce 2.1 8 8 Tested up to: 4.4 9 Stable tag: 1.4. 19 Stable tag: 1.4.2 10 10 11 11 Ask where your new customers come from at checkout. … … 51 51 52 52 == Changelog == 53 = 1.4.2 = 54 * Added custom sortable column to order listing. 55 * Added custom sortable column to user listing. Thanks for your input, [goto10](https://profiles.wordpress.org/goto10/). 56 53 57 = 1.4.1 = 54 58 * Fixed a bug where "other" field was not displayed on the user profile. -
woocommerce-hear-about-us/tags/1.4.2/woocommerce-hear-about-us.php
r1242188 r1258200 2 2 /* 3 3 Plugin Name: WooCommerce Hear About Us 4 Version: 1.4. 14 Version: 1.4.2 5 5 Plugin URI: http://www.siteoptimo.com/#utm_source=wpadmin&utm_medium=plugin&utm_campaign=wch 6 6 Description: Ask where your new customers come from at checkout. … … 41 41 * 42 42 * @class WooCommerce_HearAboutUs 43 * @version 1.4. 143 * @version 1.4.2 44 44 */ 45 45 final class WooCommerce_HearAboutUs { … … 54 54 * @var string 55 55 */ 56 public static $version = "1.4. 1";56 public static $version = "1.4.2"; 57 57 58 58 /** … … 198 198 new WCHAU_Admin_Setting_Fields(); 199 199 new WCHAU_Admin_Display_On_Order(); 200 new WCHAU_Admin_Column(); 200 201 201 202 } -
woocommerce-hear-about-us/trunk/i18n/languages/woocommerce-hear-about-us-nl_NL.po
r1242188 r1258200 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WooCommerce Hear About Us 1.4. 1\n"5 "Project-Id-Version: WooCommerce Hear About Us 1.4.2\n" 6 6 "Report-Msgid-Bugs-To: https://github.com/siteoptimo/woocommerce-hear-about-us/issues\n" 7 7 "POT-Creation-Date: 2015-09-09 12:22:59+00:00\n" -
woocommerce-hear-about-us/trunk/i18n/languages/woocommerce-hear-about-us.pot
r1242188 r1258200 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WooCommerce Hear About Us 1.4. 1\n"5 "Project-Id-Version: WooCommerce Hear About Us 1.4.2\n" 6 6 "Report-Msgid-Bugs-To: https://github.com/siteoptimo/woocommerce-hear-about-us/issues\n" 7 7 "POT-Creation-Date: 2015-09-09 12:22:59+00:00\n" -
woocommerce-hear-about-us/trunk/includes/admin/wchau-admin-display-on-order.php
r1116079 r1258200 18 18 19 19 function display_source_with_order_meta( $order ) { 20 $options = WCHAU_Custom_Field::get_options(); 21 $order_source = get_post_meta( $order->id, 'source', true ); 22 if ( $order_source == '' ) { 23 $order_source = __( 'N/A', 'woocommerce-hear-about-us' ); 24 } 25 26 if(isset($options[$order_source])) { 27 $order_source = $options[$order_source]; 28 } 20 $order_source = wchau_get_option_value(get_post_meta( $order->id, 'source', true )); 29 21 30 22 echo '<p><strong>' . __( 'Source', 'woocommerce-hear-about-us' ) . ':</strong> ' . $order_source . '</p>'; 31 32 23 } 33 24 -
woocommerce-hear-about-us/trunk/includes/wchau-custom-field.php
r1242188 r1258200 74 74 if ( ! empty( $_POST['wchau_source'] ) ) { 75 75 76 $options = $this->get_options();77 76 $source = $_POST['wchau_source']; 78 77 79 $source = sanitize_text_field( isset( $options[ $source ] ) ? $options[ $source ] : $source);78 $source = sanitize_text_field( wchau_get_option_value( $source ) ); 80 79 81 80 update_user_meta( $user_id, '_wchau_source', $source ); … … 85 84 function save_source_to_order_meta( $order_id ) { 86 85 if ( ! empty( $_POST['wchau_source'] ) ) { 87 update_post_meta( $order_id, 'source', sanitize_text_field( $_POST['wchau_source']) );86 update_post_meta( $order_id, 'source', wchau_get_option_value( sanitize_text_field( $_POST['wchau_source'] ) ) ); 88 87 } 89 88 } -
woocommerce-hear-about-us/trunk/includes/wchau-functions.php
r1000516 r1258200 25 25 return $filtered; 26 26 } 27 28 function wchau_get_option_value($option, $empty_value = null) { 29 $options = WCHAU_Custom_Field::get_options(); 30 if ( empty( $option ) ) { 31 return !isset($empty_value) ? __( 'N/A', 'woocommerce-hear-about-us' ) : $empty_value; 32 } 33 34 // for compatibility reasons. 35 if(isset($options[$option])) { 36 return $options[$option]; 37 } 38 39 return $option; 40 } -
woocommerce-hear-about-us/trunk/readme.txt
r1242188 r1258200 7 7 Requires at least: WordPress 3.8 and WooCommerce 2.1 8 8 Tested up to: 4.4 9 Stable tag: 1.4. 19 Stable tag: 1.4.2 10 10 11 11 Ask where your new customers come from at checkout. … … 51 51 52 52 == Changelog == 53 = 1.4.2 = 54 * Added custom sortable column to order listing. 55 * Added custom sortable column to user listing. Thanks for your input, [goto10](https://profiles.wordpress.org/goto10/). 56 53 57 = 1.4.1 = 54 58 * Fixed a bug where "other" field was not displayed on the user profile. -
woocommerce-hear-about-us/trunk/woocommerce-hear-about-us.php
r1242188 r1258200 2 2 /* 3 3 Plugin Name: WooCommerce Hear About Us 4 Version: 1.4. 14 Version: 1.4.2 5 5 Plugin URI: http://www.siteoptimo.com/#utm_source=wpadmin&utm_medium=plugin&utm_campaign=wch 6 6 Description: Ask where your new customers come from at checkout. … … 41 41 * 42 42 * @class WooCommerce_HearAboutUs 43 * @version 1.4. 143 * @version 1.4.2 44 44 */ 45 45 final class WooCommerce_HearAboutUs { … … 54 54 * @var string 55 55 */ 56 public static $version = "1.4. 1";56 public static $version = "1.4.2"; 57 57 58 58 /** … … 198 198 new WCHAU_Admin_Setting_Fields(); 199 199 new WCHAU_Admin_Display_On_Order(); 200 new WCHAU_Admin_Column(); 200 201 201 202 }
Note: See TracChangeset
for help on using the changeset viewer.