Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../themes/Divi/includes/builder/module
File: Shop.php
<?php
[0] Fix | Delete
[1] Fix | Delete
require_once 'helpers/Overlay.php';
[2] Fix | Delete
[3] Fix | Delete
[4] Fix | Delete
class ET_Builder_Module_Shop extends ET_Builder_Module_Type_PostBased {
[5] Fix | Delete
[6] Fix | Delete
function init() {
[7] Fix | Delete
$this->name = esc_html__( 'Shop', 'et_builder' );
[8] Fix | Delete
$this->plural = esc_html__( 'Shops', 'et_builder' );
[9] Fix | Delete
$this->slug = 'et_pb_shop';
[10] Fix | Delete
$this->vb_support = 'on';
[11] Fix | Delete
[12] Fix | Delete
$this->main_css_element = '%%order_class%%.et_pb_shop';
[13] Fix | Delete
[14] Fix | Delete
$this->settings_modal_toggles = array(
[15] Fix | Delete
'general' => array(
[16] Fix | Delete
'toggles' => array(
[17] Fix | Delete
'main_content' => et_builder_i18n( 'Content' ),
[18] Fix | Delete
'elements' => et_builder_i18n( 'Elements' ),
[19] Fix | Delete
),
[20] Fix | Delete
),
[21] Fix | Delete
'advanced' => array(
[22] Fix | Delete
'toggles' => array(
[23] Fix | Delete
'overlay' => et_builder_i18n( 'Overlay' ),
[24] Fix | Delete
'image' => et_builder_i18n( 'Image' ),
[25] Fix | Delete
'star' => esc_html__( 'Star Rating', 'et_builder' ),
[26] Fix | Delete
),
[27] Fix | Delete
),
[28] Fix | Delete
);
[29] Fix | Delete
[30] Fix | Delete
$this->advanced_fields = array(
[31] Fix | Delete
'fonts' => array(
[32] Fix | Delete
'title' => array(
[33] Fix | Delete
'label' => et_builder_i18n( 'Title' ),
[34] Fix | Delete
'css' => array(
[35] Fix | Delete
'main' => "{$this->main_css_element} .woocommerce ul.products li.product h3, {$this->main_css_element} .woocommerce ul.products li.product h1, {$this->main_css_element} .woocommerce ul.products li.product h2, {$this->main_css_element} .woocommerce ul.products li.product h4, {$this->main_css_element} .woocommerce ul.products li.product h5, {$this->main_css_element} .woocommerce ul.products li.product h6",
[36] Fix | Delete
'hover' => "{$this->main_css_element} .woocommerce ul.products li.product h3:hover, {$this->main_css_element} .woocommerce ul.products li.product h1:hover, {$this->main_css_element} .woocommerce ul.products li.product h2:hover, {$this->main_css_element} .woocommerce ul.products li.product h4:hover, {$this->main_css_element} .woocommerce ul.products li.product h5:hover, {$this->main_css_element} .woocommerce ul.products li.product h6:hover, {$this->main_css_element} .woocommerce ul.products li.product h1.hover, {$this->main_css_element} .woocommerce ul.products li.product h2.hover, {$this->main_css_element} .woocommerce ul.products li.product h3.hover, {$this->main_css_element} .woocommerce ul.products li.product h4.hover, {$this->main_css_element} .woocommerce ul.products li.product h5.hover, {$this->main_css_element} .woocommerce ul.products li.product h6.hover",
[37] Fix | Delete
'important' => 'plugin_only',
[38] Fix | Delete
),
[39] Fix | Delete
),
[40] Fix | Delete
'price' => array(
[41] Fix | Delete
'label' => esc_html__( 'Price', 'et_builder' ),
[42] Fix | Delete
'css' => array(
[43] Fix | Delete
'main' => "{$this->main_css_element} .woocommerce ul.products li.product .price, {$this->main_css_element} .woocommerce ul.products li.product .price .amount",
[44] Fix | Delete
'hover' => "{$this->main_css_element} .woocommerce ul.products li.product .price:hover, {$this->main_css_element} .woocommerce ul.products li.product .price:hover .amount, {$this->main_css_element} .woocommerce ul.products li.product .price.hover, {$this->main_css_element} .woocommerce ul.products li.product .price.hover .amount",
[45] Fix | Delete
),
[46] Fix | Delete
'line_height' => array(
[47] Fix | Delete
'range_settings' => array(
[48] Fix | Delete
'min' => '1',
[49] Fix | Delete
'max' => '100',
[50] Fix | Delete
'step' => '1',
[51] Fix | Delete
),
[52] Fix | Delete
),
[53] Fix | Delete
),
[54] Fix | Delete
'sale_badge' => array(
[55] Fix | Delete
'label' => esc_html__( 'Sale Badge', 'et_builder' ),
[56] Fix | Delete
'css' => array(
[57] Fix | Delete
'main' => "{$this->main_css_element} .woocommerce ul.products li.product .onsale",
[58] Fix | Delete
'important' => array( 'line-height', 'font', 'text-shadow' ),
[59] Fix | Delete
),
[60] Fix | Delete
'hide_text_align' => true,
[61] Fix | Delete
'line_height' => array(
[62] Fix | Delete
'default' => '1.3em',
[63] Fix | Delete
),
[64] Fix | Delete
'font_size' => array(
[65] Fix | Delete
'default' => '20px',
[66] Fix | Delete
),
[67] Fix | Delete
'letter_spacing' => array(
[68] Fix | Delete
'default' => '0px',
[69] Fix | Delete
),
[70] Fix | Delete
),
[71] Fix | Delete
'sale_price' => array(
[72] Fix | Delete
'label' => esc_html__( 'Sale Price', 'et_builder' ),
[73] Fix | Delete
'css' => array(
[74] Fix | Delete
'main' => "{$this->main_css_element} .woocommerce ul.products li.product .price ins .amount",
[75] Fix | Delete
),
[76] Fix | Delete
'hide_text_align' => true,
[77] Fix | Delete
'font' => array(
[78] Fix | Delete
'default' => '|700|||||||',
[79] Fix | Delete
),
[80] Fix | Delete
'line_height' => array(
[81] Fix | Delete
'range_settings' => array(
[82] Fix | Delete
'min' => '1',
[83] Fix | Delete
'max' => '100',
[84] Fix | Delete
'step' => '1',
[85] Fix | Delete
),
[86] Fix | Delete
),
[87] Fix | Delete
),
[88] Fix | Delete
'rating' => array(
[89] Fix | Delete
'label' => esc_html__( 'Star Rating', 'et_builder' ),
[90] Fix | Delete
'css' => array(
[91] Fix | Delete
'main' => '%%order_class%% .star-rating',
[92] Fix | Delete
'hover' => '%%order_class%% li.product:hover .star-rating',
[93] Fix | Delete
'color' => '%%order_class%% .star-rating > span:before',
[94] Fix | Delete
'color_hover' => '%%order_class%% li.product:hover .star-rating > span:before',
[95] Fix | Delete
'letter_spacing_hover' => '%%order_class%% li.product:hover .star-rating',
[96] Fix | Delete
'important' => array( 'size' ),
[97] Fix | Delete
),
[98] Fix | Delete
'font_size' => array(
[99] Fix | Delete
'default' => '14px',
[100] Fix | Delete
),
[101] Fix | Delete
'hide_font' => true,
[102] Fix | Delete
'hide_line_height' => true,
[103] Fix | Delete
'hide_text_shadow' => true,
[104] Fix | Delete
'text_align' => array(
[105] Fix | Delete
'label' => esc_html__( 'Star Rating Alignment', 'et_builder' ),
[106] Fix | Delete
),
[107] Fix | Delete
'font_size' => array(
[108] Fix | Delete
'label' => esc_html__( 'Star Rating Size', 'et_builder' ),
[109] Fix | Delete
),
[110] Fix | Delete
'text_color' => array(
[111] Fix | Delete
'label' => esc_html__( 'Star Rating Color', 'et_builder' ),
[112] Fix | Delete
),
[113] Fix | Delete
'toggle_slug' => 'star',
[114] Fix | Delete
),
[115] Fix | Delete
),
[116] Fix | Delete
'borders' => array(
[117] Fix | Delete
'default' => array(),
[118] Fix | Delete
'image' => array(
[119] Fix | Delete
'css' => array(
[120] Fix | Delete
'main' => array(
[121] Fix | Delete
'border_radii' => "{$this->main_css_element} .et_shop_image > img, {$this->main_css_element} .et_shop_image .et_overlay",
[122] Fix | Delete
'border_radii_hover' => "{$this->main_css_element} .et_shop_image > img:hover, {$this->main_css_element} .et_shop_image .et_overlay",
[123] Fix | Delete
'border_styles' => "{$this->main_css_element} .et_shop_image > img",
[124] Fix | Delete
),
[125] Fix | Delete
'important' => 'all',
[126] Fix | Delete
),
[127] Fix | Delete
'label_prefix' => et_builder_i18n( 'Image' ),
[128] Fix | Delete
'tab_slug' => 'advanced',
[129] Fix | Delete
'toggle_slug' => 'image',
[130] Fix | Delete
),
[131] Fix | Delete
),
[132] Fix | Delete
'box_shadow' => array(
[133] Fix | Delete
'default' => array(),
[134] Fix | Delete
'image' => array(
[135] Fix | Delete
'label' => esc_html__( 'Image Box Shadow', 'et_builder' ),
[136] Fix | Delete
'option_category' => 'layout',
[137] Fix | Delete
'tab_slug' => 'advanced',
[138] Fix | Delete
'toggle_slug' => 'image',
[139] Fix | Delete
'css' => array(
[140] Fix | Delete
'main' => '%%order_class%%.et_pb_module .woocommerce .et_shop_image > img, %%order_class%%.et_pb_module .woocommerce .et_overlay',
[141] Fix | Delete
'overlay' => 'inset',
[142] Fix | Delete
'important' => true,
[143] Fix | Delete
),
[144] Fix | Delete
'default_on_fronts' => array(
[145] Fix | Delete
'color' => '',
[146] Fix | Delete
'position' => '',
[147] Fix | Delete
),
[148] Fix | Delete
),
[149] Fix | Delete
),
[150] Fix | Delete
'margin_padding' => array(
[151] Fix | Delete
'css' => array(
[152] Fix | Delete
'main' => '%%order_class%%',
[153] Fix | Delete
'important' => array( 'custom_margin' ), // needed to overwrite last module margin-bottom styling
[154] Fix | Delete
),
[155] Fix | Delete
),
[156] Fix | Delete
'text' => array(
[157] Fix | Delete
'css' => array(
[158] Fix | Delete
'text_shadow' => implode(', ', array(
[159] Fix | Delete
// Title
[160] Fix | Delete
"{$this->main_css_element} .woocommerce ul.products h3",
[161] Fix | Delete
"{$this->main_css_element} .woocommerce ul.products h1",
[162] Fix | Delete
"{$this->main_css_element} .woocommerce ul.products h2",
[163] Fix | Delete
"{$this->main_css_element} .woocommerce ul.products h4",
[164] Fix | Delete
"{$this->main_css_element} .woocommerce ul.products h5",
[165] Fix | Delete
"{$this->main_css_element} .woocommerce ul.products h6",
[166] Fix | Delete
// Price
[167] Fix | Delete
"{$this->main_css_element} .woocommerce ul.products .price",
[168] Fix | Delete
"{$this->main_css_element} .woocommerce ul.products .price .amount"
[169] Fix | Delete
[170] Fix | Delete
) ),
[171] Fix | Delete
),
[172] Fix | Delete
),
[173] Fix | Delete
'filters' => array(
[174] Fix | Delete
'child_filters_target' => array(
[175] Fix | Delete
'tab_slug' => 'advanced',
[176] Fix | Delete
'toggle_slug' => 'image',
[177] Fix | Delete
),
[178] Fix | Delete
),
[179] Fix | Delete
'image' => array(
[180] Fix | Delete
'css' => array(
[181] Fix | Delete
'main' => '%%order_class%% .et_shop_image',
[182] Fix | Delete
),
[183] Fix | Delete
),
[184] Fix | Delete
'scroll_effects' => array(
[185] Fix | Delete
'grid_support' => 'yes',
[186] Fix | Delete
),
[187] Fix | Delete
'button' => false,
[188] Fix | Delete
);
[189] Fix | Delete
[190] Fix | Delete
$this->custom_css_fields = array(
[191] Fix | Delete
'product' => array(
[192] Fix | Delete
'label' => esc_html__( 'Product', 'et_builder' ),
[193] Fix | Delete
'selector' => 'li.product',
[194] Fix | Delete
),
[195] Fix | Delete
'onsale' => array(
[196] Fix | Delete
'label' => esc_html__( 'Onsale', 'et_builder' ),
[197] Fix | Delete
'selector' => 'li.product .onsale',
[198] Fix | Delete
),
[199] Fix | Delete
'image' => array(
[200] Fix | Delete
'label' => et_builder_i18n( 'Image' ),
[201] Fix | Delete
'selector' => '.et_shop_image',
[202] Fix | Delete
),
[203] Fix | Delete
'overlay' => array(
[204] Fix | Delete
'label' => et_builder_i18n( 'Overlay' ),
[205] Fix | Delete
'selector' => '.et_overlay',
[206] Fix | Delete
),
[207] Fix | Delete
'title' => array(
[208] Fix | Delete
'label' => et_builder_i18n( 'Title' ),
[209] Fix | Delete
'selector' => $this->get_title_selector(),
[210] Fix | Delete
),
[211] Fix | Delete
'rating' => array(
[212] Fix | Delete
'label' => esc_html__( 'Rating', 'et_builder' ),
[213] Fix | Delete
'selector' => '.star-rating',
[214] Fix | Delete
),
[215] Fix | Delete
'price' => array(
[216] Fix | Delete
'label' => esc_html__( 'Price', 'et_builder' ),
[217] Fix | Delete
'selector' => 'li.product .price',
[218] Fix | Delete
),
[219] Fix | Delete
'price_old' => array(
[220] Fix | Delete
'label' => esc_html__( 'Old Price', 'et_builder' ),
[221] Fix | Delete
'selector' => 'li.product .price del span.amount',
[222] Fix | Delete
),
[223] Fix | Delete
);
[224] Fix | Delete
[225] Fix | Delete
$this->help_videos = array(
[226] Fix | Delete
array(
[227] Fix | Delete
'id' => 'O5RCEYP-qKI',
[228] Fix | Delete
'name' => esc_html__( 'An introduction to the Shop module', 'et_builder' ),
[229] Fix | Delete
),
[230] Fix | Delete
);
[231] Fix | Delete
}
[232] Fix | Delete
[233] Fix | Delete
function get_fields() {
[234] Fix | Delete
$fields = array(
[235] Fix | Delete
'type' => array(
[236] Fix | Delete
'label' => esc_html__( 'Product View Type', 'et_builder' ),
[237] Fix | Delete
'type' => 'select',
[238] Fix | Delete
'option_category' => 'basic_option',
[239] Fix | Delete
'options' => array(
[240] Fix | Delete
'default' => esc_html__( 'Default (Menu ordering + name)', 'et_builder' ),
[241] Fix | Delete
'latest' => esc_html__( 'Latest Products', 'et_builder' ),
[242] Fix | Delete
'featured' => esc_html__( 'Featured Products', 'et_builder' ),
[243] Fix | Delete
'sale' => esc_html__( 'Sale Products', 'et_builder' ),
[244] Fix | Delete
'best_selling' => esc_html__( 'Best Selling Products', 'et_builder' ),
[245] Fix | Delete
'top_rated' => esc_html__( 'Top Rated Products', 'et_builder' ),
[246] Fix | Delete
'product_category' => esc_html__( 'Product Category', 'et_builder' ),
[247] Fix | Delete
),
[248] Fix | Delete
'default_on_front' => 'default',
[249] Fix | Delete
'affects' => array(
[250] Fix | Delete
'include_categories',
[251] Fix | Delete
),
[252] Fix | Delete
'description' => esc_html__( 'Choose which type of product view you would like to display.', 'et_builder' ),
[253] Fix | Delete
'toggle_slug' => 'main_content',
[254] Fix | Delete
'computed_affects' => array(
[255] Fix | Delete
'__shop',
[256] Fix | Delete
),
[257] Fix | Delete
),
[258] Fix | Delete
'use_current_loop' => array(
[259] Fix | Delete
'label' => esc_html__( 'Use Current Page', 'et_builder' ),
[260] Fix | Delete
'type' => 'yes_no_button',
[261] Fix | Delete
'option_category' => 'configuration',
[262] Fix | Delete
'options' => array(
[263] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[264] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[265] Fix | Delete
),
[266] Fix | Delete
'description' => esc_html__( 'Only include products for the current page. Useful on archive and index pages. For example let\'s say you used this module on a Theme Builder layout that is enabled for product categories. Selecting the "Sale Products" view type above and enabling this option would show only products that are on sale when viewing product categories.', 'et_builder' ),
[267] Fix | Delete
'toggle_slug' => 'main_content',
[268] Fix | Delete
'default' => 'off',
[269] Fix | Delete
'show_if' => array(
[270] Fix | Delete
'function.isTBLayout' => 'on',
[271] Fix | Delete
),
[272] Fix | Delete
'show_if_not' => array(
[273] Fix | Delete
'type' => 'product_category',
[274] Fix | Delete
),
[275] Fix | Delete
'computed_affects' => array(
[276] Fix | Delete
'__shop',
[277] Fix | Delete
),
[278] Fix | Delete
),
[279] Fix | Delete
'posts_number' => array(
[280] Fix | Delete
'default' => '12',
[281] Fix | Delete
'label' => esc_html__( 'Product Count', 'et_builder' ),
[282] Fix | Delete
'type' => 'text',
[283] Fix | Delete
'option_category' => 'configuration',
[284] Fix | Delete
'description' => esc_html__( 'Define the number of products that should be displayed per page.', 'et_builder' ),
[285] Fix | Delete
'computed_affects' => array(
[286] Fix | Delete
'__shop',
[287] Fix | Delete
),
[288] Fix | Delete
'toggle_slug' => 'main_content',
[289] Fix | Delete
),
[290] Fix | Delete
'show_pagination' => array(
[291] Fix | Delete
'label' => esc_html__( 'Show Pagination', 'et_builder' ),
[292] Fix | Delete
'type' => 'yes_no_button',
[293] Fix | Delete
'option_category' => 'configuration',
[294] Fix | Delete
'options' => array(
[295] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[296] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[297] Fix | Delete
),
[298] Fix | Delete
'default' => 'off',
[299] Fix | Delete
'description' => esc_html__( 'Turn pagination on and off.', 'et_builder' ),
[300] Fix | Delete
'computed_affects' => array(
[301] Fix | Delete
'__shop',
[302] Fix | Delete
),
[303] Fix | Delete
'toggle_slug' => 'elements',
[304] Fix | Delete
'mobile_options' => true,
[305] Fix | Delete
'hover' => 'tabs',
[306] Fix | Delete
),
[307] Fix | Delete
'include_categories' => array(
[308] Fix | Delete
'label' => esc_html__( 'Included Categories', 'et_builder' ),
[309] Fix | Delete
'type' => 'categories',
[310] Fix | Delete
'meta_categories' => array(
[311] Fix | Delete
'all' => esc_html__( 'All Categories', 'et_builder' ),
[312] Fix | Delete
'current' => esc_html__( 'Current Category', 'et_builder' ),
[313] Fix | Delete
),
[314] Fix | Delete
'renderer_options' => array(
[315] Fix | Delete
'use_terms' => true,
[316] Fix | Delete
'term_name' => 'product_cat',
[317] Fix | Delete
),
[318] Fix | Delete
'depends_show_if' => 'product_category',
[319] Fix | Delete
'description' => esc_html__( 'Choose which categories you would like to include.', 'et_builder' ),
[320] Fix | Delete
'taxonomy_name' => 'product_cat',
[321] Fix | Delete
'toggle_slug' => 'main_content',
[322] Fix | Delete
'computed_affects' => array(
[323] Fix | Delete
'__shop',
[324] Fix | Delete
),
[325] Fix | Delete
),
[326] Fix | Delete
'columns_number' => array(
[327] Fix | Delete
'label' => esc_html__( 'Column Layout', 'et_builder' ),
[328] Fix | Delete
'type' => 'select',
[329] Fix | Delete
'option_category' => 'layout',
[330] Fix | Delete
'options' => array(
[331] Fix | Delete
'0' => esc_html__( 'default', 'et_builder' ),
[332] Fix | Delete
'6' => sprintf( esc_html__( '%1$s Columns', 'et_builder' ), esc_html( '6' ) ),
[333] Fix | Delete
'5' => sprintf( esc_html__( '%1$s Columns', 'et_builder' ), esc_html( '5' ) ),
[334] Fix | Delete
'4' => sprintf( esc_html__( '%1$s Columns', 'et_builder' ), esc_html( '4' ) ),
[335] Fix | Delete
'3' => sprintf( esc_html__( '%1$s Columns', 'et_builder' ), esc_html( '3' ) ),
[336] Fix | Delete
'2' => sprintf( esc_html__( '%1$s Columns', 'et_builder' ), esc_html( '2' ) ),
[337] Fix | Delete
'1' => esc_html__( '1 Column', 'et_builder' ),
[338] Fix | Delete
),
[339] Fix | Delete
'default_on_front' => '0',
[340] Fix | Delete
'description' => esc_html__( 'Choose how many columns to display.', 'et_builder' ),
[341] Fix | Delete
'computed_affects' => array(
[342] Fix | Delete
'__shop',
[343] Fix | Delete
),
[344] Fix | Delete
'toggle_slug' => 'main_content',
[345] Fix | Delete
),
[346] Fix | Delete
'orderby' => array(
[347] Fix | Delete
'label' => esc_html__( 'Order', 'et_builder' ),
[348] Fix | Delete
'type' => 'select',
[349] Fix | Delete
'option_category' => 'configuration',
[350] Fix | Delete
'options' => array(
[351] Fix | Delete
'default' => esc_html__( 'Default Sorting', 'et_builder' ),
[352] Fix | Delete
'menu_order' => esc_html__( 'Sort by Menu Order', 'et_builder' ),
[353] Fix | Delete
'popularity' => esc_html__( 'Sort By Popularity', 'et_builder' ),
[354] Fix | Delete
'rating' => esc_html__( 'Sort By Rating', 'et_builder' ),
[355] Fix | Delete
'date' => esc_html__( 'Sort By Date: Oldest To Newest', 'et_builder' ),
[356] Fix | Delete
'date-desc' => esc_html__( 'Sort By Date: Newest To Oldest', 'et_builder' ),
[357] Fix | Delete
'price' => esc_html__( 'Sort By Price: Low To High', 'et_builder' ),
[358] Fix | Delete
'price-desc' => esc_html__( 'Sort By Price: High To Low', 'et_builder' ),
[359] Fix | Delete
),
[360] Fix | Delete
'default_on_front' => 'default',
[361] Fix | Delete
'description' => esc_html__( 'Choose how your products should be ordered.', 'et_builder' ),
[362] Fix | Delete
'computed_affects' => array(
[363] Fix | Delete
'__shop',
[364] Fix | Delete
),
[365] Fix | Delete
'toggle_slug' => 'main_content',
[366] Fix | Delete
'show_if_not' => array(
[367] Fix | Delete
'type' => 'latest',
[368] Fix | Delete
),
[369] Fix | Delete
),
[370] Fix | Delete
'sale_badge_color' => array(
[371] Fix | Delete
'label' => esc_html__( 'Sale Badge Color', 'et_builder' ),
[372] Fix | Delete
'description' => esc_html__( 'Pick a color to use for the sales bade that appears on products that are on sale.', 'et_builder' ),
[373] Fix | Delete
'type' => 'color-alpha',
[374] Fix | Delete
'custom_color' => true,
[375] Fix | Delete
'tab_slug' => 'advanced',
[376] Fix | Delete
'toggle_slug' => 'sale_badge',
[377] Fix | Delete
'hover' => 'tabs',
[378] Fix | Delete
'mobile_options' => true,
[379] Fix | Delete
),
[380] Fix | Delete
'icon_hover_color' => array(
[381] Fix | Delete
'label' => esc_html__( 'Overlay Icon Color', 'et_builder' ),
[382] Fix | Delete
'description' => esc_html__( 'Pick a color to use for the icon that appears when hovering over a product.', 'et_builder' ),
[383] Fix | Delete
'type' => 'color-alpha',
[384] Fix | Delete
'custom_color' => true,
[385] Fix | Delete
'tab_slug' => 'advanced',
[386] Fix | Delete
'toggle_slug' => 'overlay',
[387] Fix | Delete
'mobile_options' => true,
[388] Fix | Delete
),
[389] Fix | Delete
'hover_overlay_color' => array(
[390] Fix | Delete
'label' => esc_html__( 'Overlay Background Color', 'et_builder' ),
[391] Fix | Delete
'description' => esc_html__( 'Here you can define a custom color for the overlay', 'et_builder' ),
[392] Fix | Delete
'type' => 'color-alpha',
[393] Fix | Delete
'custom_color' => true,
[394] Fix | Delete
'tab_slug' => 'advanced',
[395] Fix | Delete
'toggle_slug' => 'overlay',
[396] Fix | Delete
'mobile_options' => true,
[397] Fix | Delete
),
[398] Fix | Delete
'hover_icon' => array(
[399] Fix | Delete
'label' => esc_html__( 'Overlay Icon', 'et_builder' ),
[400] Fix | Delete
'description' => esc_html__( 'Here you can define a custom icon for the overlay', 'et_builder' ),
[401] Fix | Delete
'type' => 'select_icon',
[402] Fix | Delete
'option_category' => 'configuration',
[403] Fix | Delete
'class' => array( 'et-pb-font-icon' ),
[404] Fix | Delete
'tab_slug' => 'advanced',
[405] Fix | Delete
'toggle_slug' => 'overlay',
[406] Fix | Delete
'mobile_options' => true,
[407] Fix | Delete
),
[408] Fix | Delete
'__shop' => array(
[409] Fix | Delete
'type' => 'computed',
[410] Fix | Delete
'computed_callback' => array( 'ET_Builder_Module_Shop', 'get_shop_html' ),
[411] Fix | Delete
'computed_depends_on' => array(
[412] Fix | Delete
'type',
[413] Fix | Delete
'include_categories',
[414] Fix | Delete
'posts_number',
[415] Fix | Delete
'orderby',
[416] Fix | Delete
'columns_number',
[417] Fix | Delete
'show_pagination',
[418] Fix | Delete
'__page',
[419] Fix | Delete
'use_current_loop',
[420] Fix | Delete
),
[421] Fix | Delete
'computed_minimum' => array(
[422] Fix | Delete
'posts_number',
[423] Fix | Delete
'show_pagination',
[424] Fix | Delete
'__page',
[425] Fix | Delete
'use_current_loop',
[426] Fix | Delete
),
[427] Fix | Delete
),
[428] Fix | Delete
'__page' => array(
[429] Fix | Delete
'type' => 'computed',
[430] Fix | Delete
'computed_callback' => array( 'ET_Builder_Module_Shop', 'get_shop_html' ),
[431] Fix | Delete
'computed_depends_on' => array(
[432] Fix | Delete
'type',
[433] Fix | Delete
'include_categories',
[434] Fix | Delete
'posts_number',
[435] Fix | Delete
'orderby',
[436] Fix | Delete
'columns_number',
[437] Fix | Delete
'show_pagination',
[438] Fix | Delete
),
[439] Fix | Delete
'computed_affects' => array(
[440] Fix | Delete
'__shop',
[441] Fix | Delete
),
[442] Fix | Delete
),
[443] Fix | Delete
);
[444] Fix | Delete
[445] Fix | Delete
return $fields;
[446] Fix | Delete
}
[447] Fix | Delete
[448] Fix | Delete
/**
[449] Fix | Delete
* @inheritdoc
[450] Fix | Delete
*
[451] Fix | Delete
* @since 4.0.6 Handle star rating letter spacing.
[452] Fix | Delete
*/
[453] Fix | Delete
public function get_transition_fields_css_props() {
[454] Fix | Delete
$fields = parent::get_transition_fields_css_props();
[455] Fix | Delete
[456] Fix | Delete
$fields['sale_badge_color'] = array( 'background-color' => '%%order_class%% span.onsale' );
[457] Fix | Delete
$fields['rating_letter_spacing'] = array(
[458] Fix | Delete
'width' => '%%order_class%% .star-rating',
[459] Fix | Delete
'letter-spacing' => '%%order_class%% .star-rating',
[460] Fix | Delete
);
[461] Fix | Delete
[462] Fix | Delete
$is_hover_enabled = et_builder_is_hover_enabled( 'rating_letter_spacing', $this->props )
[463] Fix | Delete
|| et_builder_is_hover_enabled( 'rating_font_size', $this->props );
[464] Fix | Delete
[465] Fix | Delete
if ( $is_hover_enabled && isset( $fields['rating_text_color'] ) ) {
[466] Fix | Delete
unset( $fields['rating_text_color'] );
[467] Fix | Delete
}
[468] Fix | Delete
[469] Fix | Delete
return $fields;
[470] Fix | Delete
}
[471] Fix | Delete
[472] Fix | Delete
function add_product_class_name( $classes ) {
[473] Fix | Delete
$classes[] = 'product';
[474] Fix | Delete
[475] Fix | Delete
return $classes;
[476] Fix | Delete
}
[477] Fix | Delete
[478] Fix | Delete
function get_shop( $args = array(), $conditional_tags = array(), $current_page = array() ) {
[479] Fix | Delete
foreach ( $args as $arg => $value ) {
[480] Fix | Delete
$this->props[ $arg ] = $value;
[481] Fix | Delete
}
[482] Fix | Delete
[483] Fix | Delete
$post_id = isset( $current_page['id'] ) ? (int) $current_page['id'] : 0;
[484] Fix | Delete
$type = $this->props['type'];
[485] Fix | Delete
$posts_number = $this->props['posts_number'];
[486] Fix | Delete
$orderby = 'default' === $type ? 'id' : $this->props['orderby'];
[487] Fix | Delete
$order = 'default' === $type ? 'DESC' : 'ASC';
[488] Fix | Delete
$columns = $this->props['columns_number'];
[489] Fix | Delete
$pagination = 'on' === $this->prop( 'show_pagination', 'off' );
[490] Fix | Delete
$product_categories = array();
[491] Fix | Delete
$product_tags = array();
[492] Fix | Delete
$use_current_loop = 'on' === $this->prop( 'use_current_loop', 'off' );
[493] Fix | Delete
$use_current_loop = $use_current_loop && ( is_post_type_archive( 'product' ) || is_search() || et_is_product_taxonomy() );
[494] Fix | Delete
$product_attribute = '';
[495] Fix | Delete
$product_terms = array();
[496] Fix | Delete
[497] Fix | Delete
if ( $use_current_loop ) {
[498] Fix | Delete
$this->props['include_categories'] = 'all';
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function