Changeset 3128405
- Timestamp:
- 07/30/2024 10:49:22 PM (20 months ago)
- Location:
- wpappsdev-pcbuilder
- Files:
-
- 147 added
- 7 edited
-
tags/2.2.0 (added)
-
tags/2.2.0/assets (added)
-
tags/2.2.0/assets/css (added)
-
tags/2.2.0/assets/css/wpadpcbu-admin.css (added)
-
tags/2.2.0/assets/css/wpadpcbu-public.css (added)
-
tags/2.2.0/assets/js (added)
-
tags/2.2.0/assets/js/wpadpcbu-admin.js (added)
-
tags/2.2.0/assets/js/wpadpcbu-public.js (added)
-
tags/2.2.0/assets/lib (added)
-
tags/2.2.0/assets/lib/ion.rangeSlider.min.css (added)
-
tags/2.2.0/assets/lib/ion.rangeSlider.min.js (added)
-
tags/2.2.0/assets/lib/waitMe.min.css (added)
-
tags/2.2.0/assets/lib/waitMe.min.js (added)
-
tags/2.2.0/includes (added)
-
tags/2.2.0/includes/Abstracts (added)
-
tags/2.2.0/includes/Abstracts/WPAppsDevShortcode.php (added)
-
tags/2.2.0/includes/Admin (added)
-
tags/2.2.0/includes/Admin.php (added)
-
tags/2.2.0/includes/Admin/Menu.php (added)
-
tags/2.2.0/includes/Admin/Product.php (added)
-
tags/2.2.0/includes/Admin/Settings.php (added)
-
tags/2.2.0/includes/Ajax.php (added)
-
tags/2.2.0/includes/Assets.php (added)
-
tags/2.2.0/includes/Component.php (added)
-
tags/2.2.0/includes/DynamicTaxonomy.php (added)
-
tags/2.2.0/includes/FiltersGroup.php (added)
-
tags/2.2.0/includes/Frontend (added)
-
tags/2.2.0/includes/Frontend.php (added)
-
tags/2.2.0/includes/Frontend/CustomerDashboard.php (added)
-
tags/2.2.0/includes/Helper (added)
-
tags/2.2.0/includes/Helper/BuilderManager.php (added)
-
tags/2.2.0/includes/Helper/SavedConfigurationManager.php (added)
-
tags/2.2.0/includes/Helper/SearchManager.php (added)
-
tags/2.2.0/includes/Installer.php (added)
-
tags/2.2.0/includes/Shortcodes (added)
-
tags/2.2.0/includes/Shortcodes/PcBuilders.php (added)
-
tags/2.2.0/includes/Shortcodes/PcBuildersSearch.php (added)
-
tags/2.2.0/includes/Shortcodes/Shortcodes.php (added)
-
tags/2.2.0/includes/Traits (added)
-
tags/2.2.0/includes/Traits/Singleton.php (added)
-
tags/2.2.0/includes/functions-helper.php (added)
-
tags/2.2.0/languages (added)
-
tags/2.2.0/languages/wpappsdev-pcbuilder.pot (added)
-
tags/2.2.0/readme.txt (added)
-
tags/2.2.0/src (added)
-
tags/2.2.0/src/css (added)
-
tags/2.2.0/src/css/wpadpcbu-admin.css (added)
-
tags/2.2.0/src/css/wpadpcbu-public.css (added)
-
tags/2.2.0/src/js (added)
-
tags/2.2.0/src/js/wpadpcbu-admin.js (added)
-
tags/2.2.0/src/js/wpadpcbu-public.js (added)
-
tags/2.2.0/src/lib (added)
-
tags/2.2.0/src/lib/ion.rangeSlider.min.css (added)
-
tags/2.2.0/src/lib/ion.rangeSlider.min.js (added)
-
tags/2.2.0/src/lib/waitMe.min.css (added)
-
tags/2.2.0/src/lib/waitMe.min.js (added)
-
tags/2.2.0/templates (added)
-
tags/2.2.0/templates/admin (added)
-
tags/2.2.0/templates/admin/admin-notice.php (added)
-
tags/2.2.0/templates/admin/category-add-form.php (added)
-
tags/2.2.0/templates/admin/category-edit-form.php (added)
-
tags/2.2.0/templates/admin/product-metabox.php (added)
-
tags/2.2.0/templates/dashboard (added)
-
tags/2.2.0/templates/dashboard/saved-configurations.php (added)
-
tags/2.2.0/templates/dashboard/view-configuration.php (added)
-
tags/2.2.0/templates/shortcodes (added)
-
tags/2.2.0/templates/shortcodes/pc-builder-product.php (added)
-
tags/2.2.0/templates/shortcodes/pc-builder-search.php (added)
-
tags/2.2.0/templates/shortcodes/pc-builder.php (added)
-
tags/2.2.0/vendor (added)
-
tags/2.2.0/vendor/WPAppsDev (added)
-
tags/2.2.0/vendor/WPAppsDev/WpadCpt.php (added)
-
tags/2.2.0/vendor/WPAppsDev/WpadHelper.php (added)
-
tags/2.2.0/vendor/WPAppsDev/WpadMetaBox.php (added)
-
tags/2.2.0/vendor/WPAppsDev/WpadSettingApi.php (added)
-
tags/2.2.0/vendor/WPAppsDev/WpadTaxonomy.php (added)
-
tags/2.2.0/vendor/WPAppsDev/assets (added)
-
tags/2.2.0/vendor/WPAppsDev/assets/css (added)
-
tags/2.2.0/vendor/WPAppsDev/assets/css/chosen.css (added)
-
tags/2.2.0/vendor/WPAppsDev/assets/css/jqueryui.css (added)
-
tags/2.2.0/vendor/WPAppsDev/assets/css/meta_box.css (added)
-
tags/2.2.0/vendor/WPAppsDev/assets/images (added)
-
tags/2.2.0/vendor/WPAppsDev/assets/images/chosen-sprite.png (added)
-
tags/2.2.0/vendor/WPAppsDev/assets/images/image.png (added)
-
tags/2.2.0/vendor/WPAppsDev/assets/images/sprite.png (added)
-
tags/2.2.0/vendor/WPAppsDev/assets/js (added)
-
tags/2.2.0/vendor/WPAppsDev/assets/js/chosen.js (added)
-
tags/2.2.0/vendor/WPAppsDev/assets/js/nap.js (added)
-
tags/2.2.0/vendor/WPAppsDev/assets/js/scripts.js (added)
-
tags/2.2.0/vendor/WPAppsDev/assets/js/settings.js (added)
-
tags/2.2.0/vendor/WPAppsDev/fields (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/checkbox-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/checkbox-group-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/color-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/date-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/editor-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/email-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/file-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/image-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/image-field1.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/multiimage-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/number-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/post-checkboxes-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/post-drop-sort-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/post-select-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/radio-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/repeatable-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/select-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/slider-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/tax-checkboxes-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/tax-select-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/text-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/textarea-field.php (added)
-
tags/2.2.0/vendor/WPAppsDev/fields/url-field.php (added)
-
tags/2.2.0/vendor/appsero (added)
-
tags/2.2.0/vendor/appsero/client (added)
-
tags/2.2.0/vendor/appsero/client/src (added)
-
tags/2.2.0/vendor/appsero/client/src/Client.php (added)
-
tags/2.2.0/vendor/appsero/client/src/Insights.php (added)
-
tags/2.2.0/vendor/appsero/client/src/License.php (added)
-
tags/2.2.0/vendor/autoload.php (added)
-
tags/2.2.0/vendor/composer (added)
-
tags/2.2.0/vendor/composer/ClassLoader.php (added)
-
tags/2.2.0/vendor/composer/InstalledVersions.php (added)
-
tags/2.2.0/vendor/composer/LICENSE (added)
-
tags/2.2.0/vendor/composer/autoload_classmap.php (added)
-
tags/2.2.0/vendor/composer/autoload_files.php (added)
-
tags/2.2.0/vendor/composer/autoload_namespaces.php (added)
-
tags/2.2.0/vendor/composer/autoload_psr4.php (added)
-
tags/2.2.0/vendor/composer/autoload_real.php (added)
-
tags/2.2.0/vendor/composer/autoload_static.php (added)
-
tags/2.2.0/vendor/composer/installed.json (added)
-
tags/2.2.0/vendor/composer/installed.php (added)
-
tags/2.2.0/vendor/composer/platform_check.php (added)
-
tags/2.2.0/wpappsdev-pcbuilder.php (added)
-
trunk/includes/Ajax.php (modified) (2 diffs)
-
trunk/includes/DynamicTaxonomy.php (modified) (1 diff)
-
trunk/includes/FiltersGroup.php (modified) (1 diff)
-
trunk/includes/functions-helper.php (modified) (11 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src (added)
-
trunk/src/css (added)
-
trunk/src/css/wpadpcbu-admin.css (added)
-
trunk/src/css/wpadpcbu-public.css (added)
-
trunk/src/js (added)
-
trunk/src/js/wpadpcbu-admin.js (added)
-
trunk/src/js/wpadpcbu-public.js (added)
-
trunk/src/lib (added)
-
trunk/src/lib/ion.rangeSlider.min.css (added)
-
trunk/src/lib/ion.rangeSlider.min.js (added)
-
trunk/src/lib/waitMe.min.css (added)
-
trunk/src/lib/waitMe.min.js (added)
-
trunk/templates/admin/product-metabox.php (modified) (2 diffs)
-
trunk/wpappsdev-pcbuilder.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpappsdev-pcbuilder/trunk/includes/Ajax.php
r3094849 r3128405 136 136 137 137 foreach ( $filter_items as $item ) { 138 $taxonomy = 'cf-' . $item['filter_slug'];138 $taxonomy = get_filter_taxonomy_slug( $item['filter_slug'] ); 139 139 $name = $item['filter_name']; 140 140 $options = generating_select_options( get_tax_terms_list( $taxonomy ), 'term_id', 'name', '' ); … … 524 524 525 525 foreach ( $temp_filters as $filter ) { 526 $tax_filters[ "cf-{$filter['tax']}" ][] = $filter['val']; 526 $tax_slug = get_filter_taxonomy_slug( $filter['tax'] ); 527 $tax_filters[ $tax_slug ][] = $filter['val']; 527 528 } 528 529 -
wpappsdev-pcbuilder/trunk/includes/DynamicTaxonomy.php
r2607896 r3128405 52 52 ]; 53 53 54 $this->component_filters[] = new WpadTaxonomy( 'cf-' . $taxonomy['filter_slug'], 'product', $taxonomy['filter_name'], $taxonomy['filter_name'], $args ); 54 $tax_slug = get_filter_taxonomy_slug( $taxonomy['filter_slug'] ); 55 56 if ( str_starts_with( $tax_slug, 'cf-' ) ) { 57 $this->component_filters[] = new WpadTaxonomy( $tax_slug, 'product', $taxonomy['filter_name'], $taxonomy['filter_name'], $args ); 58 } 55 59 } 56 60 } -
wpappsdev-pcbuilder/trunk/includes/FiltersGroup.php
r2736642 r3128405 156 156 $link = add_query_arg( 157 157 [ 158 'taxonomy' => 'cf-' . esc_attr( $cf_item['filter_slug']),158 'taxonomy' => esc_attr( get_filter_taxonomy_slug( $cf_item['filter_slug'] ) ), 159 159 'post_type' => 'product', 160 160 ], -
wpappsdev-pcbuilder/trunk/includes/functions-helper.php
r2777405 r3128405 37 37 */ 38 38 function wpadpcbu_allowed_html() { 39 $allowed_html =[39 return [ 40 40 'img' => [ 41 41 'width' => [], … … 52 52 ], 53 53 ]; 54 55 return $allowed_html;56 54 } 57 55 … … 198 196 $template_path = get_template_directory() . '/' . WPADPCBU_NAME . '/'; 199 197 } 198 200 199 // Set default plugin templates path. 201 200 if ( ! $default_path ) { … … 204 203 // Search template file in theme folder. 205 204 $template = locate_template( [ $template_path . $template_name, $template_name ] ); 205 206 206 // Get plugins template file. 207 207 if ( ! $template ) { … … 363 363 } 364 364 365 $data =[365 return [ 366 366 'total_items' => $total_items, 367 367 'total_pages' => ( 0 === $total_items ) ? 0 : ceil( $total_items / $per_page ), … … 370 370 'current_page' => $current_page, 371 371 ]; 372 373 return $data;374 372 } 375 373 … … 478 476 if ( is_numeric( $page_id ) ) { 479 477 return esc_url_raw( get_permalink( $page_id ) ); 480 } else {481 return '#'; 482 }478 } 479 480 return '#'; 483 481 } 484 482 … … 540 538 */ 541 539 function get_component_filters( $component_id ) { 542 $filters = []; 543 540 $filters = []; 544 541 $cfgroup_id = (int) get_term_meta( $component_id, 'wpadpcbu_component_filters_group', true ); 545 542 … … 550 547 foreach ( $filters_list as $filter ) { 551 548 $filters[ $filter['filter_slug'] ]['name'] = wc_clean( $filter['filter_name'] ); 552 $filters[ $filter['filter_slug'] ]['items'] = get_tax_terms_list( "cf-{$filter['filter_slug']}");549 $filters[ $filter['filter_slug'] ]['items'] = get_tax_terms_list( get_filter_taxonomy_slug( $filter['filter_slug'] ) ); 553 550 } 554 551 } … … 556 553 557 554 return $filters; 555 } 556 557 /** 558 * Getting taxonomy slug. 559 * 560 * @return array 561 */ 562 function get_filter_taxonomy_slug( $filter_slug ) { 563 $use_existing_tax = apply_filters( 'wpadpcbu_component_use_existing_tax', [ 'product_cat', 'product_tag' ] ); 564 565 return in_array( $filter_slug, $use_existing_tax ) ? $filter_slug : "cf-{$filter_slug}"; 558 566 } 559 567 … … 578 586 ], 579 587 [ 580 'key' => 'wpadpcbu_required_component',588 'key' => 'wpadpcbu_required_component', 581 589 'compare' => '=', 582 590 'value' => 'yes', -
wpappsdev-pcbuilder/trunk/readme.txt
r3096954 r3128405 7 7 Requires PHP: 7.4 8 8 Requires at least: 6.0 9 Tested up to: 6. 5.310 Version: 2. 1.011 Stable tag: 2. 1.09 Tested up to: 6.6.1 10 Version: 2.2.0 11 Stable tag: 2.2.0 12 12 License: GPLv2 or later 13 13 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 125 125 == Changelog == 126 126 127 = 2.2.0 = 128 * Added: Use existing product category as component filter. 129 127 130 = 2.1.0 = 128 131 * Added: Appsero tracker for plugin analytics. -
wpappsdev-pcbuilder/trunk/templates/admin/product-metabox.php
r3094849 r3128405 1 <?php // wpadpcbu_print( $pcbu_settings );?>1 <?php // wpadpcbu_print( $pcbu_settings );?> 2 2 <div class="options_group"> 3 3 <?php if ( is_array( $pcbu_settings ) && ! empty( $pcbu_settings ) ) {?> … … 13 13 if ( is_array( $filter_items ) ) { 14 14 foreach ( $filter_items as $item ) { 15 $taxonomy = 'cf-' . $item['filter_slug'];15 $taxonomy = get_filter_taxonomy_slug( $item['filter_slug'] ); 16 16 $name = $item['filter_name']; 17 17 $options = generating_select_options( get_tax_terms_list( $taxonomy ), 'term_id', 'name', $filters[$taxonomy] ); -
wpappsdev-pcbuilder/trunk/wpappsdev-pcbuilder.php
r3096954 r3128405 3 3 * Plugin Name: WooCommerce Custom Product Builder or Configurator - Especially PC Builder Toolkit 4 4 * Description: Complete personal computer (PC) components selling solution toolkit for WooCommerce. This increases sales by Creating a product configuration for your online store. Assist in the assembly of a finished product from individual components. 5 * Version: 2. 1.05 * Version: 2.2.0 6 6 * Author: Saiful Islam Ananda 7 7 * Author URI: http://siananda.me/ … … 12 12 * Requires at least: 6.0 13 13 * Requires PHP: 7.4 14 * WC tested up to: 8.914 * WC tested up to: 9.1.4 15 15 */ 16 16 … … 35 35 * @var string 36 36 */ 37 public $version = '2. 1.0';37 public $version = '2.2.0'; 38 38 39 39 /**
Note: See TracChangeset
for help on using the changeset viewer.