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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../themes/Divi/includes/builder/module/woocomme...
File: Upsells.php
*
[500] Fix | Delete
* @return array
[501] Fix | Delete
*/
[502] Fix | Delete
public static function get_selected_upsell_display_args() {
[503] Fix | Delete
$selected_args = array();
[504] Fix | Delete
$selected_args['posts_per_page'] = et_()->array_get(
[505] Fix | Delete
self::$static_props,
[506] Fix | Delete
'posts_number',
[507] Fix | Delete
''
[508] Fix | Delete
);
[509] Fix | Delete
$selected_args['columns'] = et_()->array_get(
[510] Fix | Delete
self::$static_props,
[511] Fix | Delete
'columns_number',
[512] Fix | Delete
''
[513] Fix | Delete
);
[514] Fix | Delete
$selected_args['orderby'] = et_()->array_get(
[515] Fix | Delete
self::$static_props,
[516] Fix | Delete
'orderby',
[517] Fix | Delete
''
[518] Fix | Delete
);
[519] Fix | Delete
[520] Fix | Delete
// Set default values when parameters are empty.
[521] Fix | Delete
$default = ET_Builder_Module_Helper_Woocommerce_Modules::get_columns_posts_default_value();
[522] Fix | Delete
if ( empty( $selected_args['posts_per_page'] ) ) {
[523] Fix | Delete
$selected_args['posts_per_page'] = $default;
[524] Fix | Delete
}
[525] Fix | Delete
if ( empty( $selected_args['columns'] ) ) {
[526] Fix | Delete
$selected_args['columns'] = $default;
[527] Fix | Delete
}
[528] Fix | Delete
[529] Fix | Delete
$selected_args = array_filter( $selected_args, 'strlen' );
[530] Fix | Delete
[531] Fix | Delete
return $selected_args;
[532] Fix | Delete
}
[533] Fix | Delete
[534] Fix | Delete
/**
[535] Fix | Delete
* Renders the module output.
[536] Fix | Delete
*
[537] Fix | Delete
* @param array $attrs List of attributes.
[538] Fix | Delete
* @param string $content Content being processed.
[539] Fix | Delete
* @param string $render_slug Slug of module that is used for rendering output.
[540] Fix | Delete
*
[541] Fix | Delete
* @return string
[542] Fix | Delete
*/
[543] Fix | Delete
public function render( $attrs, $content = null, $render_slug ) {
[544] Fix | Delete
ET_Builder_Module_Helper_Woocommerce_Modules::process_background_layout_data( $render_slug, $this );
[545] Fix | Delete
ET_Builder_Module_Helper_Woocommerce_Modules::add_star_rating_style(
[546] Fix | Delete
$render_slug,
[547] Fix | Delete
$this->props,
[548] Fix | Delete
'%%order_class%% ul.products li.product .star-rating',
[549] Fix | Delete
'%%order_class%% ul.products li.product:hover .star-rating'
[550] Fix | Delete
);
[551] Fix | Delete
[552] Fix | Delete
$sale_badge_color_hover = $this->get_hover_value( 'sale_badge_color' );
[553] Fix | Delete
$sale_badge_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'sale_badge_color' );
[554] Fix | Delete
$icon_hover_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'icon_hover_color' );
[555] Fix | Delete
$hover_overlay_color_value = et_pb_responsive_options()->get_property_values( $this->props, 'hover_overlay_color' );
[556] Fix | Delete
[557] Fix | Delete
// Sale Badge Color.
[558] Fix | Delete
et_pb_responsive_options()->generate_responsive_css( $sale_badge_color_values, '%%order_class%% span.onsale', 'background-color', $render_slug, ' !important;', 'color' );
[559] Fix | Delete
[560] Fix | Delete
if ( et_builder_is_hover_enabled( 'sale_badge_color', $this->props ) ) {
[561] Fix | Delete
ET_Builder_Element::set_style(
[562] Fix | Delete
$render_slug,
[563] Fix | Delete
array(
[564] Fix | Delete
'selector' => '%%order_class%%:hover span.onsale',
[565] Fix | Delete
'declaration' => sprintf(
[566] Fix | Delete
'background-color: %1$s !important;',
[567] Fix | Delete
esc_html( $sale_badge_color_hover )
[568] Fix | Delete
),
[569] Fix | Delete
)
[570] Fix | Delete
);
[571] Fix | Delete
}
[572] Fix | Delete
[573] Fix | Delete
// Icon Hover Color.
[574] Fix | Delete
et_pb_responsive_options()->generate_responsive_css( $icon_hover_color_values, '%%order_class%% .et_overlay:before', 'color', $render_slug, ' !important;', 'color' );
[575] Fix | Delete
[576] Fix | Delete
// Hover Overlay Color.
[577] Fix | Delete
et_pb_responsive_options()->generate_responsive_css(
[578] Fix | Delete
$hover_overlay_color_value,
[579] Fix | Delete
'%%order_class%% .et_overlay',
[580] Fix | Delete
array(
[581] Fix | Delete
'background-color',
[582] Fix | Delete
'border-color',
[583] Fix | Delete
),
[584] Fix | Delete
$render_slug,
[585] Fix | Delete
' !important;',
[586] Fix | Delete
'color'
[587] Fix | Delete
);
[588] Fix | Delete
[589] Fix | Delete
// Images: Add CSS Filters and Mix Blend Mode rules (if set).
[590] Fix | Delete
if ( array_key_exists( 'image', $this->advanced_fields ) && array_key_exists( 'css', $this->advanced_fields['image'] ) ) {
[591] Fix | Delete
$this->add_classname(
[592] Fix | Delete
$this->generate_css_filters(
[593] Fix | Delete
$render_slug,
[594] Fix | Delete
'child_',
[595] Fix | Delete
self::$data_utils->array_get( $this->advanced_fields['image']['css'], 'main', '%%order_class%%' )
[596] Fix | Delete
)
[597] Fix | Delete
);
[598] Fix | Delete
}
[599] Fix | Delete
[600] Fix | Delete
$this->add_classname( $this->get_text_orientation_classname() );
[601] Fix | Delete
[602] Fix | Delete
$is_shop = function_exists( 'is_shop' ) && is_shop();
[603] Fix | Delete
$is_wc_loop_prop_get_set_exists = function_exists( 'wc_get_loop_prop' ) && function_exists( 'wc_set_loop_prop' );
[604] Fix | Delete
$is_product_category = function_exists( 'is_product_category' ) && is_product_category();
[605] Fix | Delete
[606] Fix | Delete
if ( $is_shop ) {
[607] Fix | Delete
$display_type = ET_Builder_Module_Helper_Woocommerce_Modules::set_display_type_to_render_only_products( 'woocommerce_shop_page_display' );
[608] Fix | Delete
} else if ( is_product_category() ) {
[609] Fix | Delete
$display_type = ET_Builder_Module_Helper_Woocommerce_Modules::set_display_type_to_render_only_products( 'woocommerce_category_archive_display' );
[610] Fix | Delete
}
[611] Fix | Delete
[612] Fix | Delete
// Required to handle Customizer preview pane.
[613] Fix | Delete
// Refer: https://github.com/elegantthemes/Divi/issues/17998#issuecomment-565955422
[614] Fix | Delete
if ( $is_wc_loop_prop_get_set_exists && is_customize_preview() ) {
[615] Fix | Delete
$is_filtered = wc_get_loop_prop( 'is_filtered' );
[616] Fix | Delete
wc_set_loop_prop( 'is_filtered', true );
[617] Fix | Delete
}
[618] Fix | Delete
[619] Fix | Delete
$output = self::get_upsells( $this->props );
[620] Fix | Delete
[621] Fix | Delete
// Required to handle Customizer preview pane.
[622] Fix | Delete
// Refer: https://github.com/elegantthemes/Divi/issues/17998#issuecomment-565955422
[623] Fix | Delete
if ( $is_wc_loop_prop_get_set_exists && is_customize_preview() && isset( $is_filtered ) ) {
[624] Fix | Delete
wc_set_loop_prop( 'is_filtered', $is_filtered );
[625] Fix | Delete
}
[626] Fix | Delete
[627] Fix | Delete
if ( $is_shop && isset( $display_type ) ) {
[628] Fix | Delete
ET_Builder_Module_Helper_Woocommerce_Modules::reset_display_type( 'woocommerce_shop_page_display', $display_type );
[629] Fix | Delete
} else if ( $is_product_category && isset( $display_type ) ) {
[630] Fix | Delete
ET_Builder_Module_Helper_Woocommerce_Modules::reset_display_type( 'woocommerce_category_archive_display', $display_type );
[631] Fix | Delete
}
[632] Fix | Delete
[633] Fix | Delete
// Render empty string if no output is generated to avoid unwanted vertical space.
[634] Fix | Delete
if ( '' === $output ) {
[635] Fix | Delete
return '';
[636] Fix | Delete
}
[637] Fix | Delete
[638] Fix | Delete
add_filter(
[639] Fix | Delete
"et_builder_module_{$render_slug}_outer_wrapper_attrs",
[640] Fix | Delete
array(
[641] Fix | Delete
'ET_Builder_Module_Helper_Woocommerce_Modules',
[642] Fix | Delete
'output_data_icon_attrs',
[643] Fix | Delete
),
[644] Fix | Delete
10,
[645] Fix | Delete
2
[646] Fix | Delete
);
[647] Fix | Delete
[648] Fix | Delete
$output = $this->_render_module_wrapper( $output, $render_slug );
[649] Fix | Delete
[650] Fix | Delete
remove_filter(
[651] Fix | Delete
"et_builder_module_{$render_slug}_outer_wrapper_attrs",
[652] Fix | Delete
array(
[653] Fix | Delete
'ET_Builder_Module_Helper_Woocommerce_Modules',
[654] Fix | Delete
'output_data_icon_attrs',
[655] Fix | Delete
),
[656] Fix | Delete
10
[657] Fix | Delete
);
[658] Fix | Delete
[659] Fix | Delete
return $output;
[660] Fix | Delete
}
[661] Fix | Delete
}
[662] Fix | Delete
[663] Fix | Delete
new ET_Builder_Module_Woocommerce_Upsells();
[664] Fix | Delete
[665] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function