Changeset 2315108
- Timestamp:
- 05/30/2020 05:07:36 PM (6 years ago)
- Location:
- woo-new-product-info
- Files:
-
- 4 added
- 4 deleted
- 12 edited
- 1 copied
-
tags/1.0.9 (copied) (copied from woo-new-product-info/trunk)
-
tags/1.0.9/css/admin.css (modified) (2 diffs)
-
tags/1.0.9/css/website.php (modified) (1 diff)
-
tags/1.0.9/html/admin.php (modified) (1 diff)
-
tags/1.0.9/js/admin.js (modified) (2 diffs)
-
tags/1.0.9/languages/motpr355_woo_new_product_info-fr_FR.mo (deleted)
-
tags/1.0.9/languages/motpr355_woo_new_product_info-fr_FR.po (deleted)
-
tags/1.0.9/languages/woo-new-product-info-fr_FR.mo (added)
-
tags/1.0.9/languages/woo-new-product-info-fr_FR.po (added)
-
tags/1.0.9/readme.txt (modified) (2 diffs)
-
tags/1.0.9/woo-new-product-info.php (modified) (9 diffs)
-
trunk/css/admin.css (modified) (2 diffs)
-
trunk/css/website.php (modified) (1 diff)
-
trunk/html/admin.php (modified) (1 diff)
-
trunk/js/admin.js (modified) (2 diffs)
-
trunk/languages/motpr355_woo_new_product_info-fr_FR.mo (deleted)
-
trunk/languages/motpr355_woo_new_product_info-fr_FR.po (deleted)
-
trunk/languages/woo-new-product-info-fr_FR.mo (added)
-
trunk/languages/woo-new-product-info-fr_FR.po (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/woo-new-product-info.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-new-product-info/tags/1.0.9/css/admin.css
r1916016 r2315108 1 #motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic { 2 background: black;color: white;border-radius: 25px;padding: 4px 10px;display: inline-block; 1 #motpr355_woo_new_product_info .motpr355_woo_new_product_info_classic { 2 background: black; 3 color: white; 4 border-radius: 25px; 5 padding: 4px 10px; 6 display: inline-block; 7 margin-bottom: 3px; 3 8 } 4 9 … … 25 30 position: relative; 26 31 display: none; 32 animation: motpr355_woo_new_product_info_activate_arrow_blink 1s infinite; 33 } 34 35 @keyframes motpr355_woo_new_product_info_activate_arrow_blink { 36 0% { opacity:0; } 37 50% { opacity:1; } 38 100% { opacity:0; } 27 39 } 28 40 -
woo-new-product-info/tags/1.0.9/css/website.php
r1916016 r2315108 13 13 font-weight: <?php echo esc_html( $this->settings->{$this->settings_enum->font_weight} ) ?>; 14 14 text-transform: <?php echo esc_html( $this->settings->{$this->settings_enum->text_transform} ) ?>; 15 text-align: center; 15 16 border-radius: 25px; 16 17 padding: 4px 10px; 17 display: inline-block; 18 display: inline-block; 18 19 } 19 20 </style> -
woo-new-product-info/tags/1.0.9/html/admin.php
r2019862 r2315108 239 239 </span> 240 240 <span> 241 <span id="motpr355_woo_new_product_info_classic">241 <span class="motpr355_woo_new_product_info_classic" id="motpr355_woo_new_product_info_classic_new1"> 242 242 <?php _e( 'New', 'woo-new-product-info' ) ?> 243 </span> 244 <span class="motpr355_woo_new_product_info_classic" id="motpr355_woo_new_product_info_classic_new2"> 245 <?php _e( 'New!', 'woo-new-product-info' ) ?> 243 246 </span> 244 247 </span> -
woo-new-product-info/tags/1.0.9/js/admin.js
r1916016 r2315108 121 121 122 122 var set_preview = function( text, background_color, color, font_weight, text_transform ) { 123 var new1 = '#motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic_new1'; 124 var new2 = '#motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic_new2'; 125 var show = ''; 126 var hide = ''; 127 if (text === 'New') { 128 show = new1; 129 hide = new2; 130 } else { 131 show = new2; 132 hide = new1; 133 } 134 $( show ).show(); 135 $( hide ).hide(); 123 136 if ( check_color_format( background_color ) && check_color_format( color ) ) { 124 var element = '#motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic';137 var element = '#motpr355_woo_new_product_info .motpr355_woo_new_product_info_classic'; 125 138 $( element ).css( { 126 139 backgroundColor: background_color, … … 128 141 fontWeight: font_weight, 129 142 textTransform: text_transform 130 } ) .text( text );143 } ); 131 144 } 132 145 }; -
woo-new-product-info/tags/1.0.9/readme.txt
r2090703 r2315108 3 3 Tags: WooCommerce, E-commerce, product, new product, new product list, product list, new product tag, new product info, WooCommerce product 4 4 Requires at least: 4.0 5 Tested up to: 5. 25 Tested up to: 5.4 6 6 Requires PHP : 5.4 7 Stable tag: 1.0. 87 Stable tag: 1.0.9 8 8 License: GPLv2 or later 9 9 … … 64 64 == Changelog == 65 65 66 = 1.0.7 =66 = 1.0.7 to 1.0.9 = 67 67 * Translations update 68 68 -
woo-new-product-info/tags/1.0.9/woo-new-product-info.php
r2090703 r2315108 3 3 Plugin Name: WooCommerce new product info 4 4 Description: Differentiate WooCommerce new products by displaying a customizable "New" tag. 5 Version: 1.0. 85 Version: 1.0.9 6 6 Author: Motpr355 7 7 Text Domain: woo-new-product-info … … 57 57 58 58 private function init_data() { 59 $this->configuration_saved = false;60 $this->settings = $this->get_settings();61 59 $this->settings_enum = ( object ) array( 62 60 'nonce' => 'nonce', … … 100 98 'none' => 'none' 101 99 ); 100 101 $this->configuration_saved = false; 102 $this->settings = $this->get_settings(); 102 103 } 103 104 … … 188 189 189 190 public function installed( $plugin ) { 190 if( $plugin === plugin_basename( __FILE__ ) ) {191 exit( wp_redirect( admin_url( 'edit.php?post_type=product&page=motpr355_woo_new_product_info' ) ) );191 if( $plugin === plugin_basename( __FILE__ ) && is_plugin_active( 'woocommerce/woocommerce.php' ) ) { 192 exit( wp_redirect( admin_url( 'edit.php?post_type=product&page=motpr355_woo_new_product_info' ) ) ); 192 193 } 193 194 } … … 199 200 public function update_plugin( $update, $item ) { 200 201 $plugins = array( 201 'motpr355-woo-new-product-info/motpr355-woo-new-product-info.php',202 'woo-new-product-info/motpr355-woo-new-product-info.php',203 202 'woo-new-product-info/woo-new-product-info.php', 204 'motpr355-woo-new-product-info',205 203 'woo-new-product-info', 206 'motpr355-woo-new-product-info.php',207 204 'woo-new-product-info.php' 208 205 ); … … 244 241 plugins_url( 'js/admin.js', __FILE__ ), 245 242 array( 'wp-color-picker' ), 246 '1.0. 0',243 '1.0.9', 247 244 true 248 245 ); … … 257 254 plugins_url( 'js/admin-extensions.js', __FILE__ ), 258 255 array(), 259 '1.0. 0',256 '1.0.9', 260 257 true 261 258 ); … … 264 261 'motpr355_woo_new_product_info_translations', 265 262 array( 266 'woo_inactive' => __( 263 'woo_inactive' => __( 267 264 'WooCommerce must be actived', 268 265 'woo-new-product-info' … … 285 282 plugins_url( 'css/admin.css', __FILE__ ), 286 283 array(), 287 '1.0. 0'284 '1.0.9' 288 285 ); 289 286 wp_enqueue_style( 'motpr355_woo_new_product_info_style' ); -
woo-new-product-info/trunk/css/admin.css
r1916016 r2315108 1 #motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic { 2 background: black;color: white;border-radius: 25px;padding: 4px 10px;display: inline-block; 1 #motpr355_woo_new_product_info .motpr355_woo_new_product_info_classic { 2 background: black; 3 color: white; 4 border-radius: 25px; 5 padding: 4px 10px; 6 display: inline-block; 7 margin-bottom: 3px; 3 8 } 4 9 … … 25 30 position: relative; 26 31 display: none; 32 animation: motpr355_woo_new_product_info_activate_arrow_blink 1s infinite; 33 } 34 35 @keyframes motpr355_woo_new_product_info_activate_arrow_blink { 36 0% { opacity:0; } 37 50% { opacity:1; } 38 100% { opacity:0; } 27 39 } 28 40 -
woo-new-product-info/trunk/css/website.php
r1916016 r2315108 13 13 font-weight: <?php echo esc_html( $this->settings->{$this->settings_enum->font_weight} ) ?>; 14 14 text-transform: <?php echo esc_html( $this->settings->{$this->settings_enum->text_transform} ) ?>; 15 text-align: center; 15 16 border-radius: 25px; 16 17 padding: 4px 10px; 17 display: inline-block; 18 display: inline-block; 18 19 } 19 20 </style> -
woo-new-product-info/trunk/html/admin.php
r2019862 r2315108 239 239 </span> 240 240 <span> 241 <span id="motpr355_woo_new_product_info_classic">241 <span class="motpr355_woo_new_product_info_classic" id="motpr355_woo_new_product_info_classic_new1"> 242 242 <?php _e( 'New', 'woo-new-product-info' ) ?> 243 </span> 244 <span class="motpr355_woo_new_product_info_classic" id="motpr355_woo_new_product_info_classic_new2"> 245 <?php _e( 'New!', 'woo-new-product-info' ) ?> 243 246 </span> 244 247 </span> -
woo-new-product-info/trunk/js/admin.js
r1916016 r2315108 121 121 122 122 var set_preview = function( text, background_color, color, font_weight, text_transform ) { 123 var new1 = '#motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic_new1'; 124 var new2 = '#motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic_new2'; 125 var show = ''; 126 var hide = ''; 127 if (text === 'New') { 128 show = new1; 129 hide = new2; 130 } else { 131 show = new2; 132 hide = new1; 133 } 134 $( show ).show(); 135 $( hide ).hide(); 123 136 if ( check_color_format( background_color ) && check_color_format( color ) ) { 124 var element = '#motpr355_woo_new_product_info #motpr355_woo_new_product_info_classic';137 var element = '#motpr355_woo_new_product_info .motpr355_woo_new_product_info_classic'; 125 138 $( element ).css( { 126 139 backgroundColor: background_color, … … 128 141 fontWeight: font_weight, 129 142 textTransform: text_transform 130 } ) .text( text );143 } ); 131 144 } 132 145 }; -
woo-new-product-info/trunk/readme.txt
r2090703 r2315108 3 3 Tags: WooCommerce, E-commerce, product, new product, new product list, product list, new product tag, new product info, WooCommerce product 4 4 Requires at least: 4.0 5 Tested up to: 5. 25 Tested up to: 5.4 6 6 Requires PHP : 5.4 7 Stable tag: 1.0. 87 Stable tag: 1.0.9 8 8 License: GPLv2 or later 9 9 … … 64 64 == Changelog == 65 65 66 = 1.0.7 =66 = 1.0.7 to 1.0.9 = 67 67 * Translations update 68 68 -
woo-new-product-info/trunk/woo-new-product-info.php
r2090703 r2315108 3 3 Plugin Name: WooCommerce new product info 4 4 Description: Differentiate WooCommerce new products by displaying a customizable "New" tag. 5 Version: 1.0. 85 Version: 1.0.9 6 6 Author: Motpr355 7 7 Text Domain: woo-new-product-info … … 57 57 58 58 private function init_data() { 59 $this->configuration_saved = false;60 $this->settings = $this->get_settings();61 59 $this->settings_enum = ( object ) array( 62 60 'nonce' => 'nonce', … … 100 98 'none' => 'none' 101 99 ); 100 101 $this->configuration_saved = false; 102 $this->settings = $this->get_settings(); 102 103 } 103 104 … … 188 189 189 190 public function installed( $plugin ) { 190 if( $plugin === plugin_basename( __FILE__ ) ) {191 exit( wp_redirect( admin_url( 'edit.php?post_type=product&page=motpr355_woo_new_product_info' ) ) );191 if( $plugin === plugin_basename( __FILE__ ) && is_plugin_active( 'woocommerce/woocommerce.php' ) ) { 192 exit( wp_redirect( admin_url( 'edit.php?post_type=product&page=motpr355_woo_new_product_info' ) ) ); 192 193 } 193 194 } … … 199 200 public function update_plugin( $update, $item ) { 200 201 $plugins = array( 201 'motpr355-woo-new-product-info/motpr355-woo-new-product-info.php',202 'woo-new-product-info/motpr355-woo-new-product-info.php',203 202 'woo-new-product-info/woo-new-product-info.php', 204 'motpr355-woo-new-product-info',205 203 'woo-new-product-info', 206 'motpr355-woo-new-product-info.php',207 204 'woo-new-product-info.php' 208 205 ); … … 244 241 plugins_url( 'js/admin.js', __FILE__ ), 245 242 array( 'wp-color-picker' ), 246 '1.0. 0',243 '1.0.9', 247 244 true 248 245 ); … … 257 254 plugins_url( 'js/admin-extensions.js', __FILE__ ), 258 255 array(), 259 '1.0. 0',256 '1.0.9', 260 257 true 261 258 ); … … 264 261 'motpr355_woo_new_product_info_translations', 265 262 array( 266 'woo_inactive' => __( 263 'woo_inactive' => __( 267 264 'WooCommerce must be actived', 268 265 'woo-new-product-info' … … 285 282 plugins_url( 'css/admin.css', __FILE__ ), 286 283 array(), 287 '1.0. 0'284 '1.0.9' 288 285 ); 289 286 wp_enqueue_style( 'motpr355_woo_new_product_info_style' );
Note: See TracChangeset
for help on using the changeset viewer.