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
File: Menu.php
'min' => '1',
[500] Fix | Delete
'max' => '120',
[501] Fix | Delete
'step' => '1',
[502] Fix | Delete
),
[503] Fix | Delete
'mobile_options' => true,
[504] Fix | Delete
'responsive' => true,
[505] Fix | Delete
'hover' => 'tabs',
[506] Fix | Delete
),
[507] Fix | Delete
'menu_icon_font_size' => array(
[508] Fix | Delete
'label' => esc_html__( 'Hamburger Menu Icon Font Size', 'et_builder' ),
[509] Fix | Delete
'description' => esc_html__( 'Control the size of the icon by increasing or decreasing the font size.', 'et_builder' ),
[510] Fix | Delete
'type' => 'range',
[511] Fix | Delete
'option_category' => 'font_option',
[512] Fix | Delete
'tab_slug' => 'advanced',
[513] Fix | Delete
'toggle_slug' => 'icon_settings',
[514] Fix | Delete
'default' => '32px',
[515] Fix | Delete
'default_unit' => 'px',
[516] Fix | Delete
'default_on_front'=> '',
[517] Fix | Delete
'allowed_units' => et_builder_get_acceptable_css_string_values( 'font-size' ),
[518] Fix | Delete
'range_settings' => array(
[519] Fix | Delete
'min' => '1',
[520] Fix | Delete
'max' => '120',
[521] Fix | Delete
'step' => '1',
[522] Fix | Delete
),
[523] Fix | Delete
'mobile_options' => true,
[524] Fix | Delete
'responsive' => true,
[525] Fix | Delete
'hover' => 'tabs',
[526] Fix | Delete
),
[527] Fix | Delete
);
[528] Fix | Delete
[529] Fix | Delete
return $fields;
[530] Fix | Delete
}
[531] Fix | Delete
[532] Fix | Delete
public function get_transition_fields_css_props() {
[533] Fix | Delete
$menu_slug = self::$menu_slug;
[534] Fix | Delete
$fields = parent::get_transition_fields_css_props();
[535] Fix | Delete
[536] Fix | Delete
$fields['active_link_color'] = array( 'color' => "%%order_class%%.{$menu_slug} ul li.current-menu-item a" );
[537] Fix | Delete
$fields['dropdown_menu_text_color'] = array( 'color' => "%%order_class%%.{$menu_slug} .nav li ul a" );
[538] Fix | Delete
$fields['dropdown_menu_active_link_color'] = array( 'color' => "%%order_class%%.{$menu_slug} .nav li ul li.current-menu-item a" );
[539] Fix | Delete
[540] Fix | Delete
$fields['logo_max_width'] = array( 'max-width' => '%%order_class%% .et_pb_menu_inner_container > .et_pb_menu__logo-wrap .et_pb_menu__logo, %%order_class%% .et_pb_menu__logo-slot' );
[541] Fix | Delete
$fields['logo_max_height'] = array( 'max-height' => '%%order_class%% .et_pb_menu_inner_container > .et_pb_menu__logo-wrap .et_pb_menu__logo img, %%order_class%% .et_pb_menu__logo-slot .et_pb_menu__logo-wrap img' );
[542] Fix | Delete
[543] Fix | Delete
$fields['menu_icon_color'] = array(
[544] Fix | Delete
'color' => '%%order_class%% .mobile_menu_bar:before',
[545] Fix | Delete
);
[546] Fix | Delete
$fields['search_icon_color'] = array(
[547] Fix | Delete
'color' => '%%order_class%% .et_pb_menu__icon.et_pb_menu__search-button, %%order_class%% .et_pb_menu__icon.et_pb_menu__close-search-button',
[548] Fix | Delete
);
[549] Fix | Delete
$fields['cart_icon_color'] = array(
[550] Fix | Delete
'color' => '%%order_class%% .et_pb_menu__icon.et_pb_menu__cart-button',
[551] Fix | Delete
);
[552] Fix | Delete
[553] Fix | Delete
$fields['menu_icon_font_size'] = array(
[554] Fix | Delete
'font-size' => '%%order_class%% .mobile_menu_bar:before',
[555] Fix | Delete
);
[556] Fix | Delete
$fields['search_icon_font_size'] = array(
[557] Fix | Delete
'font-size' => '%%order_class%% .et_pb_menu__icon.et_pb_menu__search-button, %%order_class%% .et_pb_menu__icon.et_pb_menu__close-search-button',
[558] Fix | Delete
);
[559] Fix | Delete
$fields['cart_icon_font_size'] = array(
[560] Fix | Delete
'font-size' => '%%order_class%% .et_pb_menu__icon.et_pb_menu__cart-button',
[561] Fix | Delete
);
[562] Fix | Delete
[563] Fix | Delete
return $fields;
[564] Fix | Delete
}
[565] Fix | Delete
[566] Fix | Delete
/**
[567] Fix | Delete
* Add the class with page ID to menu item so it can be easily found by ID in Frontend Builder
[568] Fix | Delete
*
[569] Fix | Delete
* @return menu item object
[570] Fix | Delete
*/
[571] Fix | Delete
static function modify_fullwidth_menu_item( $menu_item ) {
[572] Fix | Delete
// Since PHP 7.1 silent conversion to array is no longer supported.
[573] Fix | Delete
$menu_item->classes = (array) $menu_item->classes;
[574] Fix | Delete
[575] Fix | Delete
if ( esc_url( home_url( '/' ) ) === $menu_item->url ) {
[576] Fix | Delete
$fw_menu_custom_class = 'et_pb_menu_page_id-home';
[577] Fix | Delete
} else {
[578] Fix | Delete
$fw_menu_custom_class = 'et_pb_menu_page_id-' . $menu_item->object_id;
[579] Fix | Delete
}
[580] Fix | Delete
[581] Fix | Delete
$menu_item->classes[] = $fw_menu_custom_class;
[582] Fix | Delete
return $menu_item;
[583] Fix | Delete
}
[584] Fix | Delete
[585] Fix | Delete
/**
[586] Fix | Delete
* Get menu markup for menu module
[587] Fix | Delete
*
[588] Fix | Delete
* @return string of menu markup
[589] Fix | Delete
*/
[590] Fix | Delete
static function get_fullwidth_menu( $args = array() ) {
[591] Fix | Delete
$is_fullwidth = 'et_pb_fullwidth_menu' === self::$menu_slug;
[592] Fix | Delete
$defaults = array(
[593] Fix | Delete
'submenu_direction' => '',
[594] Fix | Delete
'menu_id' => '',
[595] Fix | Delete
);
[596] Fix | Delete
[597] Fix | Delete
// modify the menu item to include the required data
[598] Fix | Delete
add_filter( 'wp_setup_nav_menu_item', array( 'ET_Builder_Module_Menu', 'modify_fullwidth_menu_item' ) );
[599] Fix | Delete
[600] Fix | Delete
$args = wp_parse_args( $args, $defaults );
[601] Fix | Delete
$menu = '<nav class="et-menu-nav">';
[602] Fix | Delete
$menuClass = 'et-menu nav';
[603] Fix | Delete
[604] Fix | Delete
if ( $is_fullwidth ) {
[605] Fix | Delete
$menu = '<nav class="et-menu-nav fullwidth-menu-nav">';
[606] Fix | Delete
$menuClass = 'et-menu fullwidth-menu nav';
[607] Fix | Delete
}
[608] Fix | Delete
[609] Fix | Delete
// divi_disable_toptier option available in Divi theme only
[610] Fix | Delete
if ( ! et_is_builder_plugin_active() && 'on' === et_get_option( 'divi_disable_toptier' ) ) {
[611] Fix | Delete
$menuClass .= ' et_disable_top_tier';
[612] Fix | Delete
}
[613] Fix | Delete
$menuClass .= ( '' !== $args['submenu_direction'] ? sprintf( ' %s', esc_attr( $args['submenu_direction'] ) ) : '' );
[614] Fix | Delete
[615] Fix | Delete
$menu_args = array(
[616] Fix | Delete
'theme_location' => 'primary-menu',
[617] Fix | Delete
'container' => '',
[618] Fix | Delete
'fallback_cb' => '',
[619] Fix | Delete
'menu_class' => $menuClass,
[620] Fix | Delete
'menu_id' => '',
[621] Fix | Delete
'echo' => false,
[622] Fix | Delete
);
[623] Fix | Delete
[624] Fix | Delete
if ( '' !== $args['menu_id'] ) {
[625] Fix | Delete
$menu_args['menu'] = (int) $args['menu_id'];
[626] Fix | Delete
}
[627] Fix | Delete
[628] Fix | Delete
$filter = $is_fullwidth ? 'et_fullwidth_menu_args' : 'et_menu_args';
[629] Fix | Delete
$primaryNav = wp_nav_menu( apply_filters( $filter, $menu_args ) );
[630] Fix | Delete
[631] Fix | Delete
if ( empty( $primaryNav ) ) {
[632] Fix | Delete
$menu .= sprintf(
[633] Fix | Delete
'<ul class="%1$s">
[634] Fix | Delete
%2$s',
[635] Fix | Delete
esc_attr( $menuClass ),
[636] Fix | Delete
( ! et_is_builder_plugin_active() && 'on' === et_get_option( 'divi_home_link' )
[637] Fix | Delete
? sprintf( '<li%1$s><a href="%2$s">%3$s</a></li>',
[638] Fix | Delete
( is_home() ? ' class="current_page_item"' : '' ),
[639] Fix | Delete
esc_url( home_url( '/' ) ),
[640] Fix | Delete
esc_html__( 'Home', 'et_builder' )
[641] Fix | Delete
)
[642] Fix | Delete
: ''
[643] Fix | Delete
)
[644] Fix | Delete
);
[645] Fix | Delete
[646] Fix | Delete
ob_start();
[647] Fix | Delete
[648] Fix | Delete
// @todo: check if Menu module works fine with no menu selected in settings
[649] Fix | Delete
if ( et_is_builder_plugin_active() ) {
[650] Fix | Delete
wp_page_menu();
[651] Fix | Delete
} else {
[652] Fix | Delete
show_page_menu( $menuClass, false, false );
[653] Fix | Delete
show_categories_menu( $menuClass, false );
[654] Fix | Delete
}
[655] Fix | Delete
[656] Fix | Delete
$menu .= ob_get_contents();
[657] Fix | Delete
[658] Fix | Delete
$menu .= '</ul>';
[659] Fix | Delete
[660] Fix | Delete
ob_end_clean();
[661] Fix | Delete
} else {
[662] Fix | Delete
$menu .= $primaryNav;
[663] Fix | Delete
}
[664] Fix | Delete
[665] Fix | Delete
$menu .= '</nav>';
[666] Fix | Delete
[667] Fix | Delete
remove_filter( 'wp_setup_nav_menu_item', array( 'ET_Builder_Module_Menu', 'modify_fullwidth_menu_item' ) );
[668] Fix | Delete
[669] Fix | Delete
return $menu;
[670] Fix | Delete
}
[671] Fix | Delete
[672] Fix | Delete
/**
[673] Fix | Delete
* Apply logo styles.
[674] Fix | Delete
*
[675] Fix | Delete
* @since 4.0
[676] Fix | Delete
*
[677] Fix | Delete
* @param string $render_slug
[678] Fix | Delete
*
[679] Fix | Delete
* @return void
[680] Fix | Delete
*/
[681] Fix | Delete
protected function apply_logo_styles( $render_slug ) {
[682] Fix | Delete
$max_width_selector = '%%order_class%% .et_pb_menu_inner_container > .et_pb_menu__logo-wrap .et_pb_menu__logo, %%order_class%% .et_pb_menu__logo-slot';
[683] Fix | Delete
$max_width_values = et_pb_responsive_options()->get_property_values( $this->props, 'logo_max_width' );
[684] Fix | Delete
$max_width_hover = $this->get_hover_value( 'logo_max_width' );
[685] Fix | Delete
[686] Fix | Delete
$max_height_selector = '%%order_class%% .et_pb_menu_inner_container > .et_pb_menu__logo-wrap .et_pb_menu__logo img, %%order_class%% .et_pb_menu__logo-slot .et_pb_menu__logo-wrap img';
[687] Fix | Delete
$max_height_values = et_pb_responsive_options()->get_property_values( $this->props, 'logo_max_height' );
[688] Fix | Delete
$max_height_hover = $this->get_hover_value( 'logo_max_height' );
[689] Fix | Delete
[690] Fix | Delete
// Remove default opacity if hover color is enabled for links.
[691] Fix | Delete
if ( et_builder_is_hover_enabled( 'menu_text_color', $this->props ) ) {
[692] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[693] Fix | Delete
'selector' => "{$this->main_css_element} nav > ul > li > a:hover",
[694] Fix | Delete
'declaration' => 'opacity: 1;',
[695] Fix | Delete
) );
[696] Fix | Delete
}
[697] Fix | Delete
[698] Fix | Delete
if ( et_builder_is_hover_enabled( 'dropdown_menu_text_color', $this->props ) ) {
[699] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[700] Fix | Delete
'selector' => "{$this->main_css_element} nav > ul > li li a:hover",
[701] Fix | Delete
'declaration' => 'opacity: 1;',
[702] Fix | Delete
) );
[703] Fix | Delete
}
[704] Fix | Delete
[705] Fix | Delete
if ( et_builder_is_hover_enabled( 'dropdown_menu_active_link_color', $this->props ) ) {
[706] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[707] Fix | Delete
'selector' => "{$this->main_css_element} nav > ul > li li.current-menu-item a:hover",
[708] Fix | Delete
'declaration' => 'opacity: 1;',
[709] Fix | Delete
) );
[710] Fix | Delete
}
[711] Fix | Delete
[712] Fix | Delete
// Max width.
[713] Fix | Delete
et_pb_responsive_options()->generate_responsive_css( $max_width_values, $max_width_selector, 'max-width', $render_slug );
[714] Fix | Delete
[715] Fix | Delete
if ( et_builder_is_hover_enabled( 'logo_max_width', $this->props ) ) {
[716] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[717] Fix | Delete
'selector' => et_pb_hover_options()->add_hover_to_selectors( $max_width_selector ),
[718] Fix | Delete
'declaration' => sprintf(
[719] Fix | Delete
'max-width: %1$s;',
[720] Fix | Delete
esc_html( $max_width_hover )
[721] Fix | Delete
),
[722] Fix | Delete
) );
[723] Fix | Delete
}
[724] Fix | Delete
[725] Fix | Delete
// Max height.
[726] Fix | Delete
et_pb_responsive_options()->generate_responsive_css( $max_height_values, $max_height_selector, 'max-height', $render_slug );
[727] Fix | Delete
[728] Fix | Delete
if ( et_builder_is_hover_enabled( 'logo_max_height', $this->props ) ) {
[729] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[730] Fix | Delete
'selector' => et_pb_hover_options()->add_hover_to_selectors( $max_height_selector ),
[731] Fix | Delete
'declaration' => sprintf(
[732] Fix | Delete
'max-height: %1$s;',
[733] Fix | Delete
esc_html( $max_height_hover )
[734] Fix | Delete
),
[735] Fix | Delete
) );
[736] Fix | Delete
}
[737] Fix | Delete
}
[738] Fix | Delete
[739] Fix | Delete
/**
[740] Fix | Delete
* Determine if icon is disabled.
[741] Fix | Delete
*
[742] Fix | Delete
* @since 4.0
[743] Fix | Delete
*
[744] Fix | Delete
* @param string $icon
[745] Fix | Delete
*
[746] Fix | Delete
* @return boolean
[747] Fix | Delete
*/
[748] Fix | Delete
protected function is_icon_enabled( $icon ) {
[749] Fix | Delete
$icon_show_prop = "show_{$icon}_icon";
[750] Fix | Delete
$values = array_values( et_pb_responsive_options()->get_property_values( $this->props, $icon_show_prop, 'off', true ) );
[751] Fix | Delete
$values[] = $this->get_hover_value( $icon_show_prop );
[752] Fix | Delete
return false !== strpos( join( $values ), 'on' );
[753] Fix | Delete
}
[754] Fix | Delete
[755] Fix | Delete
/**
[756] Fix | Delete
* Apply icon styles.
[757] Fix | Delete
*
[758] Fix | Delete
* @since 4.0
[759] Fix | Delete
*
[760] Fix | Delete
* @param string $render_slug
[761] Fix | Delete
* @param string $icon
[762] Fix | Delete
* @param string $selector
[763] Fix | Delete
*
[764] Fix | Delete
* @return void
[765] Fix | Delete
*/
[766] Fix | Delete
protected function apply_icon_styles( $render_slug, $icon, $selector ) {
[767] Fix | Delete
$font_size_prop = "{$icon}_icon_font_size";
[768] Fix | Delete
$color_prop = "{$icon}_icon_color";
[769] Fix | Delete
[770] Fix | Delete
if ( 'menu' !== $icon && $this->is_icon_enabled( $icon ) ) {
[771] Fix | Delete
$icon_show_prop = "show_{$icon}_icon";
[772] Fix | Delete
[773] Fix | Delete
if ( et_pb_responsive_options()->is_responsive_enabled( $this->props, $icon_show_prop ) ) {
[774] Fix | Delete
$replacements = array(
[775] Fix | Delete
'"off"' => '"none"',
[776] Fix | Delete
'"on"' => '"flex"',
[777] Fix | Delete
);
[778] Fix | Delete
$values = et_pb_responsive_options()->get_property_values( $this->props, $icon_show_prop, 'off', true );
[779] Fix | Delete
$values = json_decode( strtr( json_encode( $values ), $replacements ) );
[780] Fix | Delete
et_pb_responsive_options()->generate_responsive_css( $values, $selector, 'display', $render_slug, '', '' );
[781] Fix | Delete
}
[782] Fix | Delete
[783] Fix | Delete
if ( et_builder_is_hover_enabled( $icon_show_prop, $this->props ) ) {
[784] Fix | Delete
$hover = ( 'on' === $this->get_hover_value( $icon_show_prop ) ) ? 'flex' : 'none';
[785] Fix | Delete
[786] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[787] Fix | Delete
'selector' => str_replace( '%%order_class%%', '%%order_class%%:hover', $selector ),
[788] Fix | Delete
'declaration' => sprintf(
[789] Fix | Delete
'display: %1$s;',
[790] Fix | Delete
esc_html( $hover )
[791] Fix | Delete
),
[792] Fix | Delete
) );
[793] Fix | Delete
}
[794] Fix | Delete
}
[795] Fix | Delete
[796] Fix | Delete
$font_size_values = et_pb_responsive_options()->get_property_values( $this->props, $font_size_prop );
[797] Fix | Delete
$font_size_hover = $this->get_hover_value( $font_size_prop );
[798] Fix | Delete
[799] Fix | Delete
$color_values = et_pb_responsive_options()->get_property_values( $this->props, $color_prop );
[800] Fix | Delete
$color_hover = $this->get_hover_value( $color_prop );
[801] Fix | Delete
[802] Fix | Delete
// Font size.
[803] Fix | Delete
et_pb_responsive_options()->generate_responsive_css( $font_size_values, $selector, 'font-size', $render_slug );
[804] Fix | Delete
[805] Fix | Delete
if ( et_builder_is_hover_enabled( $font_size_prop, $this->props ) ) {
[806] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[807] Fix | Delete
'selector' => et_pb_hover_options()->add_hover_to_selectors( $selector ),
[808] Fix | Delete
'declaration' => sprintf(
[809] Fix | Delete
'font-size: %1$s;',
[810] Fix | Delete
esc_html( $font_size_hover )
[811] Fix | Delete
),
[812] Fix | Delete
) );
[813] Fix | Delete
}
[814] Fix | Delete
[815] Fix | Delete
// Color.
[816] Fix | Delete
et_pb_responsive_options()->generate_responsive_css( $color_values, $selector, 'color', $render_slug, '', 'color' );
[817] Fix | Delete
[818] Fix | Delete
if ( et_builder_is_hover_enabled( $color_prop, $this->props ) ) {
[819] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[820] Fix | Delete
'selector' => et_pb_hover_options()->add_hover_to_selectors( $selector ),
[821] Fix | Delete
'declaration' => sprintf(
[822] Fix | Delete
'color: %1$s;',
[823] Fix | Delete
esc_html( $color_hover )
[824] Fix | Delete
),
[825] Fix | Delete
) );
[826] Fix | Delete
}
[827] Fix | Delete
}
[828] Fix | Delete
[829] Fix | Delete
/**
[830] Fix | Delete
* Render logo.
[831] Fix | Delete
*
[832] Fix | Delete
* @since 4.0
[833] Fix | Delete
*
[834] Fix | Delete
* @return string
[835] Fix | Delete
*/
[836] Fix | Delete
protected function render_logo() {
[837] Fix | Delete
$multi_view = et_pb_multi_view_options( $this );
[838] Fix | Delete
$logo_alt = $this->props['logo_alt'];
[839] Fix | Delete
$logo_url = $this->props['logo_url'];
[840] Fix | Delete
$logo_url_new_window = $this->props['logo_url_new_window'];
[841] Fix | Delete
[842] Fix | Delete
$logo_html = $multi_view->render_element( array(
[843] Fix | Delete
'tag' => 'img',
[844] Fix | Delete
'attrs' => array(
[845] Fix | Delete
'src' => '{{logo}}',
[846] Fix | Delete
'alt' => $logo_alt,
[847] Fix | Delete
),
[848] Fix | Delete
'required' => 'logo',
[849] Fix | Delete
'hover_selector' => '%%order_class%% .et_pb_menu__logo-wrap .et_pb_menu__logo img',
[850] Fix | Delete
) );
[851] Fix | Delete
[852] Fix | Delete
if ( empty( $logo_html ) ) {
[853] Fix | Delete
return '';
[854] Fix | Delete
}
[855] Fix | Delete
[856] Fix | Delete
if ( ! empty( $logo_url ) ) {
[857] Fix | Delete
$target = ( 'on' === $logo_url_new_window ) ? 'target="_blank"' : '';
[858] Fix | Delete
[859] Fix | Delete
$logo_html = sprintf(
[860] Fix | Delete
'<a href="%1$s" %2$s>%3$s</a>',
[861] Fix | Delete
esc_url( $logo_url ),
[862] Fix | Delete
et_core_intentionally_unescaped( $target, 'fixed_string' ),
[863] Fix | Delete
et_core_esc_previously( $logo_html )
[864] Fix | Delete
);
[865] Fix | Delete
}
[866] Fix | Delete
[867] Fix | Delete
$logo_html = sprintf(
[868] Fix | Delete
'<div class="et_pb_menu__logo-wrap">
[869] Fix | Delete
<div class="et_pb_menu__logo">
[870] Fix | Delete
%1$s
[871] Fix | Delete
</div>
[872] Fix | Delete
</div>',
[873] Fix | Delete
$logo_html
[874] Fix | Delete
);
[875] Fix | Delete
[876] Fix | Delete
return $logo_html;
[877] Fix | Delete
}
[878] Fix | Delete
[879] Fix | Delete
/**
[880] Fix | Delete
* Render cart button.
[881] Fix | Delete
*
[882] Fix | Delete
* @since 4.0
[883] Fix | Delete
*
[884] Fix | Delete
* @return string
[885] Fix | Delete
*/
[886] Fix | Delete
protected function render_cart() {
[887] Fix | Delete
if ( ! $this->is_icon_enabled( 'cart' ) ) {
[888] Fix | Delete
return '';
[889] Fix | Delete
}
[890] Fix | Delete
[891] Fix | Delete
if ( ! class_exists( 'woocommerce' ) || ! WC()->cart ) {
[892] Fix | Delete
return '';
[893] Fix | Delete
}
[894] Fix | Delete
[895] Fix | Delete
$url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : WC()->cart->get_cart_url();
[896] Fix | Delete
$output = sprintf(
[897] Fix | Delete
'<a href="%1$s" class="et_pb_menu__icon et_pb_menu__cart-button"></a>',
[898] Fix | Delete
esc_url( $url )
[899] Fix | Delete
);
[900] Fix | Delete
[901] Fix | Delete
/**
[902] Fix | Delete
* Filter the cart icon output.
[903] Fix | Delete
*
[904] Fix | Delete
* @since 4.0.6
[905] Fix | Delete
*
[906] Fix | Delete
* @param string $output
[907] Fix | Delete
* @param string $menu_slug
[908] Fix | Delete
*
[909] Fix | Delete
* @return string
[910] Fix | Delete
*/
[911] Fix | Delete
return apply_filters( 'et_pb_menu_module_cart_output', $output, self::$menu_slug );
[912] Fix | Delete
}
[913] Fix | Delete
[914] Fix | Delete
/**
[915] Fix | Delete
* Render search button.
[916] Fix | Delete
*
[917] Fix | Delete
* @since 4.0
[918] Fix | Delete
*
[919] Fix | Delete
* @return string
[920] Fix | Delete
*/
[921] Fix | Delete
protected function render_search() {
[922] Fix | Delete
if ( ! $this->is_icon_enabled( 'search' ) ) {
[923] Fix | Delete
return '';
[924] Fix | Delete
}
[925] Fix | Delete
[926] Fix | Delete
return '<button type="button" class="et_pb_menu__icon et_pb_menu__search-button"></button>';
[927] Fix | Delete
}
[928] Fix | Delete
[929] Fix | Delete
/**
[930] Fix | Delete
* Render search form.
[931] Fix | Delete
*
[932] Fix | Delete
* @since 4.0
[933] Fix | Delete
*
[934] Fix | Delete
* @return string
[935] Fix | Delete
*/
[936] Fix | Delete
protected function render_search_form() {
[937] Fix | Delete
if ( ! $this->is_icon_enabled( 'search' ) ) {
[938] Fix | Delete
return '';
[939] Fix | Delete
}
[940] Fix | Delete
[941] Fix | Delete
return sprintf(
[942] Fix | Delete
'<div class="et_pb_menu__search-container et_pb_menu__search-container--disabled">
[943] Fix | Delete
<div class="et_pb_menu__search">
[944] Fix | Delete
<form role="search" method="get" class="et_pb_menu__search-form" action="%1$s">
[945] Fix | Delete
<input type="search" class="et_pb_menu__search-input" placeholder="%2$s" name="s" title="%3$s" />
[946] Fix | Delete
</form>
[947] Fix | Delete
<button type="button" class="et_pb_menu__icon et_pb_menu__close-search-button"></button>
[948] Fix | Delete
</div>
[949] Fix | Delete
</div>',
[950] Fix | Delete
esc_url( home_url( '/' ) ),
[951] Fix | Delete
esc_attr__( 'Search &hellip;', 'et_builder' ),
[952] Fix | Delete
esc_attr__( 'Search for:', 'et_builder' )
[953] Fix | Delete
);
[954] Fix | Delete
}
[955] Fix | Delete
[956] Fix | Delete
function render( $attrs, $content = null, $render_slug ) {
[957] Fix | Delete
$menu_slug = self::$menu_slug;
[958] Fix | Delete
$background_color = $this->props['background_color'];
[959] Fix | Delete
$menu_id = $this->props['menu_id'];
[960] Fix | Delete
$submenu_direction = $this->props['submenu_direction'];
[961] Fix | Delete
$menu_style = $this->props['menu_style'];
[962] Fix | Delete
[963] Fix | Delete
$dropdown_menu_bg_color = $this->props['dropdown_menu_bg_color'];
[964] Fix | Delete
$dropdown_menu_bg_color_hover = $this->get_hover_value( 'dropdown_menu_bg_color' );
[965] Fix | Delete
[966] Fix | Delete
$dropdown_menu_text_color = $this->props['dropdown_menu_text_color'];
[967] Fix | Delete
$dropdown_menu_text_color_hover = $this->get_hover_value( 'dropdown_menu_text_color' );
[968] Fix | Delete
[969] Fix | Delete
$dropdown_menu_active_link_color = et_()->array_get( $this->props, 'dropdown_menu_active_link_color', '' );
[970] Fix | Delete
$dropdown_menu_active_link_color_hover = $this->get_hover_value( 'dropdown_menu_active_link_color' );
[971] Fix | Delete
[972] Fix | Delete
$dropdown_menu_animation = $this->props['dropdown_menu_animation'];
[973] Fix | Delete
$active_link_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'active_link_color' );
[974] Fix | Delete
$active_link_color_hover = $this->get_hover_value( 'active_link_color' );
[975] Fix | Delete
$dropdown_menu_line_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'dropdown_menu_line_color' );
[976] Fix | Delete
$dropdown_menu_line_color_hover = $this->get_hover_value( 'dropdown_menu_line_color' );
[977] Fix | Delete
$mobile_menu_text_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'mobile_menu_text_color' );
[978] Fix | Delete
$mobile_menu_text_color_hover = $this->get_hover_value( 'mobile_menu_text_color' );
[979] Fix | Delete
[980] Fix | Delete
$background_layout = $this->props['background_layout'];
[981] Fix | Delete
$background_layout_hover = et_pb_hover_options()->get_value( 'background_layout', $this->props, 'light' );
[982] Fix | Delete
$background_layout_hover_enabled = et_pb_hover_options()->is_enabled( 'background_layout', $this->props );
[983] Fix | Delete
$background_layout_values = et_pb_responsive_options()->get_property_values( $this->props, 'background_layout' );
[984] Fix | Delete
$background_layout_tablet = isset( $background_layout_values['tablet'] ) ? $background_layout_values['tablet'] : '';
[985] Fix | Delete
$background_layout_phone = isset( $background_layout_values['phone'] ) ? $background_layout_values['phone'] : '';
[986] Fix | Delete
[987] Fix | Delete
$mobile_menu_bg_color = $this->props['mobile_menu_bg_color'];
[988] Fix | Delete
$mobile_menu_bg_color_hover = $this->get_hover_value( 'mobile_menu_bg_color' );
[989] Fix | Delete
$mobile_menu_bg_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'mobile_menu_bg_color' );
[990] Fix | Delete
$mobile_menu_bg_color_tablet = isset( $mobile_menu_bg_color_values['tablet'] ) ? $mobile_menu_bg_color_values['tablet'] : '';
[991] Fix | Delete
$mobile_menu_bg_color_phone = isset( $mobile_menu_bg_color_values['phone'] ) ? $mobile_menu_bg_color_values['phone'] : '';
[992] Fix | Delete
[993] Fix | Delete
$style = '';
[994] Fix | Delete
[995] Fix | Delete
$video_background = $this->video_background();
[996] Fix | Delete
$parallax_image_background = $this->get_parallax_image_background();
[997] Fix | Delete
[998] Fix | Delete
$menu = self::get_fullwidth_menu( array(
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function