Changeset 3309805
- Timestamp:
- 06/11/2025 12:41:33 PM (10 months ago)
- Location:
- category-banner-management-for-woocommerce
- Files:
-
- 10 added
- 3 edited
-
tags/2.1 (added)
-
tags/2.1/admin (added)
-
tags/2.1/admin/settings.php (added)
-
tags/2.1/assets (added)
-
tags/2.1/assets/css (added)
-
tags/2.1/assets/css/admin.css (added)
-
tags/2.1/assets/js (added)
-
tags/2.1/assets/js/frontend.js (added)
-
tags/2.1/category-banner-management-for-woocommerce.php (added)
-
tags/2.1/readme.txt (added)
-
trunk/admin/settings.php (modified) (4 diffs)
-
trunk/category-banner-management-for-woocommerce.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
category-banner-management-for-woocommerce/trunk/admin/settings.php
r3302529 r3309805 38 38 <input type="date" class="widefat" name="cbmfwc_banner_groups[<?php echo $index; ?>][end_date]" value="<?php echo esc_attr($group['end_date'] ?? ''); ?>" /> 39 39 </label></p> 40 <p><button class="button cbmfwc-remove-banner" type="button" style="margin-top:10px; background-color: #d63638; color: #fff;">Remove Banner</button> 41 </p> 40 42 <hr> 41 43 </div> … … 74 76 <input type="date" class="widefat" name="cbmfwc_banner_groups[` + groupIndex + `][end_date]" /> 75 77 </label></p> 78 <p><button class="button cbmfwc-remove-banner" type="button" style="margin-top:10px; background-color: #d63638; color: #fff;">Remove Banner</button> 79 </p> 76 80 <hr> 77 81 </div>`; … … 99 103 frame.open(); 100 104 }); 105 106 $(document).on('click', '.cbmfwc-remove-banner', function(e) { 107 e.preventDefault(); 108 $(this).closest('.cbmfwc-banner-group').remove(); 109 }); 101 110 }); 102 111 </script> … … 117 126 $sanitized = []; 118 127 foreach ($_POST['cbmfwc_banner_groups'] as $group) { 119 $sanitized[] = [ 120 'desktop' => esc_url_raw($group['desktop']), 121 'tablet' => esc_url_raw($group['tablet']), 122 'mobile' => esc_url_raw($group['mobile']), 123 'link' => esc_url_raw($group['link']), 124 'link_new_tab' => sanitize_text_field($group['link_new_tab']), 125 'start_date' => sanitize_text_field($group['start_date']), 126 'end_date' => sanitize_text_field($group['end_date']), 127 ]; 128 if (!empty($group['desktop']) || !empty($group['tablet']) || !empty($group['mobile'])) { 129 $sanitized[] = [ 130 'desktop' => esc_url_raw($group['desktop']), 131 'tablet' => esc_url_raw($group['tablet']), 132 'mobile' => esc_url_raw($group['mobile']), 133 'link' => esc_url_raw($group['link']), 134 'link_new_tab' => sanitize_text_field($group['link_new_tab']), 135 'start_date' => sanitize_text_field($group['start_date']), 136 'end_date' => sanitize_text_field($group['end_date']), 137 ]; 138 } 128 139 } 129 140 update_term_meta($term_id, 'cbmfwc_banner_groups', $sanitized); -
category-banner-management-for-woocommerce/trunk/category-banner-management-for-woocommerce.php
r3302529 r3309805 6 6 * Author: DoubleDome Digital Marketing 7 7 * Author URI: https://www.doubledome.com/category-banner-management-for-woocommerce 8 * Version: 2. 08 * Version: 2.1 9 9 * License: GPL-2.0+ 10 10 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 17 17 define( 'CBMFWC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 18 18 define( 'CBMFWC_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 19 define( 'CBMFWC_VERSION', '2. 0' );19 define( 'CBMFWC_VERSION', '2.1' ); 20 20 21 21 // Include admin settings … … 26 26 function cbmfwc_load_assets() { 27 27 if ( is_product_category() ) { 28 wp_enqueue_script( 'cbmfwc-frontend', CBMFWC_PLUGIN_URL . 'assets/js/frontend.js', array('jquery'), '2. 0', true );28 wp_enqueue_script( 'cbmfwc-frontend', CBMFWC_PLUGIN_URL . 'assets/js/frontend.js', array('jquery'), '2.1', true ); 29 29 wp_enqueue_style( 'cbmfwc-frontend', CBMFWC_PLUGIN_URL . 'assets/css/admin.css' ); 30 30 wp_enqueue_style('swiper', 'https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css', array(), '11'); -
category-banner-management-for-woocommerce/trunk/readme.txt
r3302530 r3309805 4 4 Requires at least: 4.0 5 5 Tested up to: 6.8.1 6 Stable tag: 2. 06 Stable tag: 2.1 7 7 License: GPL-2.0+ 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 51 51 == Changelog == 52 52 53 = 2.1 = 54 * Added Delete Banner block option. 55 53 56 = 2.0 = 54 57 * Major rewrite and upgrade of the plugin system.
Note: See TracChangeset
for help on using the changeset viewer.