ype::VARIATION ] ), 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); $params['sku'] = array( 'description' => __( 'Limit result set to products with specific SKU(s). Use commas to separate.', 'woocommerce' ), 'type' => 'string', 'sanitize_callback' => 'sanitize_text_field', 'validate_callback' => 'rest_validate_request_arg', ); $params['featured'] = array( 'description' => __( 'Limit result set to featured products.', 'woocommerce' ), 'type' => 'boolean', 'sanitize_callback' => 'wc_string_to_bool', 'validate_callback' => 'rest_validate_request_arg', ); $params['category'] = array( 'description' => __( 'Limit result set to products assigned a set of category IDs or slugs, separated by commas.', 'woocommerce' ), 'type' => 'string', 'sanitize_callback' => 'wp_parse_list', 'validate_callback' => 'rest_validate_request_arg', ); $params['category_operator'] = array( 'description' => __( 'Operator to compare product category terms.', 'woocommerce' ), 'type' => 'string', 'enum' => [ 'in', 'not_in', 'and' ], 'default' => 'in', 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); $params['brand'] = array( 'description' => __( 'Limit result set to products assigned a set of brand IDs or slugs, separated by commas.', 'woocommerce' ), 'type' => 'string', 'sanitize_callback' => 'wp_parse_list', 'validate_callback' => 'rest_validate_request_arg', ); $params['brand_operator'] = array( 'description' => __( 'Operator to compare product brand terms.', 'woocommerce' ), 'type' => 'string', 'enum' => [ 'in', 'not_in', 'and' ], 'default' => 'in', 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); // If the $_REQUEST contains a taxonomy query, add it to the params and sanitize it. foreach ( $_REQUEST as $param => $value ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( ! is_string( $param ) ) { continue; } if ( str_starts_with( $param, '_unstable_tax_' ) && ! str_ends_with( $param, '_operator' ) ) { $params[ $param ] = array( 'description' => __( 'Limit result set to products assigned a set of taxonomies IDs or slugs, separated by commas.', 'woocommerce' ), 'type' => 'string', 'sanitize_callback' => 'wp_parse_list', 'validate_callback' => 'rest_validate_request_arg', ); } if ( str_starts_with( $param, '_unstable_tax_' ) && str_ends_with( $param, '_operator' ) ) { $params[ $param ] = array( 'description' => __( 'Operator to compare product taxonomies terms.', 'woocommerce' ), 'type' => 'string', 'enum' => [ 'in', 'not_in', 'and' ], 'default' => 'in', 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); } } $params['tag'] = array( 'description' => __( 'Limit result set to products assigned a set of tag IDs or slugs, separated by commas.', 'woocommerce' ), 'type' => 'string', 'sanitize_callback' => 'wp_parse_list', 'validate_callback' => 'rest_validate_request_arg', ); $params['tag_operator'] = array( 'description' => __( 'Operator to compare product tags.', 'woocommerce' ), 'type' => 'string', 'enum' => [ 'in', 'not_in', 'and' ], 'default' => 'in', 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); $params['on_sale'] = array( 'description' => __( 'Limit result set to products on sale.', 'woocommerce' ), 'type' => 'boolean', 'sanitize_callback' => 'wc_string_to_bool', 'validate_callback' => 'rest_validate_request_arg', ); $params['min_price'] = array( 'description' => __( 'Limit result set to products based on a minimum price, provided using the smallest unit of the currency.', 'woocommerce' ), 'type' => 'string', 'sanitize_callback' => 'sanitize_text_field', 'validate_callback' => 'rest_validate_request_arg', ); $params['max_price'] = array( 'description' => __( 'Limit result set to products based on a maximum price, provided using the smallest unit of the currency.', 'woocommerce' ), 'type' => 'string', 'sanitize_callback' => 'sanitize_text_field', 'validate_callback' => 'rest_validate_request_arg', ); $params['stock_status'] = array( 'description' => __( 'Limit result set to products with specified stock status.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'string', 'enum' => array_keys( wc_get_product_stock_status_options() ), 'sanitize_callback' => 'sanitize_text_field', 'validate_callback' => 'rest_validate_request_arg', ), 'default' => [], ); $params['attributes'] = array( 'description' => __( 'Limit result set to products with selected global attributes.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'object', 'properties' => array( 'attribute' => array( 'description' => __( 'Attribute taxonomy name.', 'woocommerce' ), 'type' => 'string', 'sanitize_callback' => 'wc_sanitize_taxonomy_name', ), 'term_id' => array( 'description' => __( 'List of attribute term IDs.', 'woocommerce' ), 'type' => 'array', 'items' => [ 'type' => 'integer', ], 'sanitize_callback' => 'wp_parse_id_list', ), 'slug' => array( 'description' => __( 'List of attribute slug(s). If a term ID is provided, this will be ignored.', 'woocommerce' ), 'type' => 'array', 'items' => [ 'type' => 'string', ], 'sanitize_callback' => 'wp_parse_slug_list', ), 'operator' => array( 'description' => __( 'Operator to compare product attribute terms.', 'woocommerce' ), 'type' => 'string', 'enum' => [ 'in', 'not_in', 'and' ], ), ), ), 'default' => [], ); $params['attribute_relation'] = array( 'description' => __( 'The logical relationship between attributes when filtering across multiple at once.', 'woocommerce' ), 'type' => 'string', 'enum' => [ 'in', 'and' ], 'default' => 'and', 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); $params['catalog_visibility'] = array( 'description' => __( 'Determines if hidden or visible catalog products are shown.', 'woocommerce' ), 'type' => 'string', 'enum' => array( 'any', CatalogVisibility::VISIBLE, CatalogVisibility::CATALOG, CatalogVisibility::SEARCH, CatalogVisibility::HIDDEN ), 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); $params['rating'] = array( 'description' => __( 'Limit result set to products with a certain average rating.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', 'enum' => range( 1, 5 ), ), 'default' => [], 'sanitize_callback' => 'wp_parse_id_list', ); return $params; } } riority' => 40, 'choices' => array( 'close' => esc_html__( 'Close', 'martfury' ), 'open' => esc_html__( 'Open', 'martfury' ), ), 'active_callback' => array( array( 'setting' => 'product_collapse_tab', 'operator' => '==', 'value' => 1, ), ), ), // Inner Page 'inner_page_header_layout' => array( 'type' => 'select', 'label' => esc_html__( 'Header Layout', 'martfury' ), 'section' => 'inner_page_mobile', 'default' => 'v2', 'priority' => 20, 'choices' => array( 'v1' => esc_html__( 'Layout 1', 'martfury' ), 'v2' => esc_html__( 'Layout 2', 'martfury' ), ), ), 'custom_inner_page_history_back' => array( 'type' => 'custom', 'section' => 'inner_page_mobile', 'label' => '
', 'default' => '

' . esc_html__( 'Go Back Button', 'martfury' ) . '

', 'priority' => 20, 'active_callback' => array( array( 'setting' => 'inner_page_header_layout', 'operator' => '==', 'value' => 'v2', ), ), ), 'inner_page_history_back' => array( 'type' => 'toggle', 'label' => esc_html__( 'Go Back to Previous Page', 'martfury' ), 'section' => 'inner_page_mobile', 'default' => 0, 'priority' => 20, 'active_callback' => array( array( 'setting' => 'inner_page_header_layout', 'operator' => '==', 'value' => 'v2', ), ), ), // Footer Mobile 'footer_newsletter_mobile' => array( 'type' => 'toggle', 'label' => esc_html__( 'Footer Newsletter', 'martfury' ), 'section' => 'footer_mobile', 'description' => esc_html__( 'Check this option to show the footer newsletter on mobile.', 'martfury' ), 'default' => 0, 'priority' => 20, ), 'footer_info_mobile' => array( 'type' => 'toggle', 'label' => esc_html__( 'Footer Info', 'martfury' ), 'section' => 'footer_mobile', 'description' => esc_html__( 'Check this option to show the footer info on mobile.', 'martfury' ), 'default' => 0, 'priority' => 20, ), 'footer_widgets_mobile' => array( 'type' => 'toggle', 'label' => esc_html__( 'Footer Widgets', 'martfury' ), 'section' => 'footer_mobile', 'description' => esc_html__( 'Check this option to show the footer widgets on mobile.', 'martfury' ), 'default' => 1, 'priority' => 20, ), 'footer_links_mobile' => array( 'type' => 'toggle', 'label' => esc_html__( 'Footer Link', 'martfury' ), 'section' => 'footer_mobile', 'description' => esc_html__( 'Check this option to show the footer link on mobile.', 'martfury' ), 'default' => 0, 'priority' => 20, ), 'custom_footer_recently_mobile' => array( 'type' => 'custom', 'section' => 'footer_mobile', 'default' => '
', 'priority' => 20, ), 'footer_recently_viewed_mobile' => array( 'type' => 'toggle', 'label' => esc_html__( 'Show Recently Viewed', 'martfury' ), 'section' => 'footer_mobile', 'default' => 1, 'priority' => 90, 'description' => esc_html__( 'Check this option to show the recently viewed products on mobile.', 'martfury' ), ), 'footer_recently_viewed_els_mobile' => array( 'type' => 'multicheck', 'label' => esc_html__( 'Show Recently Viewed in', 'martfury' ), 'section' => 'footer_mobile', 'default' => array( 'homepage', 'catalog', 'single_product' ), 'priority' => 90, 'choices' => array( 'homepage' => esc_html__( 'HomePage', 'martfury' ), 'catalog' => esc_html__( 'Catalog', 'martfury' ), 'single_product' => esc_html__( 'Single Product', 'martfury' ), 'page' => esc_html__( 'Page', 'martfury' ), 'post' => esc_html__( 'Post', 'martfury' ), 'other' => esc_html__( 'Other Pages', 'martfury' ), ), 'description' => esc_html__( 'Check pages to show the recently viewed products on mobile.', 'martfury' ), 'active_callback' => array( array( 'setting' => 'footer_recently_viewed_mobile', 'operator' => '==', 'value' => 1, ), ), ), ) ); if ( class_exists( 'WeDevs_Dokan' ) || class_exists( 'WC_Vendors' ) || class_exists( 'MVX' ) || class_exists( 'WCFMmp' ) ) { $fields = array_merge( $fields, array( 'catalog_toolbar_els_12_mobile' => array( 'type' => 'multicheck', 'label' => esc_html__( 'ToolBar Elements', 'martfury' ), 'section' => 'vendor_mobile', 'default' => array( 'filter', 'view' ), 'priority' => 70, 'choices' => array( 'filter' => esc_html__( 'Filter', 'martfury' ), 'view' => esc_html__( 'View', 'martfury' ), ), 'description' => esc_html__( 'Select which elements you want to show.', 'martfury' ), ), 'catalog_toolbar_filter_text_12_mobile' => array( 'type' => 'text', 'label' => esc_html__( 'Filter Text', 'martfury' ), 'section' => 'vendor_mobile', 'default' => esc_html__( 'Filter', 'martfury' ), 'priority' => 70, ), ) ); } return $fields; } add_filter( 'martfury_customize_fields', 'martfury_mobile_customize_fields' ); Ajmal – Qutbi Herbal Store

Ajmal

The information provided on this website is for informational purposes only and is not a substitute for advice from your healthcare provider. Always consult a medical professional for any health concerns or treatments. Product images are for representation purposes only, and actual products may vary slightly in appearance and price.

Main Menu