Changeset 3337250
- Timestamp:
- 07/31/2025 11:56:05 AM (8 months ago)
- Location:
- neon-product-designer-for-woocommerce
- Files:
-
- 136 added
- 6 edited
-
tags/2.2.0 (added)
-
tags/2.2.0/LICENSE.txt (added)
-
tags/2.2.0/README.md (added)
-
tags/2.2.0/README.txt (added)
-
tags/2.2.0/User Manual.pdf (added)
-
tags/2.2.0/admin (added)
-
tags/2.2.0/admin/class-neon-product-designer-admin.php (added)
-
tags/2.2.0/admin/class-npd-config.php (added)
-
tags/2.2.0/admin/class-npd-product.php (added)
-
tags/2.2.0/admin/css (added)
-
tags/2.2.0/admin/css/neon-product-designer-admin.css (added)
-
tags/2.2.0/admin/css/select2.min.css (added)
-
tags/2.2.0/admin/images (added)
-
tags/2.2.0/admin/images/im_asowp-icon.png (added)
-
tags/2.2.0/admin/images/im_ncpc-icon.png (added)
-
tags/2.2.0/admin/images/npd-dashicon-2.png (added)
-
tags/2.2.0/admin/images/npd-dashicon.png (added)
-
tags/2.2.0/admin/images/sprite.png (added)
-
tags/2.2.0/admin/index.php (added)
-
tags/2.2.0/admin/js (added)
-
tags/2.2.0/admin/js/SpryTabbedPanels.min.js (added)
-
tags/2.2.0/admin/js/google-fonts.json (added)
-
tags/2.2.0/admin/js/modal (added)
-
tags/2.2.0/admin/js/modal/modal.min.css (added)
-
tags/2.2.0/admin/js/modal/modal.min.js (added)
-
tags/2.2.0/admin/js/neon-product-designer-admin.js (added)
-
tags/2.2.0/admin/js/npd-free-promo.js (added)
-
tags/2.2.0/admin/js/select2.min.js (added)
-
tags/2.2.0/admin/js/vc-admin-utils-scripts.js (added)
-
tags/2.2.0/admin/partials (added)
-
tags/2.2.0/admin/partials/neon-product-designer-admin-display.php (added)
-
tags/2.2.0/changelog.txt (added)
-
tags/2.2.0/includes (added)
-
tags/2.2.0/includes/class-neon-product-designer-activator.php (added)
-
tags/2.2.0/includes/class-neon-product-designer-deactivator.php (added)
-
tags/2.2.0/includes/class-neon-product-designer-i18n.php (added)
-
tags/2.2.0/includes/class-neon-product-designer-loader.php (added)
-
tags/2.2.0/includes/class-neon-product-designer.php (added)
-
tags/2.2.0/includes/class-npd-color.php (added)
-
tags/2.2.0/includes/class-npd-colors.php (added)
-
tags/2.2.0/includes/class-npd-design.php (added)
-
tags/2.2.0/includes/class-npd-editor.php (added)
-
tags/2.2.0/includes/class-npd-scenes.php (added)
-
tags/2.2.0/includes/functions.php (added)
-
tags/2.2.0/includes/index.php (added)
-
tags/2.2.0/includes/kali-admin-tools (added)
-
tags/2.2.0/includes/kali-admin-tools/css (added)
-
tags/2.2.0/includes/kali-admin-tools/css/kali-admin-ui.css (added)
-
tags/2.2.0/includes/kali-admin-tools/css/select2.min.css (added)
-
tags/2.2.0/includes/kali-admin-tools/js (added)
-
tags/2.2.0/includes/kali-admin-tools/js/SpryTabbedPanels.min.js (added)
-
tags/2.2.0/includes/kali-admin-tools/js/kali-admin-tools-scripts.js (added)
-
tags/2.2.0/includes/kali-admin-tools/js/modal (added)
-
tags/2.2.0/includes/kali-admin-tools/js/modal/modal.min.css (added)
-
tags/2.2.0/includes/kali-admin-tools/js/modal/modal.min.js (added)
-
tags/2.2.0/includes/kali-admin-tools/js/select2.min.js (added)
-
tags/2.2.0/includes/kali-admin-tools/kali-admin-tools.php (added)
-
tags/2.2.0/includes/kali-admin-tools/readme.md (added)
-
tags/2.2.0/includes/npd-add-fonts.php (added)
-
tags/2.2.0/includes/skins (added)
-
tags/2.2.0/includes/skins/default (added)
-
tags/2.2.0/includes/skins/default/assets (added)
-
tags/2.2.0/includes/skins/default/assets/css (added)
-
tags/2.2.0/includes/skins/default/assets/css/ajax-loader.gif (added)
-
tags/2.2.0/includes/skins/default/assets/css/editor-styles.css (added)
-
tags/2.2.0/includes/skins/default/assets/css/font-awesome.css (added)
-
tags/2.2.0/includes/skins/default/assets/css/fontawesome-all.css (added)
-
tags/2.2.0/includes/skins/default/assets/css/jquery.mCustomScrollbar.min.css (added)
-
tags/2.2.0/includes/skins/default/assets/css/slick-theme.css (added)
-
tags/2.2.0/includes/skins/default/assets/css/slick.css (added)
-
tags/2.2.0/includes/skins/default/assets/css/spectrum.min.css (added)
-
tags/2.2.0/includes/skins/default/assets/fonts (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/FontAwesome.otf (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/font-awesome.css (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/fontawesome-all.css (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/fontawesome-webfont.eot (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/fontawesome-webfont.svg (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/fontawesome-webfont.ttf (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/fontawesome-webfont.woff (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/fontawesome-webfont.woff2 (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/icomoon.eot (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/icomoon.svg (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/icomoon.ttf (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/icomoon.woff (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/slick.eot (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/slick.svg (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/slick.ttf (added)
-
tags/2.2.0/includes/skins/default/assets/fonts/slick.woff (added)
-
tags/2.2.0/includes/skins/default/assets/img (added)
-
tags/2.2.0/includes/skins/default/assets/img/loader.gif (added)
-
tags/2.2.0/includes/skins/default/assets/js (added)
-
tags/2.2.0/includes/skins/default/assets/js/editor-scripts.js (added)
-
tags/2.2.0/includes/skins/default/assets/js/jquery.mCustomScrollbar.min.js (added)
-
tags/2.2.0/includes/skins/default/assets/js/slick.min.js (added)
-
tags/2.2.0/includes/skins/default/assets/js/spectrum.min.js (added)
-
tags/2.2.0/includes/skins/default/assets/js/tooltip.min.js (added)
-
tags/2.2.0/includes/skins/default/class-npd-skin-default.php (added)
-
tags/2.2.0/includes/vc-admin-utils.php (added)
-
tags/2.2.0/index.php (added)
-
tags/2.2.0/languages (added)
-
tags/2.2.0/languages/en_US.mo (added)
-
tags/2.2.0/languages/en_US.po (added)
-
tags/2.2.0/languages/neon-product-designer-en_US.pot (added)
-
tags/2.2.0/languages/neon-product-designer.pot (added)
-
tags/2.2.0/neon-product-designer.php (added)
-
tags/2.2.0/public (added)
-
tags/2.2.0/public/class-neon-product-designer-public.php (added)
-
tags/2.2.0/public/css (added)
-
tags/2.2.0/public/css/jquery.qtip.min.css (added)
-
tags/2.2.0/public/css/neon-product-designer-public.css (added)
-
tags/2.2.0/public/index.php (added)
-
tags/2.2.0/public/js (added)
-
tags/2.2.0/public/js/SpryTabbedPanels.min.js (added)
-
tags/2.2.0/public/js/accounting.min.js (added)
-
tags/2.2.0/public/js/editor-forms.js (added)
-
tags/2.2.0/public/js/editor-img.js (added)
-
tags/2.2.0/public/js/editor-sizes.js (added)
-
tags/2.2.0/public/js/editor.js (added)
-
tags/2.2.0/public/js/fabric.js (added)
-
tags/2.2.0/public/js/html2canvas.js (added)
-
tags/2.2.0/public/js/jquery.form.min.js (added)
-
tags/2.2.0/public/js/jquery.qtip.min.js (added)
-
tags/2.2.0/public/js/jquery.serializejson.min.js (added)
-
tags/2.2.0/public/js/modal (added)
-
tags/2.2.0/public/js/modal/modal.css (added)
-
tags/2.2.0/public/js/modal/modal.js (added)
-
tags/2.2.0/public/js/modal/modal.min.css (added)
-
tags/2.2.0/public/js/modal/modal.min.js (added)
-
tags/2.2.0/public/js/neon-product-designer-public.js (added)
-
tags/2.2.0/public/js/wp-js-hooks.min.js (added)
-
tags/2.2.0/public/partials (added)
-
tags/2.2.0/public/partials/neon-product-designer-public-display.php (added)
-
tags/2.2.0/uninstall.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/admin/class-neon-product-designer-admin.php (modified) (32 diffs)
-
trunk/admin/css/neon-product-designer-admin.css (modified) (4 diffs)
-
trunk/admin/images/im_asowp-icon.png (added)
-
trunk/admin/images/im_ncpc-icon.png (added)
-
trunk/admin/js/npd-free-promo.js (added)
-
trunk/includes/class-neon-product-designer.php (modified) (13 diffs)
-
trunk/neon-product-designer.php (modified) (7 diffs)
-
trunk/public/css/neon-product-designer-public.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
neon-product-designer-for-woocommerce/trunk/README.txt
r3130043 r3337250 5 5 Requires at least: 5.0 6 6 Requires PHP: 7.0 7 Tested up to: 6. 6.18 Stable tag: 2. 1.17 Tested up to: 6.8.2 8 Stable tag: 2.2.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 117 117 118 118 == Changelog == 119 = 2.2.0 = 120 * 31 Jul 2025* 121 -Change in the version of WordPress used for testing. 122 -Addition of admin notice to present new plugins currently under maintenance. 123 119 124 = 2.1.1 = 120 125 * 02 August 2024* -
neon-product-designer-for-woocommerce/trunk/admin/class-neon-product-designer-admin.php
r2937134 r3337250 20 20 * @author Vertim Coders <[email protected]> 21 21 */ 22 class Neon_Product_Designer_Admin { 22 class Neon_Product_Designer_Admin 23 { 23 24 24 25 /** … … 47 48 * @param string $version The version of this plugin. 48 49 */ 49 public function __construct( $npd, $version ) { 50 51 $this->npd = $npd; 50 public function __construct($npd, $version) 51 { 52 53 $this->npd = $npd; 52 54 $this->version = $version; 53 55 … … 59 61 * @since 1.0.0 60 62 */ 61 public function enqueue_styles() { 63 public function enqueue_styles() 64 { 62 65 63 66 /** … … 72 75 * class. 73 76 */ 74 wp_enqueue_style( 'wp-color-picker');77 wp_enqueue_style('wp-color-picker'); 75 78 76 79 wp_enqueue_style( 77 80 $this->npd, 78 plugin_dir_url( __FILE__) . 'css/neon-product-designer-admin.css',81 plugin_dir_url(__FILE__) . 'css/neon-product-designer-admin.css', 79 82 array(), 80 83 $this->version, … … 101 104 'kali-modal', 102 105 NPD_URL . 'includes/kali-admin-tools/js/modal/modal.min.css', 103 array( 'jquery'),106 array('jquery'), 104 107 $this->version, 105 108 false … … 113 116 * @since 1.0.0 114 117 */ 115 public function enqueue_scripts() { 118 public function enqueue_scripts() 119 { 116 120 117 121 /** … … 129 133 wp_enqueue_script( 130 134 'iris', 131 admin_url( 'js/iris.min.js'),135 admin_url('js/iris.min.js'), 132 136 array( 133 137 'jquery-ui-draggable', … … 140 144 141 145 $colorpicker_l10n = array( 142 'clear' => __( 'Clear'),143 'defaultString' => __( 'Default'),144 'pick' => __( 'Select Color'),145 'current' => __( 'Current Color'),146 'clear' => __('Clear'), 147 'defaultString' => __('Default'), 148 'pick' => __('Select Color'), 149 'current' => __('Current Color'), 146 150 ); 147 151 … … 154 158 wp_enqueue_script( 155 159 $this->npd, 156 plugin_dir_url( __FILE__) .160 plugin_dir_url(__FILE__) . 157 161 'js/neon-product-designer-admin.js', 158 array( 'jquery'),162 array('jquery'), 159 163 $this->version, 160 164 false 165 ); 166 wp_enqueue_script( 167 "npd-free-promo", 168 NPD_URL . 169 'admin/js/npd-free-promo.js', 170 array('jquery'), 171 $this->version, 172 true 161 173 ); 162 174 … … 164 176 'select2', 165 177 NPD_URL . 'includes/kali-admin-tools/js/select2.min.js', 166 array( 'jquery'),178 array('jquery'), 167 179 $this->version, 168 180 false … … 172 184 'SpryTabbedPanels', 173 185 NPD_URL . 'includes/kali-admin-tools/js/SpryTabbedPanels.min.js', 174 array( 'jquery'),186 array('jquery'), 175 187 $this->version, 176 188 false … … 188 200 'kali-admin-tools', 189 201 NPD_URL . 'includes/kali-admin-tools/js/kali-admin-tools-scripts.js', 190 array( 'jquery'),202 array('jquery'), 191 203 $this->version, 192 204 true … … 196 208 'home_url', 197 209 array( 198 'ajaxurl' => admin_url( 'admin-ajax.php'),210 'ajaxurl' => admin_url('admin-ajax.php'), 199 211 'data_var_1' => 'value 1', 200 212 'data_var_2' => 'value 2', … … 207 219 * Builds all the plugin menu and submenu 208 220 */ 209 public function add_npd_parts_submenu() { 210 if ( class_exists( 'WooCommerce' ) ) { 221 public function add_npd_parts_submenu() 222 { 223 if (class_exists('WooCommerce')) { 211 224 global $submenu; 212 225 $icon = NPD_URL . 'admin/images/npd-dashicon.png'; … … 217 230 'manage_product_terms', 218 231 'npd-manage-dashboard', 219 array( $this, 'get_fonts_page'),232 array($this, 'get_fonts_page'), 220 233 $icon, 221 234 10 … … 224 237 add_submenu_page( 225 238 'npd-manage-dashboard', 226 __( 'Manage Fonts', 'neon-product-designer'),227 __( 'Manage Fonts', 'neon-product-designer'),239 __('Manage Fonts', 'neon-product-designer'), 240 __('Manage Fonts', 'neon-product-designer'), 228 241 'manage_product_terms', 229 242 'npd-manage-fonts', 230 array( $this, 'get_fonts_page')243 array($this, 'get_fonts_page') 231 244 ); 232 245 233 246 add_submenu_page( 234 247 'npd-manage-dashboard', 235 __( 'Manage Scenes', 'neon-product-designer'),236 __( 'Manage Scenes', 'neon-product-designer'),248 __('Manage Scenes', 'neon-product-designer'), 249 __('Manage Scenes', 'neon-product-designer'), 237 250 'manage_product_terms', 238 251 'edit.php?post_type=npd-scenes', … … 246 259 'neon-product-designer' 247 260 ), 248 __( 'Manage Colors', 'neon-product-designer'),261 __('Manage Colors', 'neon-product-designer'), 249 262 'manage_product_terms', 250 263 'edit.php?post_type=npd-colors-palette', … … 259 272 'neon-product-designer' 260 273 ), 261 __( 'Configurations', 'neon-product-designer'),274 __('Configurations', 'neon-product-designer'), 262 275 'manage_product_terms', 263 276 'edit.php?post_type=npd-config', 264 277 false 265 278 ); 266 279 267 280 268 281 add_submenu_page( 269 282 'npd-manage-dashboard', 270 __( 'Settings', 'neon-product-designer'),271 __( 'Settings', 'neon-product-designer'),283 __('Settings', 'neon-product-designer'), 284 __('Settings', 'neon-product-designer'), 272 285 'manage_product_terms', 273 286 'npd-manage-settings', 274 array( $this, 'get_settings_page')287 array($this, 'get_settings_page') 275 288 ); 276 289 277 $submenu[ 'npd-manage-dashboard' ][] = array( '<div id="user-manual">Go Pro</div>', 'manage_product_terms', 'https://neon-configurator.vertimcoders.com?utm_source=free_version&utm_medium=cpc&utm_campaign=Neon%20Product%20Designer');278 290 $submenu['npd-manage-dashboard'][] = array('<div id="user-manual">Go Pro</div>', 'manage_product_terms', 'https://neon-configurator.vertimcoders.com?utm_source=free_version&utm_medium=cpc&utm_campaign=Neon%20Product%20Designer'); 291 279 292 } 280 293 } … … 283 296 * Builds the fonts management page 284 297 */ 285 public function get_fonts_page() { 298 public function get_fonts_page() 299 { 286 300 include_once NPD_DIR . '/includes/npd-add-fonts.php'; 287 301 npd_add_fonts(); … … 294 308 * @return array $mimes 295 309 */ 296 public function npd_add_custom_mime_types( $mimes ) { 310 public function npd_add_custom_mime_types($mimes) 311 { 297 312 return array_merge( 298 313 $mimes, … … 305 320 } 306 321 307 public function vc_get_max_input_vars_php_ini() { 308 $total_max_normal = ini_get( 'max_input_vars' ); 309 $msg = __( "Your max input var is <strong>$total_max_normal</strong> but this page contains <strong>{nb}</strong> fields. You may experience a lost of data after saving. In order to fix this issue, please increase <strong>the max_input_vars</strong> value in your php.ini file.", 'neon-product-designer' ); 310 322 public function vc_get_max_input_vars_php_ini() 323 { 324 $total_max_normal = ini_get('max_input_vars'); 325 $msg = __("Your max input var is <strong>$total_max_normal</strong> but this page contains <strong>{nb}</strong> fields. You may experience a lost of data after saving. In order to fix this issue, please increase <strong>the max_input_vars</strong> value in your php.ini file.", 'neon-product-designer'); 326 311 327 $allowed_html = array( 312 'br'=> array(),313 'b'=> array(),314 'em'=> array(),315 'strong' => array(),328 'br' => array(), 329 'b' => array(), 330 'em' => array(), 331 'strong' => array(), 316 332 ); 317 333 … … 320 336 <script type="text/javascript"> 321 337 var vc_max_input_vars = <?php echo esc_html($total_max_normal); ?>; 322 var vc_max_input_msg = "<?php echo wp_kses( $msg, $allowed_html); ?>";323 </script> 338 var vc_max_input_msg = "<?php echo wp_kses($msg, $allowed_html); ?>"; 339 </script> 324 340 <?php 325 341 } … … 328 344 * Initialize the plugin sessions 329 345 */ 330 function init_sessions() { 331 if ( ! session_id() ) { 346 function init_sessions() 347 { 348 if (!session_id()) { 332 349 session_start(); 333 350 } 334 351 335 if ( ! isset( $_SESSION['npd-data-to-load'] )) {352 if (!isset($_SESSION['npd-data-to-load'])) { 336 353 $_SESSION['npd-data-to-load'] = ''; 337 354 } … … 345 362 * @global array $npd_settings Settings 346 363 */ 347 function init_globals() { 364 function init_globals() 365 { 348 366 global $npd_settings; 349 $npd_settings['npd-general-options'] = get_option( 'npd-general-options' ); 350 } 351 352 private function get_admin_option_field( $title, $option_group, $field_name, $type, $default, $class, $css, $tip, $options_array ) { 367 $npd_settings['npd-general-options'] = get_option('npd-general-options'); 368 } 369 370 private function get_admin_option_field($title, $option_group, $field_name, $type, $default, $class, $css, $tip, $options_array) 371 { 353 372 $field = array( 354 'title' => __( $title, 'neon-product-designer'),355 'name' => $option_group . '[' . $field_name . ']',356 'type' => $type,373 'title' => __($title, 'neon-product-designer'), 374 'name' => $option_group . '[' . $field_name . ']', 375 'type' => $type, 357 376 'default' => $default, 358 'class' => $class,359 'css' => $css,360 'desc' => __( $tip, 'neon-product-designer'),361 ); 362 if ( ! empty( $options_array )) {377 'class' => $class, 378 'css' => $css, 379 'desc' => __($tip, 'neon-product-designer'), 380 ); 381 if (!empty($options_array)) { 363 382 $field['options'] = $options_array; 364 383 } … … 371 390 * Builds the settings page 372 391 */ 373 function get_settings_page() { 392 function get_settings_page() 393 { 374 394 npd_remove_transients(); 375 395 376 if ( isset( $_POST ) && ! empty( $_POST )) {396 if (isset($_POST) && !empty($_POST)) { 377 397 $this->save_npd_settings_tab_options(); 378 398 global $wp_rewrite; 379 $wp_rewrite->flush_rules( false);399 $wp_rewrite->flush_rules(false); 380 400 } 381 401 382 402 $tab = array( 383 'title' => 'General',384 'content' => $this->get_general_settings()403 'title' => 'General', 404 'content' => $this->get_general_settings() 385 405 ); 386 406 387 407 $pannel_block = array(); 388 408 389 array_push( $pannel_block, $tab);390 391 $pannel_block = apply_filters( 'npd_general_setting_panel', $pannel_block);409 array_push($pannel_block, $tab); 410 411 $pannel_block = apply_filters('npd_general_setting_panel', $pannel_block); 392 412 393 413 wp_enqueue_media(); … … 396 416 <div id="npd-settings"> 397 417 <div class="wrap"> 398 <h2><?php esc_html_e( 'Neon Product Designer Settings', 'neon-product-designer'); ?></h2>418 <h2><?php esc_html_e('Neon Product Designer Settings', 'neon-product-designer'); ?></h2> 399 419 </div> 400 420 401 421 <?php 402 $panel_id = 1;403 foreach ($pannel_block as $key => $panel) {404 ?>405 <div id="TabbedPanels<?php echo esc_attr($panel_id) ;?>" class="TabbedPanels">406 <ul class="TabbedPanelsTabGroup ">407 <li class="TabbedPanelsTab " tabindex="1"><span><strong><?php esc_html_e( $panel['title'], 'neon-product-designer' ); ?></strong></span> </li>408 < /ul>409 410 <div class="TabbedPanelsContentGroup">411 <div class="TabbedPanelsContent"> 412 <div class='npd-grid npd-grid-pad'>413 <?php echo $panel['content'];414 ?>415 </div>416 </div>422 $panel_id = 1; 423 foreach ($pannel_block as $key => $panel) { 424 ?> 425 <div id="TabbedPanels<?php echo esc_attr($panel_id); ?>" class="TabbedPanels"> 426 <ul class="TabbedPanelsTabGroup "> 427 <li class="TabbedPanelsTab " tabindex="1"> 428 <span><strong><?php esc_html_e($panel['title'], 'neon-product-designer'); ?></strong></span> 429 </li> 430 </ul> 431 432 <div class="TabbedPanelsContentGroup"> 433 <div class="TabbedPanelsContent"> 434 <div class='npd-grid npd-grid-pad'> 435 <?php echo $panel['content']; 436 ?> 417 437 </div> 418 438 </div> 419 <?php 420 $panel_id += 1; 421 } 439 </div> 440 </div> 441 <?php 442 $panel_id += 1; 443 } 422 444 ?> 423 445 424 446 </div> 425 <input type="hidden" name="npdw-nonce-security" value="<?php echo esc_attr(wp_create_nonce('npdw-nonce-security-action')) ;?>" class=""> 426 <input type="submit" value="<?php esc_attr_e( 'Save', 'neon-product-designer' ); ?>" class="button button-primary button-large mg-top-10-i"> 447 <input type="hidden" name="npdw-nonce-security" 448 value="<?php echo esc_attr(wp_create_nonce('npdw-nonce-security-action')); ?>" class=""> 449 <input type="submit" value="<?php esc_attr_e('Save', 'neon-product-designer'); ?>" 450 class="button button-primary button-large mg-top-10-i"> 427 451 </form> 428 452 <?php … … 432 456 * Save the settings 433 457 */ 434 private function save_npd_settings_tab_options() {435 if(isset($_POST['npdw-nonce-security']))436 {437 if ( wp_verify_nonce($_POST['npdw-nonce-security'], 'npdw-nonce-security-action')) {438 439 if ( isset( $_POST ) && ! empty( $_POST )) {440 foreach ( $_POST as $key => $values) {441 $opt_value = map_deep( $values, 'sanitize_text_field');442 update_option( $key, $opt_value);458 private function save_npd_settings_tab_options() 459 { 460 if (isset($_POST['npdw-nonce-security'])) { 461 if (wp_verify_nonce($_POST['npdw-nonce-security'], 'npdw-nonce-security-action')) { 462 463 if (isset($_POST) && !empty($_POST)) { 464 foreach ($_POST as $key => $values) { 465 $opt_value = map_deep($values, 'sanitize_text_field'); 466 update_option($key, $opt_value); 443 467 } 444 468 445 469 $this->init_globals(); 446 470 ?> 447 <div id="message" class="updated below-h2"><p><?php echo __( 'Settings successfully saved.', 'neon-product-designer' ); ?></p></div> 471 <div id="message" class="updated below-h2"> 472 <p><?php echo __('Settings successfully saved.', 'neon-product-designer'); ?></p> 473 </div> 448 474 <?php 449 475 } … … 458 484 * @param type $option_array 459 485 */ 460 public function transform_checkbox_value( $option_name, $option_array ) { 461 foreach ( $option_array as $option ) { 462 if ( ! isset( $_POST[ $option_name ][ $option ] ) ) { 463 $_POST[ $option_name ][ $option ] = 'no'; 486 public function transform_checkbox_value($option_name, $option_array) 487 { 488 foreach ($option_array as $option) { 489 if (!isset($_POST[$option_name][$option])) { 490 $_POST[$option_name][$option] = 'no'; 464 491 } 465 492 } … … 469 496 470 497 // Builds the general settings options 471 private function get_general_settings() { 498 private function get_general_settings() 499 { 472 500 $options = array(); 473 501 474 502 $general_options_begin = array( 475 'type' => 'sectionbegin',476 'id' => 'npd-general-options',477 'table' => 'options', 478 'title' => __( 'General Settings', 'neon-product-designer'),503 'type' => 'sectionbegin', 504 'id' => 'npd-general-options', 505 'table' => 'options', 506 'title' => __('General Settings', 'neon-product-designer'), 479 507 ); 480 508 481 509 $args = array( 482 510 'post_type' => 'page', 483 'nopaging' => true,511 'nopaging' => true, 484 512 ); 485 513 486 514 $customizer_page = array( 487 'title' => __( 'Design page', 'neon-product-designer'),488 'desc' => __( 'This setting allows the plugin to locate the page where customizations are made. Please note that this page can only be accessed by our plugin and should not appear in any menu.', 'neon-product-designer'),489 'name' => 'npd-general-options[page_id]',490 'type' => 'post-type',515 'title' => __('Design page', 'neon-product-designer'), 516 'desc' => __('This setting allows the plugin to locate the page where customizations are made. Please note that this page can only be accessed by our plugin and should not appear in any menu.', 'neon-product-designer'), 517 'name' => 'npd-general-options[page_id]', 518 'type' => 'post-type', 491 519 'default' => '', 492 'table' => 'options',493 'class' => 'chosen_select_nostd',494 'args' => $args,520 'table' => 'options', 521 'class' => 'chosen_select_nostd', 522 'args' => $args, 495 523 ); 496 524 497 525 $content_filter = array( 498 'title' => __( 'Manage the configuration page', 'neon-product-designer'),499 'name' => 'npd-general-options[npd-content-filter]',526 'title' => __('Manage the configuration page', 'neon-product-designer'), 527 'name' => 'npd-general-options[npd-content-filter]', 500 528 'default' => '1', 501 'type' => 'radio',502 'table' => 'options',503 'desc' => __( 'If yes, automatically append editor to the design page. This option allows you to define whether or not you want to use a shortcode to display the the customizer in the selected page.', 'neon-product-designer'),529 'type' => 'radio', 530 'table' => 'options', 531 'desc' => __('If yes, automatically append editor to the design page. This option allows you to define whether or not you want to use a shortcode to display the the customizer in the selected page.', 'neon-product-designer'), 504 532 'options' => array( 505 '1' => __( 'Yes', 'neon-product-designer'),506 '0' => __( 'No', 'neon-product-designer'),507 ), 508 'class' => 'chosen_select_nostd',533 '1' => __('Yes', 'neon-product-designer'), 534 '0' => __('No', 'neon-product-designer'), 535 ), 536 'class' => 'chosen_select_nostd', 509 537 ); 510 538 511 539 $customizer_cart_display = array( 512 'title' => __( 'Parts position in cart', 'neon-product-designer'),513 'name' => 'npd-general-options[npd-parts-position-cart]',540 'title' => __('Parts position in cart', 'neon-product-designer'), 541 'name' => 'npd-general-options[npd-parts-position-cart]', 514 542 'default' => 'thumbnail', 515 'type' => 'radio',516 'table' => 'options',517 'desc' => __( 'This option allows you to set where to show your customized products parts on the cart page', 'neon-product-designer'),543 'type' => 'radio', 544 'table' => 'options', 545 'desc' => __('This option allows you to set where to show your customized products parts on the cart page', 'neon-product-designer'), 518 546 'options' => array( 519 'thumbnail' => __( 'Thumbnail column', 'neon-product-designer'),520 'name' => __( 'Name column', 'neon-product-designer'),521 ), 522 'class' => 'chosen_select_nostd',547 'thumbnail' => __('Thumbnail column', 'neon-product-designer'), 548 'name' => __('Name column', 'neon-product-designer'), 549 ), 550 'class' => 'chosen_select_nostd', 523 551 ); 524 552 525 553 $send_attachments = array( 526 'title' => __( 'Send the design as an attachment', 'neon-product-designer'),527 'name' => 'npd-general-options[npd-send-design-mail]',554 'title' => __('Send the design as an attachment', 'neon-product-designer'), 555 'name' => 'npd-general-options[npd-send-design-mail]', 528 556 'default' => '1', 529 'type' => 'radio',530 'table' => 'options',531 'desc' => __( 'This option allows you to send or not the design by mail after checkout', 'neon-product-designer'),557 'type' => 'radio', 558 'table' => 'options', 559 'desc' => __('This option allows you to send or not the design by mail after checkout', 'neon-product-designer'), 532 560 'options' => array( 533 '1' => __( 'Yes', 'neon-product-designer'),534 '0' => __( 'No', 'neon-product-designer'),535 ), 536 'class' => 'chosen_select_nostd',537 ); 538 539 $cart_button = array(540 'title' => __( 'Add to cart', 'neon-product-designer'),541 'name' => 'npd-general-options[npd-cart-btn]',561 '1' => __('Yes', 'neon-product-designer'), 562 '0' => __('No', 'neon-product-designer'), 563 ), 564 'class' => 'chosen_select_nostd', 565 ); 566 567 $cart_button = array( 568 'title' => __('Add to cart', 'neon-product-designer'), 569 'name' => 'npd-general-options[npd-cart-btn]', 542 570 'default' => '1', 543 'type' => 'radio',544 'table' => 'options',545 'desc' => __( 'This option allows you to show/hide the cart button on the customization page', 'neon-product-designer'),571 'type' => 'radio', 572 'table' => 'options', 573 'desc' => __('This option allows you to show/hide the cart button on the customization page', 'neon-product-designer'), 546 574 'options' => array( 547 '1' => __( 'Yes', 'neon-product-designer'),548 '0' => __( 'No', 'neon-product-designer'),549 ), 550 'class' => 'chosen_select_nostd',575 '1' => __('Yes', 'neon-product-designer'), 576 '0' => __('No', 'neon-product-designer'), 577 ), 578 'class' => 'chosen_select_nostd', 551 579 ); 552 580 $hide_design_buttons_cart_page = array( 553 'title' => __( 'Hide design buttons on shop page', 'neon-product-designer'),554 'name' => 'npd-general-options[npd-hide-btn-shop-pages]',581 'title' => __('Hide design buttons on shop page', 'neon-product-designer'), 582 'name' => 'npd-general-options[npd-hide-btn-shop-pages]', 555 583 'default' => '0', 556 'type' => 'radio',557 'table' => 'options',558 'desc' => __( 'This option allows you to show/hide the cart button on the customization page', 'neon-product-designer'),584 'type' => 'radio', 585 'table' => 'options', 586 'desc' => __('This option allows you to show/hide the cart button on the customization page', 'neon-product-designer'), 559 587 'options' => array( 560 '1' => __( 'Yes', 'neon-product-designer'),561 '0' => __( 'No', 'neon-product-designer'),562 ), 563 'class' => 'chosen_select_nostd',564 ); 565 $add_to_cart_action = array(566 'title' => __( 'Redirect after adding a custom design to the cart?', 'neon-product-designer'),567 'name' => 'npd-general-options[npd-redirect-after-cart]',588 '1' => __('Yes', 'neon-product-designer'), 589 '0' => __('No', 'neon-product-designer'), 590 ), 591 'class' => 'chosen_select_nostd', 592 ); 593 $add_to_cart_action = array( 594 'title' => __('Redirect after adding a custom design to the cart?', 'neon-product-designer'), 595 'name' => 'npd-general-options[npd-redirect-after-cart]', 568 596 'default' => '0', 569 'type' => 'radio',570 'table' => 'options',571 'desc' => __( 'This option allows you to define what to do after adding a design to the cart', 'neon-product-designer'),597 'type' => 'radio', 598 'table' => 'options', 599 'desc' => __('This option allows you to define what to do after adding a design to the cart', 'neon-product-designer'), 572 600 'options' => array( 573 '1' => __( 'Yes', 'neon-product-designer'),574 '0' => __( 'No', 'neon-product-designer'),575 ), 576 'class' => 'chosen_select_nostd',601 '1' => __('Yes', 'neon-product-designer'), 602 '0' => __('No', 'neon-product-designer'), 603 ), 604 'class' => 'chosen_select_nostd', 577 605 ); 578 606 579 607 $hide_requirements_notices = array( 580 'title' => __( 'Hide requirements notices', 'neon-product-designer'),581 'name' => 'npd-general-options[hide-requirements-notices]',582 'default' => '0',583 'type' => 'radio',584 'table' => 'options',585 'desc' => __( 'This option allows you to define whether or not you want to hide the requirement notice.', 'neon-product-designer'),586 'options' => array(587 '0' => __( 'No', 'neon-product-designer'),588 '1' => __( 'Yes', 'neon-product-designer'),608 'title' => __('Hide requirements notices', 'neon-product-designer'), 609 'name' => 'npd-general-options[hide-requirements-notices]', 610 'default' => '0', 611 'type' => 'radio', 612 'table' => 'options', 613 'desc' => __('This option allows you to define whether or not you want to hide the requirement notice.', 'neon-product-designer'), 614 'options' => array( 615 '0' => __('No', 'neon-product-designer'), 616 '1' => __('Yes', 'neon-product-designer'), 589 617 ), 590 618 'row_class' => 'npd_hide_requirements', 591 'class' => 'chosen_select_nostd',619 'class' => 'chosen_select_nostd', 592 620 ); 593 621 594 622 $hide_cart_button_for_custom_products = array( 595 'title' => __( 'Hide add to cart button for custom products', 'neon-product-designer'),596 'name' => 'npd-general-options[npd-hide-cart-button]',623 'title' => __('Hide add to cart button for custom products', 'neon-product-designer'), 624 'name' => 'npd-general-options[npd-hide-cart-button]', 597 625 'default' => '1', 598 'type' => 'radio',599 'table' => 'options',600 'desc' => __( 'This option allows you to define whether or not you want to hide the add to cart button for custom products on the products page.', 'neon-product-designer'),626 'type' => 'radio', 627 'table' => 'options', 628 'desc' => __('This option allows you to define whether or not you want to hide the add to cart button for custom products on the products page.', 'neon-product-designer'), 601 629 'options' => array( 602 '1' => __( 'Yes', 'neon-product-designer'),603 '0' => __( 'No', 'neon-product-designer'),604 ), 605 'class' => 'chosen_select_nostd',630 '1' => __('Yes', 'neon-product-designer'), 631 '0' => __('No', 'neon-product-designer'), 632 ), 633 'class' => 'chosen_select_nostd', 606 634 ); 607 635 608 636 $follow_scroll = array( 609 'title' => __( 'Follow scroll', 'neon-product-designer'),610 'name' => 'npd-general-options[follow-scroll]',637 'title' => __('Follow scroll', 'neon-product-designer'), 638 'name' => 'npd-general-options[follow-scroll]', 611 639 'default' => '1', 612 'type' => 'radio',613 'table' => 'options',614 'desc' => __( 'This option allows you to define whether or not you want to enable follow scroll.', 'neon-product-designer'),640 'type' => 'radio', 641 'table' => 'options', 642 'desc' => __('This option allows you to define whether or not you want to enable follow scroll.', 'neon-product-designer'), 615 643 'options' => array( 616 '1' => __( 'Yes', 'neon-product-designer'),617 '0' => __( 'No', 'neon-product-designer'),618 ), 619 'class' => 'chosen_select_nostd',620 ); 621 622 $general_options_end = array( 'type' => 'sectionend');623 644 '1' => __('Yes', 'neon-product-designer'), 645 '0' => __('No', 'neon-product-designer'), 646 ), 647 'class' => 'chosen_select_nostd', 648 ); 649 650 $general_options_end = array('type' => 'sectionend'); 651 624 652 //array_push( $options, $nonce_security ); 625 array_push( $options, $general_options_begin);626 array_push( $options, $customizer_page);627 array_push( $options, $content_filter);628 array_push( $options, $customizer_cart_display);629 array_push( $options, $send_attachments);630 array_push( $options, $cart_button);631 array_push( $options, $add_to_cart_action);632 array_push( $options, $hide_cart_button_for_custom_products);633 array_push( $options, $hide_design_buttons_cart_page);634 array_push( $options, $hide_requirements_notices);635 array_push( $options, $follow_scroll);636 array_push( $options, $general_options_end);637 $options = apply_filters( 'npd_general_options', $options);638 return Kali_Admin_Tools::get_fields( $options);653 array_push($options, $general_options_begin); 654 array_push($options, $customizer_page); 655 array_push($options, $content_filter); 656 array_push($options, $customizer_cart_display); 657 array_push($options, $send_attachments); 658 array_push($options, $cart_button); 659 array_push($options, $add_to_cart_action); 660 array_push($options, $hide_cart_button_for_custom_products); 661 array_push($options, $hide_design_buttons_cart_page); 662 array_push($options, $hide_requirements_notices); 663 array_push($options, $follow_scroll); 664 array_push($options, $general_options_end); 665 $options = apply_filters('npd_general_options', $options); 666 return Kali_Admin_Tools::get_fields($options); 639 667 } 640 668 … … 646 674 * @global array $npd_settings 647 675 */ 648 function notify_customization_page_missing() { 649 $options = get_option('npd-general-options'); 650 $hide_notices = Kali_Admin_Tools::get_parse_value( $options, 'hide-requirements-notices', false ); 651 if ( isset( $options['page_id'] ) ) { 676 function notify_customization_page_missing() 677 { 678 $options = get_option('npd-general-options'); 679 $hide_notices = Kali_Admin_Tools::get_parse_value($options, 'hide-requirements-notices', false); 680 if (isset($options['page_id'])) { 652 681 $npd_page_id = $options['page_id']; 653 682 } else { … … 655 684 } 656 685 657 $settings_url = get_bloginfo( 'url') . '/wp-admin/admin.php?page=npd-manage-settings';658 if ( ! class_exists( 'WooCommerce' )) {686 $settings_url = get_bloginfo('url') . '/wp-admin/admin.php?page=npd-manage-settings'; 687 if (!class_exists('WooCommerce')) { 659 688 echo '<div class="error"> 660 689 <p><b>Neon Product Designer: </b>WooCommerce is not installed on your website. You will not be able to use the features of the plugin.</p> 661 690 </div>'; 662 691 } else { 663 if ( empty( $npd_page_id )) {692 if (empty($npd_page_id)) { 664 693 echo '<div class="error"> 665 694 <p><b>Neon Product Designer: </b>The design page is not defined. Please configure it in <a href="' . esc_url($settings_url) . '">plugin settings page</a>: .</p> 666 695 </div>'; 667 696 } 668 if ( ! extension_loaded( 'zip' ) && ! $hide_notices) {697 if (!extension_loaded('zip') && !$hide_notices) { 669 698 echo '<div class="error"> 670 699 <p><b>Neon Product Designer: </b>ZIP extension not loaded on this server. You won\'t be able to generate zip outputs.</p> … … 682 711 * Alerts the administrator if the minimum requirements are not met 683 712 */ 684 function notify_minmimum_required_parameters() { 713 function notify_minmimum_required_parameters() 714 { 685 715 global $npd_settings; 686 $general_options = Kali_Admin_Tools::get_parse_value( $npd_settings, 'npd-general-options');687 $hide_notices = Kali_Admin_Tools::get_parse_value( $general_options, 'hide-requirements-notices', false);716 $general_options = Kali_Admin_Tools::get_parse_value($npd_settings, 'npd-general-options'); 717 $hide_notices = Kali_Admin_Tools::get_parse_value($general_options, 'hide-requirements-notices', false); 688 718 $allowed_html = array( 689 'a'=> array(690 'href'=> array(),691 'title' => array(),692 'class' =>array(),693 ),694 'div'=> array(695 'class'=> array(),696 'id' => array(),697 ),698 'br'=> array(),699 'b'=> array(),700 'em'=> array(),701 'strong' => array(),702 ); 703 if ( $hide_notices) {719 'a' => array( 720 'href' => array(), 721 'title' => array(), 722 'class' => array(), 723 ), 724 'div' => array( 725 'class' => array(), 726 'id' => array(), 727 ), 728 'br' => array(), 729 'b' => array(), 730 'em' => array(), 731 'strong' => array(), 732 ); 733 if ($hide_notices) { 704 734 return; 705 735 } 706 707 708 $message = '';709 $permalinks_structure = get_option( 'permalink_structure');710 if ( strpos( $permalinks_structure, 'index.php' ) !== false) {736 737 738 $message = ''; 739 $permalinks_structure = get_option('permalink_structure'); 740 if (strpos($permalinks_structure, 'index.php') !== false) { 711 741 $message .= 'Your permalinks structure is currently set to <b>custom</b> with index.php present in the structure. We recommand to set this value to <b>Post name</b> to avoid any issue with our plugin.<br>'; 712 742 } 713 if ( ! empty( $message ) ) { 714 echo '<div class="error"><p><b>Neon Product Designer: </b><br>' . wp_kses($message,$allowed_html) . '</p></div>'; 715 } 716 } 717 718 public function npd_check_filetype_and_ext($data, $file, $filename, $mimes, $real_mime) { 719 if ( ! empty( $data['ext'] ) && ! empty( $data['type'] ) ) { 720 return $data; 721 } 722 723 $wp_file_type = wp_check_filetype( $filename, $mimes ); 724 725 // Check for the file type you want to enable, e.g. 'svg'. 726 if ( 'ttf' === $wp_file_type['ext'] ) { 727 $data['ext'] = 'ttf'; 728 $data['type'] = 'font/ttf'; 729 } 730 731 if ( 'otf' === $wp_file_type['ext'] ) { 732 $data['ext'] = 'otf'; 733 $data['type'] = 'font/otf'; 734 } 735 736 return $data; 737 } 738 743 if (!empty($message)) { 744 echo '<div class="error"><p><b>Neon Product Designer: </b><br>' . wp_kses($message, $allowed_html) . '</p></div>'; 745 } 746 } 747 748 public function npd_check_filetype_and_ext($data, $file, $filename, $mimes, $real_mime) 749 { 750 if (!empty($data['ext']) && !empty($data['type'])) { 751 return $data; 752 } 753 754 $wp_file_type = wp_check_filetype($filename, $mimes); 755 756 // Check for the file type you want to enable, e.g. 'svg'. 757 if ('ttf' === $wp_file_type['ext']) { 758 $data['ext'] = 'ttf'; 759 $data['type'] = 'font/ttf'; 760 } 761 762 if ('otf' === $wp_file_type['ext']) { 763 $data['ext'] = 'otf'; 764 $data['type'] = 'font/otf'; 765 } 766 767 return $data; 768 } 769 public function npd_clean_promo_widget_products() 770 { 771 // Vérifier si l'utilisateur a déjà dismissé la promo 772 if (get_user_meta(get_current_user_id(), 'npd_clean_promo_dismissed', true)) { 773 return; 774 } 775 776 // Vérifier si l'utilisateur a choisi "Plus tard" 777 $later_time = get_user_meta(get_current_user_id(), 'npd_clean_promo_later', true); 778 if ($later_time && time() < $later_time) { 779 return; 780 } 781 782 // Si le délai "Plus tard" est écoulé, supprimer la meta 783 if ($later_time && time() >= $later_time) { 784 delete_user_meta(get_current_user_id(), 'npd_clean_promo_later'); 785 } 786 787 // Liste des produits à promouvoir 788 $promoted_products = [ 789 [ 790 'slug' => 'neon-product-designer', 791 'name' => __('Neon Channel Product Customizer Free', 'neon-product-designer'), 792 'description' => __('Advanced product customization tool with real-time preview, and unlimited design options like backboard, height auto calculator.', 'neon-product-designer'), 793 'icon' => plugin_dir_url(__FILE__) . 'images/im_ncpc-icon.png', 794 'url' => 'https://wordpress.org/plugins/neon-channel-product-customizer-free/', 795 'features' => [__('Easy Setup', 'neon-product-designer'), __('Profitable', 'neon-product-designer'), __('Multi Language', 'neon-product-designer'), __('Real-time Preview', 'neon-product-designer'), __('Height Auto Calculator', 'neon-product-designer')], 796 'is_new' => true, 797 'demo_url' => 'https://demos.signsdesigner.us/aso-live-demo/', 798 'type' => 'wordpress' 799 ], 800 [ 801 'slug' => 'all-signs-options-free', 802 'name' => __('All Signs Options (ASO)', 'neon-product-designer'), 803 'description' => __('Expand beyond neon signs with custom stickers, banners, magnetic plates, and plastic signs. Easy setup, powerful features.', 'neon-product-designer'), 804 'icon' => plugin_dir_url(__FILE__) . 'images/im_asowp-icon.png', 805 'url' => 'https://wordpress.org/plugins/all-signs-options-free/', 806 'features' => [__('Multi-product', 'neon-product-designer'), __('Easy Setup', 'neon-product-designer'), __('Multi Language', 'neon-product-designer'), __('Profitable', 'neon-product-designer')], 807 'is_new' => true, 808 'demo_url' => 'https://demos.signsdesigner.us/ncpc-live-demo/', 809 'type' => 'wordpress' 810 ] 811 812 ]; 813 814 ?> 815 <div id="npd-clean-promo-widget" class="notice notice-info npd-clean-promo-widget"> 816 <!-- En-tête --> 817 <div class="npd-clean-promo-header"> 818 <h3 class="npd-clean-promo-title"> 819 <span class="npd-clean-promo-title-icon">🚀</span> 820 <?php _e('Boost Your Store with These Amazing Tools', 'neon-product-designer'); ?> 821 </h3> 822 <p class="npd-clean-promo-subtitle"> 823 <?php _e('Discover powerful plugins to enhance your product customization capabilities and increase sales.', 'neon-product-designer'); ?> 824 </p> 825 </div> 826 827 <!-- Container des produits --> 828 <div class="npd-clean-products-container"> 829 <div class="npd-clean-products-grid"> 830 <?php foreach ($promoted_products as $product): ?> 831 <div class="npd-clean-product-card" data-product-slug="<?php echo esc_attr($product['slug']); ?>"> 832 <?php if ($product['is_new']): ?> 833 <div class="npd-clean-new-badge"><?php _e('New', 'neon-product-designer'); ?></div> 834 <?php endif; ?> 835 836 <div class="npd-clean-product-content"> 837 <div class="npd-clean-product-icon"> 838 <!-- <?php echo $product['icon']; ?> --> 839 <img src="<?php echo esc_url($product['icon']); ?>" 840 alt="<?php echo esc_attr($product['name']); ?>" class="npd-clean-product-icon-image" /> 841 </div> 842 843 <div class="npd-clean-product-info"> 844 <h4 class="npd-clean-product-name"><?php echo esc_html($product['name']); ?></h4> 845 <p class="npd-clean-product-description"><?php echo esc_html($product['description']); ?></p> 846 847 <?php if (!empty($product['features'])): ?> 848 <div class="npd-clean-product-features"> 849 <?php foreach ($product['features'] as $feature): ?> 850 <span class="npd-clean-feature-tag"><?php echo esc_html($feature); ?></span> 851 <?php endforeach; ?> 852 </div> 853 <?php endif; ?> 854 855 <div class="npd-clean-product-actions"> 856 <a href="<?php echo esc_url($product['url']); ?>" target="_blank" 857 class="npd-clean-btn npd-clean-btn-primary npd-clean-discover-plugin" 858 data-plugin="<?php echo esc_attr($product['slug']); ?>" 859 data-type="<?php echo esc_attr($product['type']); ?>"> 860 <span>👀</span> 861 <?php 862 if ($product['type'] === 'premium') { 863 _e('View Details', 'neon-product-designer'); 864 } else { 865 _e('View Plugin', 'neon-product-designer'); 866 } 867 ?> 868 </a> 869 <?php if (!empty($product['demo_url'])): ?> 870 <a href="<?php echo esc_url($product['demo_url']); ?>" target="_blank" 871 class="npd-clean-btn npd-clean-btn-demo npd-clean-view-demo" 872 data-plugin="<?php echo esc_attr($product['slug']); ?>"> 873 <span>🚀</span> 874 <?php _e('Live Demo', 'neon-channel-product-customizer-free'); ?> 875 </a> 876 <?php endif; ?> 877 878 <?php if ($product['type'] === 'wordpress'): ?> 879 <a href="<?php echo admin_url('plugin-install.php?s=' . urlencode($product['name']) . '&tab=search&type=term'); ?>" 880 class="npd-clean-btn npd-clean-btn-secondary npd-clean-install-plugin" 881 data-plugin="<?php echo esc_attr($product['slug']); ?>"> 882 <span>⬇️</span> 883 <?php _e('Install', 'neon-product-designer'); ?> 884 </a> 885 <?php endif; ?> 886 </div> 887 </div> 888 </div> 889 </div> 890 <?php endforeach; ?> 891 </div> 892 </div> 893 894 <!-- Pied de page avec actions globales --> 895 <div class="npd-clean-promo-footer"> 896 <div class="npd-clean-footer-actions"> 897 <a href="#" class="npd-clean-btn npd-clean-btn-secondary npd-clean-btn-footer npd-clean-dismiss-promo" 898 data-action="done"> 899 <?php _e('Hide these suggestions', 'neon-product-designer'); ?> 900 </a> 901 <a href="#" class="npd-clean-btn npd-clean-btn-primary npd-clean-btn-footer npd-clean-dismiss-promo" 902 data-action="later"> 903 <?php _e('Remind me later', 'neon-product-designer'); ?> 904 </a> 905 </div> 906 907 <a href="#" class="npd-clean-dismiss-link npd-clean-dismiss-promo" data-action="done"> 908 <?php _e('✕ Close permanently', 'neon-product-designer'); ?> 909 </a> 910 </div> 911 </div> 912 <?php 913 wp_localize_script('npd-free-promo', "npdPromoNonce", wp_create_nonce('npd_clean_promo_nonce')); 914 wp_localize_script('npd-free-promo', "npd_clean_tracking_nonce", wp_create_nonce('npd_clean_tracking_nonce')); 915 } 916 917 public function npd_clean_handle_dismiss_promo() 918 { 919 check_ajax_referer('npd_clean_promo_nonce', 'nonce'); 920 921 $action = sanitize_text_field($_POST['dismiss_action']); 922 $user_id = get_current_user_id(); 923 924 if ($action === 'done') { 925 update_user_meta($user_id, 'npd_clean_promo_dismissed', true); 926 } elseif ($action === 'later') { 927 // Rappel dans 7 jours 928 $later_time = time() + (7 * 24 * 60 * 60); 929 update_user_meta($user_id, 'npd_clean_promo_later', $later_time); 930 } 931 932 wp_die(); 933 } 934 935 // Handler AJAX pour le tracking 936 public function npd_clean_handle_tracking() 937 { 938 check_ajax_referer('npd_clean_tracking_nonce', 'nonce'); 939 940 $plugin_slug = sanitize_text_field($_POST['plugin_slug']); 941 $plugin_type = sanitize_text_field($_POST['plugin_type']); 942 $action_type = sanitize_text_field($_POST['action_type']); 943 944 // Enregistrer les statistiques si nécessaire 945 $stats = get_option('npd_clean_promo_stats', []); 946 $date = date('Y-m-d'); 947 948 if (!isset($stats[$date])) { 949 $stats[$date] = []; 950 } 951 952 if (!isset($stats[$date][$plugin_slug])) { 953 $stats[$date][$plugin_slug] = [ 954 'views' => 0, 955 'installs' => 0 956 ]; 957 } 958 959 if ($action_type === 'view') { 960 $stats[$date][$plugin_slug]['views']++; 961 } elseif ($action_type === 'install') { 962 $stats[$date][$plugin_slug]['installs']++; 963 } 964 965 update_option('npd_clean_promo_stats', $stats); 966 967 wp_die(); 968 } 739 969 740 970 } -
neon-product-designer-for-woocommerce/trunk/admin/css/neon-product-designer-admin.css
r2937134 r3337250 4 4 */ 5 5 6 .font_style_table {7 width: 100%;8 border: 1px solid #DFD8D8;9 margin-top: 10px;10 border-spacing: 0;6 .font_style_table { 7 width: 100%; 8 border: 1px solid #dfd8d8; 9 margin-top: 10px; 10 border-spacing: 0; 11 11 } 12 12 .font_style_table thead { 13 border-bottom: 1px solid #DFD8D8;14 } 15 .font_style_table th {16 width: 33%;17 padding: 8px 0px;18 border-bottom: 1px solid #DFD8D8;19 border-right: 1px solid #DFD8D8;20 } 21 #toplevel_page_npd-manage-dashboard .wp-menu-image img {22 width: 25px;23 height: auto;24 } 25 26 #npd-texts-options table tbody tr {27 width: 50%;28 display: inline-block;29 } 30 .select2-selection {31 min-width: 200px;32 } 33 .pattern_option {34 min-width: 200px;35 } 36 #bouton {37 background-color: green;38 border-radius: 5px;39 padding: 10px 20px;40 text-decoration: none;41 text-align: center;42 color: white;43 margin-top: 5px;44 font-size: 15px;13 border-bottom: 1px solid #dfd8d8; 14 } 15 .font_style_table th { 16 width: 33%; 17 padding: 8px 0px; 18 border-bottom: 1px solid #dfd8d8; 19 border-right: 1px solid #dfd8d8; 20 } 21 #toplevel_page_npd-manage-dashboard .wp-menu-image img { 22 width: 25px; 23 height: auto; 24 } 25 26 #npd-texts-options table tbody tr { 27 width: 50%; 28 display: inline-block; 29 } 30 .select2-selection { 31 min-width: 200px; 32 } 33 .pattern_option { 34 min-width: 200px; 35 } 36 #bouton { 37 background-color: green; 38 border-radius: 5px; 39 padding: 10px 20px; 40 text-decoration: none; 41 text-align: center; 42 color: white; 43 margin-top: 5px; 44 font-size: 15px; 45 45 } 46 46 47 47 /*UI STYLES START*/ 48 .remove-rf-row{49 border-radius: 50%;50 padding: 3px;51 opacity: 1;52 border: silver 1px solid;53 background-color: white!important;54 }55 48 .remove-rf-row { 56 background: url(../images/sprite.png) -66px -116px no-repeat #fff; 57 display: block; 58 height: 12px; 59 width: 12px; 60 border-radius: 50%; 61 box-shadow: 0 0 3px rgb(0 0 0 / 30%); 49 border-radius: 50%; 50 padding: 3px; 51 opacity: 1; 52 border: silver 1px solid; 53 background-color: white !important; 54 } 55 .remove-rf-row { 56 background: url(../images/sprite.png) -66px -116px no-repeat #fff; 57 display: block; 58 height: 12px; 59 width: 12px; 60 border-radius: 50%; 61 box-shadow: 0 0 3px rgb(0 0 0 / 30%); 62 62 } 63 63 .remove-rf-row:hover { 64 background: url(../images/sprite.png) -66px -166px no-repeat #fff;65 color:red !important;64 background: url(../images/sprite.png) -66px -166px no-repeat #fff; 65 color: red !important; 66 66 } 67 67 .block-form .label { 68 background-color: #F3F5FF; 69 width: 25%; 70 font-weight: bold; 71 color: #000; 72 } 73 .block-form .kali-desc, .kali-wrap > label { 68 background-color: #f3f5ff; 69 width: 25%; 70 font-weight: bold; 71 color: #000; 72 } 73 .block-form .kali-desc, 74 .kali-wrap > label { 74 75 font-weight: normal; 75 76 line-height: 16px; … … 78 79 color: #000; 79 80 } 80 table.widefat,table.repeatable-fields-table{ 81 table.widefat, 82 table.repeatable-fields-table { 81 83 table-layout: fixed; 82 84 } 83 .block-form td textarea {85 .block-form td textarea { 84 86 max-width: 100%; 85 87 width: 100%; … … 89 91 90 92 .meta-box-sortables input { 91 vertical-align: middle;92 max-width: 100%;93 vertical-align: middle; 94 max-width: 100%; 93 95 } 94 96 95 97 .media-preview img { 96 max-width: 50px;97 max-height: 50px;98 } 99 100 .npdw-disabed-options {101 display: none !important;102 } 103 104 .npd-cart-item-data-wrap {105 display: flex; 106 justify-content: space-between;107 padding: 5px;108 } 109 .npd-cart-item-data-container {98 max-width: 50px; 99 max-height: 50px; 100 } 101 102 .npdw-disabed-options { 103 display: none !important; 104 } 105 106 .npd-cart-item-data-wrap { 107 display: flex; 108 justify-content: space-between; 109 padding: 5px; 110 } 111 .npd-cart-item-data-container { 110 112 max-width: 300px; 111 113 margin-bottom: 20px; 112 114 border: 1px solid #e8e8e8; 113 115 } 114 .npd-cart-item-data-wrap:nth-child(even) {115 background-color: #e8e8e8;116 } 117 .cart-item-data-color {116 .npd-cart-item-data-wrap:nth-child(even) { 117 background-color: #e8e8e8; 118 } 119 .cart-item-data-color { 118 120 display: inline-block; 119 121 width: 30px; … … 123 125 vertical-align: middle; 124 126 } 125 .npd-cartitem-img {127 .npd-cartitem-img { 126 128 height: auto; 127 129 width: 100px; 128 max-width: 100px 129 } 130 max-width: 100px; 131 } 132 133 /** Notice for others plugin*/ 134 .npd-free-notation-widget { 135 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 136 border-radius: 8px; 137 padding: 15px 20px; 138 margin: 20px 0; 139 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); 140 color: white; 141 position: relative; 142 overflow: hidden; 143 } 144 145 .npd-free-notation-widget::before { 146 content: ""; 147 position: absolute; 148 top: -50%; 149 right: -50%; 150 width: 100px; 151 height: 100px; 152 background: rgba(255, 255, 255, 0.1); 153 border-radius: 50%; 154 z-index: 0; 155 } 156 157 .npd-free-widget-content { 158 display: flex; 159 align-items: center; 160 justify-content: space-between; 161 gap: 20px; 162 position: relative; 163 z-index: 1; 164 } 165 166 .npd-free-rating-section { 167 display: flex; 168 align-items: center; 169 gap: 12px; 170 flex: 1; 171 } 172 173 .npd-free-stars { 174 font-size: 20px; 175 filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); 176 } 177 178 .npd-free-message { 179 font-weight: 500; 180 font-size: 14px; 181 text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); 182 } 183 184 .npd-free-actions { 185 display: flex; 186 align-items: center; 187 gap: 10px; 188 flex-shrink: 0; 189 } 190 191 .npd-free-actions .button { 192 border: none !important; 193 border-radius: 20px !important; 194 padding: 6px 16px !important; 195 font-size: 13px !important; 196 font-weight: 500 !important; 197 text-decoration: none !important; 198 transition: all 0.2s ease !important; 199 box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important; 200 } 201 202 .npd-free-actions .button-primary { 203 background: #fff !important; 204 color: #667eea !important; 205 } 206 207 .npd-free-actions .button-primary:hover { 208 background: #f8f9ff !important; 209 transform: translateY(-1px) !important; 210 box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important; 211 } 212 213 .npd-free-actions .button-secondary { 214 background: rgba(255, 255, 255, 0.2) !important; 215 color: white !important; 216 backdrop-filter: blur(10px) !important; 217 } 218 219 .npd-free-actions .button-secondary:hover { 220 background: rgba(255, 255, 255, 0.3) !important; 221 transform: translateY(-1px) !important; 222 } 223 224 .npd-free-rate-dismiss-link { 225 color: rgba(255, 255, 255, 0.8) !important; 226 font-size: 12px !important; 227 text-decoration: none !important; 228 padding: 4px 8px !important; 229 border-radius: 12px !important; 230 transition: all 0.2s ease !important; 231 } 232 233 .npd-free-rate-dismiss-link:hover { 234 color: white !important; 235 background: rgba(255, 255, 255, 0.1) !important; 236 } 237 238 /* Responsive */ 239 @media (max-width: 768px) { 240 .npd-free-widget-content { 241 flex-direction: column; 242 gap: 15px; 243 text-align: center; 244 } 245 246 .npd-free-actions { 247 justify-content: center; 248 flex-wrap: wrap; 249 } 250 } 251 252 /* Widget principal de promotion */ 253 .npd-clean-promo-widget { 254 background: #ffffff; 255 border: 1px solid #e2e8f0; 256 border-radius: 12px !important; 257 padding: 0 !important; 258 margin: 20px 20px 20px 0 !important; 259 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); 260 overflow: hidden; 261 position: relative; 262 } 263 264 .npd-clean-promo-widget::before { 265 content: ""; 266 position: absolute; 267 top: 0; 268 left: 0; 269 right: 0; 270 height: 4px; 271 background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%); 272 z-index: 1; 273 } 274 275 /* En-tête du widget */ 276 .npd-clean-promo-header { 277 padding: 20px 24px 16px; 278 border-bottom: 1px solid #f1f5f9; 279 position: relative; 280 z-index: 2; 281 } 282 283 .npd-clean-promo-title { 284 display: flex; 285 align-items: center; 286 gap: 12px; 287 margin: 0; 288 font-size: 18px; 289 font-weight: 600; 290 color: #1e293b; 291 } 292 293 .npd-clean-promo-title-icon { 294 font-size: 24px; 295 animation: npd-clean-pulse 3s infinite; 296 } 297 298 @keyframes npd-clean-pulse { 299 0%, 300 100% { 301 transform: scale(1); 302 } 303 50% { 304 transform: scale(1.1); 305 } 306 } 307 308 .npd-clean-promo-subtitle { 309 margin: 8px 0 0 36px; 310 font-size: 14px; 311 color: #64748b; 312 line-height: 1.4; 313 } 314 315 /* Container des produits */ 316 .npd-clean-products-container { 317 padding: 20px 24px; 318 max-height: 400px; 319 overflow-y: auto; 320 } 321 322 .npd-clean-products-container::-webkit-scrollbar { 323 width: 6px; 324 } 325 326 .npd-clean-products-container::-webkit-scrollbar-track { 327 background: #f1f5f9; 328 border-radius: 3px; 329 } 330 331 .npd-clean-products-container::-webkit-scrollbar-thumb { 332 background: #cbd5e1; 333 border-radius: 3px; 334 } 335 336 .npd-clean-products-container::-webkit-scrollbar-thumb:hover { 337 background: #94a3b8; 338 } 339 340 /* Grille des produits */ 341 .npd-clean-products-grid { 342 display: grid; 343 grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 344 gap: 16px; 345 } 346 347 /* Carte individuelle de produit */ 348 .npd-clean-product-card { 349 background: #f8fafc; 350 border: 1px solid #e2e8f0; 351 border-radius: 8px; 352 padding: 16px; 353 transition: all 0.3s ease; 354 position: relative; 355 overflow: hidden; 356 } 357 358 .npd-clean-product-card:hover { 359 transform: translateY(-2px); 360 box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); 361 border-color: #3b82f6; 362 } 363 364 .npd-clean-product-card::before { 365 content: ""; 366 position: absolute; 367 top: 0; 368 left: 0; 369 right: 0; 370 height: 3px; 371 background: linear-gradient(90deg, #3b82f6, #8b5cf6); 372 transform: scaleX(0); 373 transition: transform 0.3s ease; 374 } 375 376 .npd-clean-product-card:hover::before { 377 transform: scaleX(1); 378 } 379 380 /* Contenu de la carte produit */ 381 .npd-clean-product-content { 382 display: flex; 383 gap: 16px; 384 align-items: flex-start; 385 } 386 387 .npd-clean-product-icon { 388 flex-shrink: 0; 389 width: 48px; 390 height: 48px; 391 background: transparent; 392 border-radius: 10px; 393 display: flex; 394 align-items: center; 395 justify-content: center; 396 font-size: 24px; 397 box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); 398 } 399 400 .npd-clean-product-icon-image { 401 width: 32px; 402 height: 32px; 403 object-fit: contain; 404 } 405 406 .npd-clean-product-info { 407 flex: 1; 408 min-width: 0; 409 } 410 411 .npd-clean-product-name { 412 font-size: 16px; 413 font-weight: 600; 414 color: #1e293b; 415 margin: 0 0 6px 0; 416 line-height: 1.3; 417 } 418 419 .npd-clean-product-description { 420 font-size: 13px; 421 color: #64748b; 422 line-height: 1.4; 423 margin: 0 0 12px 0; 424 } 425 426 .npd-clean-product-features { 427 display: flex; 428 flex-wrap: wrap; 429 gap: 4px; 430 margin-bottom: 12px; 431 } 432 433 .npd-clean-feature-tag { 434 background: #e0f2fe; 435 color: #0369a1; 436 font-size: 11px; 437 padding: 2px 8px; 438 border-radius: 12px; 439 font-weight: 500; 440 } 441 442 /* Actions de la carte produit */ 443 .npd-clean-product-actions { 444 display: flex; 445 gap: 6px; 446 align-items: center; 447 flex-wrap: wrap; 448 } 449 450 .npd-clean-btn { 451 border: none; 452 border-radius: 6px; 453 font-size: 12px; 454 font-weight: 500; 455 text-decoration: none; 456 cursor: pointer; 457 transition: all 0.2s ease; 458 display: inline-flex; 459 align-items: center; 460 gap: 4px; 461 white-space: nowrap; 462 } 463 464 .npd-clean-btn-primary { 465 background: linear-gradient(135deg, #3b82f6, #2563eb); 466 color: white; 467 padding: 6px 12px; 468 box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3); 469 } 470 471 .npd-clean-btn-primary:hover { 472 background: linear-gradient(135deg, #2563eb, #1d4ed8); 473 transform: translateY(-1px); 474 box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4); 475 color: white; 476 text-decoration: none; 477 } 478 479 .npd-clean-btn-secondary { 480 background: transparent; 481 color: #64748b; 482 padding: 6px 10px; 483 border: 1px solid #e2e8f0; 484 } 485 486 .npd-clean-btn-secondary:hover { 487 background: #f1f5f9; 488 color: #475569; 489 border-color: #cbd5e1; 490 text-decoration: none; 491 } 492 493 .npd-clean-btn-demo { 494 background: linear-gradient(135deg, #10b981, #059669); 495 color: white; 496 padding: 6px 12px; 497 box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3); 498 } 499 500 .npd-clean-btn-demo:hover { 501 background: linear-gradient(135deg, #059669, #047857); 502 transform: translateY(-1px); 503 box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4); 504 color: white; 505 text-decoration: none; 506 } 507 508 /* Actions globales du widget */ 509 .npd-clean-promo-footer { 510 padding: 16px 24px; 511 background: #f8fafc; 512 border-top: 1px solid #e2e8f0; 513 display: flex; 514 justify-content: space-between; 515 align-items: center; 516 gap: 16px; 517 } 518 519 .npd-clean-footer-actions { 520 display: flex; 521 gap: 12px; 522 align-items: center; 523 } 524 525 .npd-clean-btn-footer { 526 padding: 8px 16px; 527 font-size: 13px; 528 } 529 530 .npd-clean-dismiss-link { 531 color: #64748b; 532 font-size: 12px; 533 text-decoration: none; 534 transition: color 0.2s ease; 535 } 536 537 .npd-clean-dismiss-link:hover { 538 color: #3b82f6; 539 text-decoration: underline; 540 } 541 542 /* Badge "Nouveau" */ 543 .npd-clean-new-badge { 544 position: absolute; 545 top: 8px; 546 right: 8px; 547 background: linear-gradient(135deg, #ef4444, #dc2626); 548 color: white; 549 font-size: 10px; 550 font-weight: 600; 551 padding: 2px 6px; 552 border-radius: 4px; 553 text-transform: uppercase; 554 letter-spacing: 0.5px; 555 } 556 557 /* Responsive Design */ 558 @media (max-width: 968px) { 559 .npd-clean-products-grid { 560 grid-template-columns: 1fr; 561 } 562 563 .npd-clean-promo-footer { 564 flex-direction: column; 565 align-items: stretch; 566 gap: 12px; 567 } 568 569 .npd-clean-footer-actions { 570 justify-content: center; 571 flex-wrap: wrap; 572 } 573 } 574 575 @media (max-width: 600px) { 576 .npd-clean-promo-widget { 577 margin: 16px 10px 16px 0 !important; 578 } 579 580 .npd-clean-promo-header, 581 .npd-clean-products-container, 582 .npd-clean-promo-footer { 583 padding-left: 16px; 584 padding-right: 16px; 585 } 586 587 .npd-clean-product-content { 588 flex-direction: column; 589 gap: 12px; 590 } 591 592 .npd-clean-product-icon { 593 align-self: flex-start; 594 } 595 596 .npd-clean-product-actions { 597 flex-direction: column; 598 align-items: stretch; 599 gap: 8px; 600 } 601 602 .npd-clean-btn { 603 justify-content: center; 604 } 605 } 606 607 /* Animation d'apparition */ 608 .npd-clean-promo-widget { 609 animation: npd-clean-slideIn 0.5s ease-out; 610 } 611 612 @keyframes npd-clean-slideIn { 613 from { 614 opacity: 0; 615 transform: translateY(20px); 616 } 617 to { 618 opacity: 1; 619 transform: translateY(0); 620 } 621 } 622 623 /* États de chargement */ 624 .npd-clean-loading { 625 display: flex; 626 justify-content: center; 627 align-items: center; 628 padding: 40px; 629 color: #64748b; 630 } 631 632 .npd-clean-loading-spinner { 633 width: 20px; 634 height: 20px; 635 border: 2px solid #e2e8f0; 636 border-top: 2px solid #3b82f6; 637 border-radius: 50%; 638 animation: npd-clean-spin 1s linear infinite; 639 margin-right: 8px; 640 } 641 642 @keyframes npd-clean-spin { 643 0% { 644 transform: rotate(0deg); 645 } 646 100% { 647 transform: rotate(360deg); 648 } 649 } -
neon-product-designer-for-woocommerce/trunk/includes/class-neon-product-designer.php
r2937134 r3337250 28 28 * @author Vertim Coders <[email protected]> 29 29 */ 30 class Neon_Product_Designer { 30 class Neon_Product_Designer 31 { 31 32 32 33 /** … … 67 68 * @since 1.0.0 68 69 */ 69 public function __construct() { 70 70 public function __construct() 71 { 72 71 73 $this->npd = 'npd'; 72 74 $this->version = NPD_VERSION; … … 95 97 * @access private 96 98 */ 97 private function load_dependencies() { 99 private function load_dependencies() 100 { 98 101 99 102 /** … … 101 104 * core plugin. 102 105 */ 103 require_once plugin_dir_path( dirname( __FILE__ )) . 'includes/class-neon-product-designer-loader.php';106 require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-neon-product-designer-loader.php'; 104 107 105 108 /** … … 107 110 * of the plugin. 108 111 */ 109 require_once plugin_dir_path( dirname( __FILE__ )) . 'includes/class-neon-product-designer-i18n.php';112 require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-neon-product-designer-i18n.php'; 110 113 111 114 /** 112 115 * The class responsible for defining all actions that occur in the admin area. 113 116 */ 114 require_once plugin_dir_path( dirname( __FILE__ )) . 'admin/class-neon-product-designer-admin.php';117 require_once plugin_dir_path(dirname(__FILE__)) . 'admin/class-neon-product-designer-admin.php'; 115 118 116 119 /** … … 118 121 * side of the site. 119 122 */ 120 require_once plugin_dir_path( dirname( __FILE__ )) . 'public/class-neon-product-designer-public.php';123 require_once plugin_dir_path(dirname(__FILE__)) . 'public/class-neon-product-designer-public.php'; 121 124 122 125 $this->loader = new Neon_Product_Designer_Loader(); … … 133 136 * @access private 134 137 */ 135 private function set_locale() { 138 private function set_locale() 139 { 136 140 137 141 $plugin_i18n = new Neon_Product_Designer_i18n(); 138 142 139 $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');143 $this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain'); 140 144 141 145 } … … 148 152 * @access private 149 153 */ 150 private function define_admin_hooks() { 151 152 $plugin_admin = new Neon_Product_Designer_Admin( $this->get_plugin_name(), $this->get_version() ); 153 154 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); 155 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); 156 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_npd_parts_submenu' ); 157 $this->loader->add_action( 'init', $plugin_admin, 'init_sessions', 1 ); 158 $this->loader->add_action( 'init', $plugin_admin, 'init_globals' ); 159 $this->loader->add_filter( 'upload_mimes', $plugin_admin, 'npd_add_custom_mime_types' ); 160 $this->loader->add_action( 'admin_notices', $plugin_admin, 'vc_get_max_input_vars_php_ini' ); 161 $this->loader->add_action( 'admin_notices', $plugin_admin, 'notify_customization_page_missing' ); 162 $this->loader->add_action( 'admin_notices', $plugin_admin, 'notify_minmimum_required_parameters' ); 163 $this->loader->add_filter('wp_check_filetype_and_ext', $plugin_admin, 'npd_check_filetype_and_ext',99, 5); 164 154 private function define_admin_hooks() 155 { 156 157 $plugin_admin = new Neon_Product_Designer_Admin($this->get_plugin_name(), $this->get_version()); 158 159 $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles'); 160 $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts'); 161 $this->loader->add_action('admin_menu', $plugin_admin, 'add_npd_parts_submenu'); 162 $this->loader->add_action('init', $plugin_admin, 'init_sessions', 1); 163 $this->loader->add_action('init', $plugin_admin, 'init_globals'); 164 $this->loader->add_filter('upload_mimes', $plugin_admin, 'npd_add_custom_mime_types'); 165 $this->loader->add_action('admin_notices', $plugin_admin, 'vc_get_max_input_vars_php_ini'); 166 $this->loader->add_action('admin_notices', $plugin_admin, 'notify_customization_page_missing'); 167 $this->loader->add_action('admin_notices', $plugin_admin, 'notify_minmimum_required_parameters'); 168 $this->loader->add_action('admin_notices', $plugin_admin, 'npd_clean_promo_widget_products'); 169 $this->loader->add_filter('wp_check_filetype_and_ext', $plugin_admin, 'npd_check_filetype_and_ext', 99, 5); 170 //ajax hooks 171 $this->loader->add_action('wp_ajax_npd_clean_dismiss_promo', $plugin_admin, 'npd_clean_handle_dismiss_promo'); 172 $this->loader->add_action('wp_ajax_npd_clean_track_plugin_click', $plugin_admin, 'npd_clean_handle_tracking'); 173 165 174 // Scenes hooks 166 175 $scene = new NPD_Scene(); 167 $this->loader->add_action( 'init', $scene, 'register_cpt_scenes');168 $this->loader->add_action( 'add_meta_boxes', $scene, 'get_scenes_metabox');169 $this->loader->add_action( 'save_post_npd-scenes', $scene, 'save_scenes');170 176 $this->loader->add_action('init', $scene, 'register_cpt_scenes'); 177 $this->loader->add_action('add_meta_boxes', $scene, 'get_scenes_metabox'); 178 $this->loader->add_action('save_post_npd-scenes', $scene, 'save_scenes'); 179 171 180 172 181 // Colors hooks 173 182 $color = new NPD_Color(); 174 $this->loader->add_action( 'init', $color, 'register_cpt_colors_palette');175 $this->loader->add_action( 'add_meta_boxes', $color, 'get_colors_palette_metabox');176 $this->loader->add_action( 'save_post_npd-colors-palette', $color, 'save_colors_palette', 1);183 $this->loader->add_action('init', $color, 'register_cpt_colors_palette'); 184 $this->loader->add_action('add_meta_boxes', $color, 'get_colors_palette_metabox'); 185 $this->loader->add_action('save_post_npd-colors-palette', $color, 'save_colors_palette', 1); 177 186 178 187 // Config hooks 179 188 $npd_config = new NPD_Config(); 180 189 // ----------------------------------------------------------------- 181 $this->loader->add_action( 'init', $npd_config, 'register_cpt_config');182 $this->loader->add_action( 'save_post_npd-config', $npd_config, 'save_config');183 $this->loader->add_action( 'save_post_product', $npd_config, 'save_config');184 $this->loader->add_action( 'add_meta_boxes', $npd_config, 'get_config_metabox');185 $this->loader->add_action( 'woocommerce_product_options_general_product_data', $npd_config, 'get_product_config_selector');186 $this->loader->add_action( 'woocommerce_product_after_variable_attributes', $npd_config, 'get_variation_product_config_selector', 10, 3);187 $this->loader->add_filter( 'get_user_option_meta-box-order_npd-config', $npd_config, 'get_metabox_order');188 $this->loader->add_action( 'admin_action_npd_duplicate_config', $npd_config, 'npd_duplicate_config');189 $this->loader->add_filter( 'post_row_actions', $npd_config, 'get_duplicate_post_link', 10, 2);190 $this->loader->add_action( 'woocommerce_save_product_variation', $npd_config, 'save_variation_settings_fields');191 $this->loader->add_filter( 'screen_layout_columns', $npd_config, 'get_npd_config_screen_layout_columns');192 $this->loader->add_filter( 'get_user_option_screen_layout_npd-config', $npd_config, 'get_npd_config_config_screen_layout');190 $this->loader->add_action('init', $npd_config, 'register_cpt_config'); 191 $this->loader->add_action('save_post_npd-config', $npd_config, 'save_config'); 192 $this->loader->add_action('save_post_product', $npd_config, 'save_config'); 193 $this->loader->add_action('add_meta_boxes', $npd_config, 'get_config_metabox'); 194 $this->loader->add_action('woocommerce_product_options_general_product_data', $npd_config, 'get_product_config_selector'); 195 $this->loader->add_action('woocommerce_product_after_variable_attributes', $npd_config, 'get_variation_product_config_selector', 10, 3); 196 $this->loader->add_filter('get_user_option_meta-box-order_npd-config', $npd_config, 'get_metabox_order'); 197 $this->loader->add_action('admin_action_npd_duplicate_config', $npd_config, 'npd_duplicate_config'); 198 $this->loader->add_filter('post_row_actions', $npd_config, 'get_duplicate_post_link', 10, 2); 199 $this->loader->add_action('woocommerce_save_product_variation', $npd_config, 'save_variation_settings_fields'); 200 $this->loader->add_filter('screen_layout_columns', $npd_config, 'get_npd_config_screen_layout_columns'); 201 $this->loader->add_filter('get_user_option_screen_layout_npd-config', $npd_config, 'get_npd_config_config_screen_layout'); 193 202 194 203 // Products 195 $product_admin = new NPD_Product( false);196 $this->loader->add_filter( 'manage_edit-product_columns', $product_admin, 'get_product_columns');197 $this->loader->add_action( 'manage_product_posts_custom_column', $product_admin, 'get_products_columns_values', 10, 2);198 $this->loader->add_action( 'save_post_product', $product_admin, 'save_product_settings_fields');199 $this->loader->add_action( 'woocommerce_save_product_variation', $product_admin, 'save_product_settings_fields');200 $this->loader->add_action( 'woocommerce_product_options_inventory_product_data', $product_admin, 'get_variable_product_details_location_notice');204 $product_admin = new NPD_Product(false); 205 $this->loader->add_filter('manage_edit-product_columns', $product_admin, 'get_product_columns'); 206 $this->loader->add_action('manage_product_posts_custom_column', $product_admin, 'get_products_columns_values', 10, 2); 207 $this->loader->add_action('save_post_product', $product_admin, 'save_product_settings_fields'); 208 $this->loader->add_action('woocommerce_save_product_variation', $product_admin, 'save_product_settings_fields'); 209 $this->loader->add_action('woocommerce_product_options_inventory_product_data', $product_admin, 'get_variable_product_details_location_notice'); 201 210 202 211 // custom line 203 $this->loader->add_action( 'woocommerce_after_add_to_cart_button', $product_admin, 'hide_cart_button');212 $this->loader->add_action('woocommerce_after_add_to_cart_button', $product_admin, 'hide_cart_button'); 204 213 205 214 } … … 212 221 * @access private 213 222 */ 214 private function define_public_hooks() { 215 216 $plugin_public = new Neon_Product_Designer_Public( $this->get_plugin_name(), $this->get_version() ); 217 $plugin_admin = new Neon_Product_Designer_Admin( $this->get_plugin_name(), $this->get_version() ); 218 219 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' ); 220 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' ); 221 222 $this->loader->add_action( 'init', $plugin_public, 'register_shortcodes' ); 223 $this->loader->add_action( 'woocommerce_after_add_to_cart_button', $plugin_public, 'get_customize_btn' ); 224 225 $this->loader->add_filter( 'woocommerce_loop_add_to_cart_link', $plugin_public, 'get_customize_btn_loop', 10, 2 ); 223 private function define_public_hooks() 224 { 225 226 $plugin_public = new Neon_Product_Designer_Public($this->get_plugin_name(), $this->get_version()); 227 $plugin_admin = new Neon_Product_Designer_Admin($this->get_plugin_name(), $this->get_version()); 228 229 $this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_styles'); 230 $this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts'); 231 232 $this->loader->add_action('init', $plugin_public, 'register_shortcodes'); 233 $this->loader->add_action('woocommerce_after_add_to_cart_button', $plugin_public, 'get_customize_btn'); 234 235 $this->loader->add_filter('woocommerce_loop_add_to_cart_link', $plugin_public, 'get_customize_btn_loop', 10, 2); 226 236 227 237 // Add query vars and rewrite rules 228 $this->loader->add_filter( 'query_vars', $plugin_public, 'npd_add_query_vars');229 $this->loader->add_filter( 'init', $plugin_public, 'npd_add_rewrite_rules', 99);238 $this->loader->add_filter('query_vars', $plugin_public, 'npd_add_query_vars'); 239 $this->loader->add_filter('init', $plugin_public, 'npd_add_rewrite_rules', 99); 230 240 231 241 // Products 232 $npd_product = new NPD_Product( false);242 $npd_product = new NPD_Product(false); 233 243 //$this->loader->add_action( 'woocommerce_add_to_cart', $npd_product, 'set_custom_upl_cart_item_data', 99, 6 ); 234 $this->loader->add_filter( 'body_class', $npd_product, 'get_custom_products_body_class', 10, 2);244 $this->loader->add_filter('body_class', $npd_product, 'get_custom_products_body_class', 10, 2); 235 245 236 246 // Variable filters 237 $this->loader->add_action( 'init', $plugin_public, 'set_variable_action_filters', 99);247 $this->loader->add_action('init', $plugin_public, 'set_variable_action_filters', 99); 238 248 239 249 240 250 // Body class 241 $this->loader->add_filter( 'body_class', $plugin_public, 'add_class_to_body');251 $this->loader->add_filter('body_class', $plugin_public, 'add_class_to_body'); 242 252 243 253 // Shop loop item class 244 $this->loader->add_filter( 'post_class', $plugin_public, 'get_item_class', 10, 3);254 $this->loader->add_filter('post_class', $plugin_public, 'get_item_class', 10, 3); 245 255 246 256 // Sessions 247 $this->loader->add_action( 'init', $plugin_admin, 'init_sessions', 1);257 $this->loader->add_action('init', $plugin_admin, 'init_sessions', 1); 248 258 249 259 // Emails 250 $this->loader->add_action( 'woocommerce_order_item_meta_start', $plugin_public, 'set_email_order_item_meta', 10, 3);260 $this->loader->add_action('woocommerce_order_item_meta_start', $plugin_public, 'set_email_order_item_meta', 10, 3); 251 261 252 262 // Save variation attributes in transients 253 $this->loader->add_action( 'wp_ajax_npd_store_variation_attributes', $plugin_public, 'npd_store_variation_attributes');254 $this->loader->add_action( 'wp_ajax_nopriv_npd_store_variation_attributes', $plugin_public, 'npd_store_variation_attributes');263 $this->loader->add_action('wp_ajax_npd_store_variation_attributes', $plugin_public, 'npd_store_variation_attributes'); 264 $this->loader->add_action('wp_ajax_nopriv_npd_store_variation_attributes', $plugin_public, 'npd_store_variation_attributes'); 255 265 256 266 // Design hooks 257 267 $npd_design = new NPD_Design(); 258 268 259 $this->loader->add_action( 'wp_ajax_add_custom_design_to_cart', $npd_design, 'add_custom_design_to_cart_ajax');260 $this->loader->add_action( 'wp_ajax_nopriv_add_custom_design_to_cart', $npd_design, 'add_custom_design_to_cart_ajax');261 $this->loader->add_filter( 'woocommerce_cart_item_thumbnail', $npd_design, 'get_npd_data_image', 99, 3);262 $this->loader->add_filter( 'woocommerce_cart_item_name', $npd_design, 'get_product_name', 99, 3);263 $this->loader->add_filter( 'woocommerce_after_cart_item_name', $npd_design, 'get_npd_data', 99, 3);264 265 $this->loader->add_action( 'woocommerce_after_order_itemmeta', $npd_design, 'get_order_custom_admin_data', 10, 3);266 267 $this->loader->add_action( 'woocommerce_checkout_create_order_line_item', $npd_design, 'save_cart_item_custom_meta_as_order_item_meta', 10, 4);269 $this->loader->add_action('wp_ajax_add_custom_design_to_cart', $npd_design, 'add_custom_design_to_cart_ajax'); 270 $this->loader->add_action('wp_ajax_nopriv_add_custom_design_to_cart', $npd_design, 'add_custom_design_to_cart_ajax'); 271 $this->loader->add_filter('woocommerce_cart_item_thumbnail', $npd_design, 'get_npd_data_image', 99, 3); 272 $this->loader->add_filter('woocommerce_cart_item_name', $npd_design, 'get_product_name', 99, 3); 273 $this->loader->add_filter('woocommerce_after_cart_item_name', $npd_design, 'get_npd_data', 99, 3); 274 275 $this->loader->add_action('woocommerce_after_order_itemmeta', $npd_design, 'get_order_custom_admin_data', 10, 3); 276 277 $this->loader->add_action('woocommerce_checkout_create_order_line_item', $npd_design, 'save_cart_item_custom_meta_as_order_item_meta', 10, 4); 268 278 269 279 //$this->loader->add_filter( 'woocommerce_email_attachments', $npd_design, 'add_order_design_to_mail', 10, 3 ); 270 280 271 $this->loader->add_action( 'woocommerce_before_calculate_totals', $npd_design, 'get_cart_item_price', 10);272 281 $this->loader->add_action('woocommerce_before_calculate_totals', $npd_design, 'get_cart_item_price', 10); 282 273 283 // Emails 274 $this->loader->add_action( 'woocommerce_order_item_meta_start', $plugin_public, 'set_email_order_item_meta', 10, 3);284 $this->loader->add_action('woocommerce_order_item_meta_start', $plugin_public, 'set_email_order_item_meta', 10, 3); 275 285 } 276 286 … … 280 290 * @since 1.0.0 281 291 */ 282 public function run() { 292 public function run() 293 { 283 294 $this->loader->run(); 284 295 } … … 291 302 * @return string The name of the plugin. 292 303 */ 293 public function get_plugin_name() { 304 public function get_plugin_name() 305 { 294 306 return $this->npd; 295 307 } … … 301 313 * @return Neon_Product_Designer_Loader Orchestrates the hooks of the plugin. 302 314 */ 303 public function get_loader() { 315 public function get_loader() 316 { 304 317 return $this->loader; 305 318 } … … 311 324 * @return string The version number of the plugin. 312 325 */ 313 public function get_version() { 326 public function get_version() 327 { 314 328 return $this->version; 315 329 } -
neon-product-designer-for-woocommerce/trunk/neon-product-designer.php
r3130043 r3337250 17 17 * Plugin URI: https://neon-configurator.vertimcoders.com/ 18 18 * Description: The ultimate woocommerce neon product designer plugin for your signs. 19 * Version: 2. 1.119 * Version: 2.2.0 20 20 * Author: Vertim Coders 21 21 * Author URI: https://www.vertimcoders.com/ … … 27 27 28 28 // If this file is called directly, abort. 29 if ( ! defined( 'WPINC' )) {29 if (!defined('WPINC')) { 30 30 die; 31 31 } … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'NPD_VERSION', '2.1.1');39 define( 'NPD_URL', plugins_url( '/', __FILE__ ));40 define( 'NPD_DIR', dirname( __FILE__ ));41 define( 'NPD_MAIN_FILE', 'neon-product-designer/neon-product-designer.php');42 define( 'NPD_PLUGIN_NAME', 'Neon Product Designer');38 define('NPD_VERSION', '2.2.0'); 39 define('NPD_URL', plugins_url('/', __FILE__)); 40 define('NPD_DIR', dirname(__FILE__)); 41 define('NPD_MAIN_FILE', 'neon-product-designer/neon-product-designer.php'); 42 define('NPD_PLUGIN_NAME', 'Neon Product Designer'); 43 43 44 44 $upload_dir = wp_upload_dir(); … … 56 56 * This action is documented in includes/class-neon-product-designer-activator.php 57 57 */ 58 function activate_neon_product_designer() { 59 require_once plugin_dir_path( __FILE__ ) . 'includes/class-neon-product-designer-activator.php'; 58 function activate_neon_product_designer() 59 { 60 require_once plugin_dir_path(__FILE__) . 'includes/class-neon-product-designer-activator.php'; 60 61 Neon_Product_Designer_Activator::activate(); 61 62 } … … 65 66 * This action is documented in includes/class-neon-product-designer-deactivator.php 66 67 */ 67 function deactivate_neon_product_designer() { 68 require_once plugin_dir_path( __FILE__ ) . 'includes/class-neon-product-designer-deactivator.php'; 68 function deactivate_neon_product_designer() 69 { 70 require_once plugin_dir_path(__FILE__) . 'includes/class-neon-product-designer-deactivator.php'; 69 71 Neon_Product_Designer_Deactivator::deactivate(); 70 72 } 71 73 72 register_activation_hook( __FILE__, 'activate_neon_product_designer');73 register_deactivation_hook( __FILE__, 'deactivate_neon_product_designer');74 register_activation_hook(__FILE__, 'activate_neon_product_designer'); 75 register_deactivation_hook(__FILE__, 'deactivate_neon_product_designer'); 74 76 75 77 /** … … 77 79 * admin-specific hooks, and public-facing site hooks. 78 80 */ 79 require plugin_dir_path( __FILE__) . 'includes/class-neon-product-designer.php';81 require plugin_dir_path(__FILE__) . 'includes/class-neon-product-designer.php'; 80 82 81 if ( ! class_exists( 'Kali_Admin_Tools' )) {82 require_once plugin_dir_path( __FILE__) . 'includes/kali-admin-tools/kali-admin-tools.php';83 if (!class_exists('Kali_Admin_Tools')) { 84 require_once plugin_dir_path(__FILE__) . 'includes/kali-admin-tools/kali-admin-tools.php'; 83 85 } 84 86 85 87 86 require_once plugin_dir_path( __FILE__) . 'includes/functions.php';88 require_once plugin_dir_path(__FILE__) . 'includes/functions.php'; 87 89 88 require_once plugin_dir_path( __FILE__) . 'includes/class-npd-design.php';90 require_once plugin_dir_path(__FILE__) . 'includes/class-npd-design.php'; 89 91 90 92 require_once NPD_DIR . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'skins' . DIRECTORY_SEPARATOR . 'default' . DIRECTORY_SEPARATOR . 'class-npd-skin-default.php'; … … 105 107 * @since 1.0.0 106 108 */ 107 function run_neon_product_designer() { 109 function run_neon_product_designer() 110 { 108 111 109 112 $plugin = new Neon_Product_Designer(); -
neon-product-designer-for-woocommerce/trunk/public/css/neon-product-designer-public.css
r2937134 r3337250 4 4 */ 5 5 6 7 .npd-cart-item-data-wrap{ 6 .npd-cart-item-data-wrap { 8 7 display: flex; 9 justify-content: space-between;10 padding: 5px;8 justify-content: space-between; 9 padding: 5px; 11 10 } 12 .npd-cart-item-data-container {11 .npd-cart-item-data-container { 13 12 max-width: 300px; 14 13 margin-bottom: 20px; 15 14 border: 1px solid #e8e8e8; 16 15 } 17 .npd-cart-item-data-wrap:nth-child(even) {18 background-color:#e8e8e8;16 .npd-cart-item-data-wrap:nth-child(even) { 17 background-color: #e8e8e8; 19 18 } 20 .cart-item-data-color {21 display: inline-block;22 width: 30px;23 height: 30px;24 border-radius: 4px;25 margin-right: 10px;26 vertical-align: middle;19 .cart-item-data-color { 20 display: inline-block; 21 width: 30px; 22 height: 30px; 23 border-radius: 4px; 24 margin-right: 10px; 25 vertical-align: middle; 27 26 } 28 .npd-cartitem-img {29 height: auto;30 width: 100px;31 max-width: 100px27 .npd-cartitem-img { 28 height: auto; 29 width: 100px; 30 max-width: 100px; 32 31 } 33 .npd-design-product {34 border-radius: 4px !important;35 height: 40px !important;36 background-color: #55C1CA!important;37 outline: none !important;38 box-shadow: none !important;39 display: inline-block;40 line-height: 40px !important;41 color: #fff !important;42 padding: 0px 15px !important;43 margin: 5px 0px !important;44 text-decoration: none !important;45 font-size: 14px !important;32 .npd-design-product { 33 border-radius: 4px !important; 34 height: 40px !important; 35 background-color: #55c1ca !important; 36 outline: none !important; 37 box-shadow: none !important; 38 display: inline-block; 39 line-height: 40px !important; 40 color: #fff !important; 41 padding: 0px 15px !important; 42 margin: 5px 0px !important; 43 text-decoration: none !important; 44 font-size: 14px !important; 46 45 } 47 .npd-grid .cat-item-ctn {48 display: inline-block;49 vertical-align: middle;50 float: left;51 margin: 20px 10px;46 .npd-grid .cat-item-ctn { 47 display: inline-block; 48 vertical-align: middle; 49 float: left; 50 margin: 20px 10px; 52 51 } 53 52 54 .npd-grid .cat-item-ctn .cat-item {55 border: 1px solid #eee;56 text-align: center;53 .npd-grid .cat-item-ctn .cat-item { 54 border: 1px solid #eee; 55 text-align: center; 57 56 } 58 .npd-grid .cat-item-ctn .cat-item h3 {59 padding: 0px 10px;57 .npd-grid .cat-item-ctn .cat-item h3 { 58 padding: 0px 10px; 60 59 } 61 .npd-grid .cat-item-ctn .cat-item hr {62 margin-bottom: 0px;60 .npd-grid .cat-item-ctn .cat-item hr { 61 margin-bottom: 0px; 63 62 } 64 .npd-grid .cat-item-ctn .cat-item a {65 margin: 10px auto !important;63 .npd-grid .cat-item-ctn .cat-item a { 64 margin: 10px auto !important; 66 65 } 67 .woocommerce-cart-form__cart-item .product-name .omodal .omodal-dialog .omodal-content .omodal-body img{ 66 .woocommerce-cart-form__cart-item 67 .product-name 68 .omodal 69 .omodal-dialog 70 .omodal-content 71 .omodal-body 72 img { 68 73 width: 100% !important; 69 74 height: auto !important;
Note: See TracChangeset
for help on using the changeset viewer.