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: SocialMediaFollowItem.php
<?php
[0] Fix | Delete
[1] Fix | Delete
class ET_Builder_Module_Social_Media_Follow_Item extends ET_Builder_Module {
[2] Fix | Delete
function init() {
[3] Fix | Delete
$this->name = esc_html__( 'Social Network', 'et_builder' );
[4] Fix | Delete
$this->plural = esc_html__( 'Social Networks', 'et_builder' );
[5] Fix | Delete
$this->slug = 'et_pb_social_media_follow_network';
[6] Fix | Delete
$this->vb_support = 'on';
[7] Fix | Delete
$this->type = 'child';
[8] Fix | Delete
$this->child_title_var = 'content';
[9] Fix | Delete
[10] Fix | Delete
$this->settings_modal_toggles = array(
[11] Fix | Delete
'general' => array(
[12] Fix | Delete
'toggles' => array(
[13] Fix | Delete
'main_content' => esc_html__( 'Network', 'et_builder' ),
[14] Fix | Delete
'link' => et_builder_i18n( 'Link' ),
[15] Fix | Delete
),
[16] Fix | Delete
),
[17] Fix | Delete
'advanced' => array(
[18] Fix | Delete
'toggles' => array(
[19] Fix | Delete
'icon' => esc_html__( 'Icon', 'et_builder' ),
[20] Fix | Delete
),
[21] Fix | Delete
),
[22] Fix | Delete
);
[23] Fix | Delete
[24] Fix | Delete
$this->advanced_setting_title_text = esc_html__( 'New Social Network', 'et_builder' );
[25] Fix | Delete
$this->settings_text = esc_html__( 'Social Network Settings', 'et_builder' );
[26] Fix | Delete
[27] Fix | Delete
$this->custom_css_fields = array(
[28] Fix | Delete
'before' => array(
[29] Fix | Delete
'label' => et_builder_i18n( 'Before' ),
[30] Fix | Delete
'selector' => '.et_pb_social_media_follow li%%order_class%%:before',
[31] Fix | Delete
),
[32] Fix | Delete
'main_element' => array(
[33] Fix | Delete
'label' => et_builder_i18n( 'Main Element' ),
[34] Fix | Delete
'selector' => '.et_pb_social_media_follow li%%order_class%%',
[35] Fix | Delete
),
[36] Fix | Delete
'after' => array(
[37] Fix | Delete
'label' => et_builder_i18n( 'After' ),
[38] Fix | Delete
'selector' => '.et_pb_social_media_follow li%%order_class%%:after',
[39] Fix | Delete
),
[40] Fix | Delete
'social_icon' => array(
[41] Fix | Delete
'label' => esc_html__( 'Social Icon', 'et_builder' ),
[42] Fix | Delete
'selector' => '.et_pb_social_network_link a.icon',
[43] Fix | Delete
'no_space_before_selector' => true,
[44] Fix | Delete
),
[45] Fix | Delete
'follow_button' => array(
[46] Fix | Delete
'label' => esc_html__( 'Follow Button', 'et_builder' ),
[47] Fix | Delete
'selector' => '.et_pb_social_network_link a.follow_button',
[48] Fix | Delete
'no_space_before_selector' => true,
[49] Fix | Delete
),
[50] Fix | Delete
);
[51] Fix | Delete
[52] Fix | Delete
$this->advanced_fields = array(
[53] Fix | Delete
'background' => array(
[54] Fix | Delete
'css' => array(
[55] Fix | Delete
'main' => '%%order_class%% a.icon',
[56] Fix | Delete
'important' => 'all',
[57] Fix | Delete
),
[58] Fix | Delete
),
[59] Fix | Delete
'borders' => array(
[60] Fix | Delete
'default' => array(
[61] Fix | Delete
'css' => array(
[62] Fix | Delete
'main' => array(
[63] Fix | Delete
'border_radii' => "%%order_class%%.et_pb_social_icon a.icon",
[64] Fix | Delete
'border_styles' => "%%order_class%%.et_pb_social_icon a.icon",
[65] Fix | Delete
),
[66] Fix | Delete
),
[67] Fix | Delete
'defaults' => array(
[68] Fix | Delete
'border_radii' => 'on|3px|3px|3px|3px',
[69] Fix | Delete
'border_styles' => array(
[70] Fix | Delete
'width' => '0px',
[71] Fix | Delete
'color' => '#333333',
[72] Fix | Delete
'style' => 'solid',
[73] Fix | Delete
),
[74] Fix | Delete
),
[75] Fix | Delete
),
[76] Fix | Delete
),
[77] Fix | Delete
'box_shadow' => array(
[78] Fix | Delete
'default' => array(
[79] Fix | Delete
'css' => array(
[80] Fix | Delete
'main' => '%%order_class%% a',
[81] Fix | Delete
'important' => true,
[82] Fix | Delete
),
[83] Fix | Delete
),
[84] Fix | Delete
),
[85] Fix | Delete
'margin_padding' => array(
[86] Fix | Delete
'css' => array(
[87] Fix | Delete
'padding' => '.et_pb_social_media_follow li%%order_class%% a',
[88] Fix | Delete
'main' => '%%order_class%%',
[89] Fix | Delete
'important' => array( 'custom_margin' ), // needed to overwrite last module margin-bottom styling
[90] Fix | Delete
),
[91] Fix | Delete
),
[92] Fix | Delete
'fonts' => false,
[93] Fix | Delete
'text' => false,
[94] Fix | Delete
'max_width' => false,
[95] Fix | Delete
'height' => false,
[96] Fix | Delete
'button' => array(
[97] Fix | Delete
'button' => array(
[98] Fix | Delete
'label' => esc_html__( 'Follow Button', 'et_builder' ),
[99] Fix | Delete
'css' => array(
[100] Fix | Delete
'main' => ".et_pb_social_media_follow li%%order_class%% .follow_button",
[101] Fix | Delete
),
[102] Fix | Delete
'hide_icon' => true,
[103] Fix | Delete
'hide_custom_padding' => true,
[104] Fix | Delete
'no_rel_attr' => true,
[105] Fix | Delete
'text_size' => array(
[106] Fix | Delete
'default' => '14px',
[107] Fix | Delete
),
[108] Fix | Delete
'border_width' => array(
[109] Fix | Delete
'default' => '0px',
[110] Fix | Delete
),
[111] Fix | Delete
'box_shadow' => array(
[112] Fix | Delete
'css' => array(
[113] Fix | Delete
'main' => ".et_pb_social_media_follow li%%order_class%% .follow_button",
[114] Fix | Delete
),
[115] Fix | Delete
),
[116] Fix | Delete
),
[117] Fix | Delete
),
[118] Fix | Delete
'link_options' => false,
[119] Fix | Delete
);
[120] Fix | Delete
}
[121] Fix | Delete
[122] Fix | Delete
function get_fields() {
[123] Fix | Delete
$fields = array(
[124] Fix | Delete
'social_network' => array(
[125] Fix | Delete
'label' => esc_html__( 'Social Network', 'et_builder' ),
[126] Fix | Delete
'type' => 'select',
[127] Fix | Delete
'option_category' => 'basic_option',
[128] Fix | Delete
'class' => 'et-pb-social-network',
[129] Fix | Delete
'options' => array(
[130] Fix | Delete
'' => esc_html__( 'Select a Network', 'et_builder' ),
[131] Fix | Delete
'facebook' => array(
[132] Fix | Delete
'value' => esc_html__( 'Facebook', 'et_builder' ),
[133] Fix | Delete
'data' => array( 'color' => '#3b5998' ),
[134] Fix | Delete
),
[135] Fix | Delete
'twitter' => array(
[136] Fix | Delete
'value' => esc_html__( 'Twitter', 'et_builder' ),
[137] Fix | Delete
'data' => array( 'color' => '#00aced' ),
[138] Fix | Delete
),
[139] Fix | Delete
'google-plus' => array(
[140] Fix | Delete
'value' => esc_html__( 'Google+', 'et_builder' ),
[141] Fix | Delete
'data' => array( 'color' => '#dd4b39' ),
[142] Fix | Delete
),
[143] Fix | Delete
'pinterest' => array(
[144] Fix | Delete
'value' => esc_html__( 'Pinterest', 'et_builder' ),
[145] Fix | Delete
'data' => array( 'color' => '#cb2027' ),
[146] Fix | Delete
),
[147] Fix | Delete
'linkedin' => array(
[148] Fix | Delete
'value' => esc_html__( 'LinkedIn', 'et_builder' ),
[149] Fix | Delete
'data' => array( 'color' => '#007bb6' ),
[150] Fix | Delete
),
[151] Fix | Delete
'tumblr' => array(
[152] Fix | Delete
'value' => esc_html__( 'tumblr', 'et_builder' ),
[153] Fix | Delete
'data' => array( 'color' => '#32506d' ),
[154] Fix | Delete
),
[155] Fix | Delete
'instagram' => array(
[156] Fix | Delete
'value' => esc_html__( 'Instagram', 'et_builder' ),
[157] Fix | Delete
'data' => array( 'color' => '#ea2c59' ),
[158] Fix | Delete
),
[159] Fix | Delete
'skype' => array(
[160] Fix | Delete
'value' => esc_html__( 'skype', 'et_builder' ),
[161] Fix | Delete
'data' => array( 'color' => '#12A5F4' ),
[162] Fix | Delete
),
[163] Fix | Delete
'flikr' => array(
[164] Fix | Delete
'value' => esc_html__( 'Flickr', 'et_builder' ),
[165] Fix | Delete
'data' => array( 'color' => '#ff0084' ),
[166] Fix | Delete
),
[167] Fix | Delete
'myspace' => array(
[168] Fix | Delete
'value' => esc_html__( 'MySpace', 'et_builder' ),
[169] Fix | Delete
'data' => array( 'color' => '#3b5998' ),
[170] Fix | Delete
),
[171] Fix | Delete
'dribbble' => array(
[172] Fix | Delete
'value' => esc_html__( 'dribbble', 'et_builder' ),
[173] Fix | Delete
'data' => array( 'color' => '#ea4c8d' ),
[174] Fix | Delete
),
[175] Fix | Delete
'youtube' => array(
[176] Fix | Delete
'value' => esc_html__( 'Youtube', 'et_builder' ),
[177] Fix | Delete
'data' => array( 'color' => '#a82400' ),
[178] Fix | Delete
),
[179] Fix | Delete
'vimeo' => array(
[180] Fix | Delete
'value' => esc_html__( 'Vimeo', 'et_builder' ),
[181] Fix | Delete
'data' => array( 'color' => '#45bbff' ),
[182] Fix | Delete
),
[183] Fix | Delete
'rss' => array(
[184] Fix | Delete
'value' => esc_html__( 'RSS', 'et_builder' ),
[185] Fix | Delete
'data' => array( 'color' => '#ff8a3c' ),
[186] Fix | Delete
),
[187] Fix | Delete
),
[188] Fix | Delete
'affects' => array(
[189] Fix | Delete
'url',
[190] Fix | Delete
'skype_url',
[191] Fix | Delete
'skype_action',
[192] Fix | Delete
),
[193] Fix | Delete
'overwrite_onchange' => array(
[194] Fix | Delete
'background_color'
[195] Fix | Delete
),
[196] Fix | Delete
'description' => esc_html__( 'Choose the social network', 'et_builder' ),
[197] Fix | Delete
'toggle_slug' => 'main_content',
[198] Fix | Delete
),
[199] Fix | Delete
'content' => array(
[200] Fix | Delete
'label' => et_builder_i18n( 'Body' ),
[201] Fix | Delete
'type' => 'hidden',
[202] Fix | Delete
'toggle_slug' => 'main_content',
[203] Fix | Delete
),
[204] Fix | Delete
'url' => array(
[205] Fix | Delete
'label' => esc_html__( 'Account Link URL', 'et_builder' ),
[206] Fix | Delete
'type' => 'text',
[207] Fix | Delete
'option_category' => 'basic_option',
[208] Fix | Delete
'description' => esc_html__( 'The URL for this social network link.', 'et_builder' ),
[209] Fix | Delete
'depends_show_if_not' => 'skype',
[210] Fix | Delete
'depends_on' => array(
[211] Fix | Delete
'social_network'
[212] Fix | Delete
),
[213] Fix | Delete
'toggle_slug' => 'link',
[214] Fix | Delete
'default_on_front' => '#',
[215] Fix | Delete
'dynamic_content' => 'url',
[216] Fix | Delete
),
[217] Fix | Delete
'skype_url' => array(
[218] Fix | Delete
'label' => esc_html__( 'Account Name', 'et_builder' ),
[219] Fix | Delete
'type' => 'text',
[220] Fix | Delete
'option_category' => 'basic_option',
[221] Fix | Delete
'description' => esc_html__( 'The Skype account name.', 'et_builder' ),
[222] Fix | Delete
'depends_show_if' => 'skype',
[223] Fix | Delete
'depends_on' => array(
[224] Fix | Delete
'social_network'
[225] Fix | Delete
),
[226] Fix | Delete
'toggle_slug' => 'main_content',
[227] Fix | Delete
),
[228] Fix | Delete
'skype_action' => array(
[229] Fix | Delete
'label' => esc_html__( 'Skype Button Action', 'et_builder' ),
[230] Fix | Delete
'type' => 'select',
[231] Fix | Delete
'option_category' => 'basic_option',
[232] Fix | Delete
'options' => array(
[233] Fix | Delete
'call' => esc_html__( 'Call', 'et_builder' ),
[234] Fix | Delete
'chat' => esc_html__( 'Chat', 'et_builder' ),
[235] Fix | Delete
),
[236] Fix | Delete
'depends_show_if' => 'skype',
[237] Fix | Delete
'depends_on' => array(
[238] Fix | Delete
'social_network'
[239] Fix | Delete
),
[240] Fix | Delete
'description' => esc_html__( 'Here you can choose which action to execute on button click', 'et_builder' ),
[241] Fix | Delete
'toggle_slug' => 'main_content',
[242] Fix | Delete
'default_on_front' => 'call',
[243] Fix | Delete
),
[244] Fix | Delete
'icon_color' => array(
[245] Fix | Delete
'label' => esc_html__( 'Icon Color', 'et_builder' ),
[246] Fix | Delete
'description' => esc_html__( 'Here you can define a custom color for the social network icon.', 'et_builder' ),
[247] Fix | Delete
'type' => 'color-alpha',
[248] Fix | Delete
'custom_color' => true,
[249] Fix | Delete
'tab_slug' => 'advanced',
[250] Fix | Delete
'toggle_slug' => 'icon',
[251] Fix | Delete
'hover' => 'tabs',
[252] Fix | Delete
'mobile_options' => true,
[253] Fix | Delete
),
[254] Fix | Delete
'use_icon_font_size' => array(
[255] Fix | Delete
'label' => esc_html__( 'Use Custom Icon Size', 'et_builder' ),
[256] Fix | Delete
'description' => esc_html__( 'If you would like to control the size of the icon, you must first enable this option.', 'et_builder' ),
[257] Fix | Delete
'type' => 'yes_no_button',
[258] Fix | Delete
'options' => array(
[259] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[260] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[261] Fix | Delete
),
[262] Fix | Delete
'default_on_front' => 'off',
[263] Fix | Delete
'affects' => array(
[264] Fix | Delete
'icon_font_size',
[265] Fix | Delete
),
[266] Fix | Delete
'depends_show_if' => 'on',
[267] Fix | Delete
'tab_slug' => 'advanced',
[268] Fix | Delete
'toggle_slug' => 'icon',
[269] Fix | Delete
'option_category' => 'font_option',
[270] Fix | Delete
),
[271] Fix | Delete
'icon_font_size' => array(
[272] Fix | Delete
'label' => esc_html__( 'Icon Font Size', 'et_builder' ),
[273] Fix | Delete
'description' => esc_html__( 'Control the size of the icon by increasing or decreasing the font size.', 'et_builder' ),
[274] Fix | Delete
'type' => 'range',
[275] Fix | Delete
'option_category' => 'font_option',
[276] Fix | Delete
'tab_slug' => 'advanced',
[277] Fix | Delete
'toggle_slug' => 'icon',
[278] Fix | Delete
'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
[279] Fix | Delete
'default' => '16px',
[280] Fix | Delete
'default_unit' => 'px',
[281] Fix | Delete
'default_on_front' => '',
[282] Fix | Delete
'range_settings' => array(
[283] Fix | Delete
'min' => '1',
[284] Fix | Delete
'max' => '120',
[285] Fix | Delete
'step' => '1',
[286] Fix | Delete
),
[287] Fix | Delete
'mobile_options' => true,
[288] Fix | Delete
'depends_show_if' => 'on',
[289] Fix | Delete
'responsive' => true,
[290] Fix | Delete
'hover' => 'tabs',
[291] Fix | Delete
),
[292] Fix | Delete
);
[293] Fix | Delete
[294] Fix | Delete
// Automatically parse social_network's option as value_overwrite
[295] Fix | Delete
foreach ( $fields['social_network']['options'] as $value_overwrite_key => $value_overwrite ) {
[296] Fix | Delete
if ( is_array( $value_overwrite ) && isset( $value_overwrite['data'] ) && $value_overwrite['data']['color'] ) {
[297] Fix | Delete
$fields['social_network']['value_overwrite'][ $value_overwrite_key ] = $value_overwrite['data']['color'];
[298] Fix | Delete
}
[299] Fix | Delete
}
[300] Fix | Delete
[301] Fix | Delete
return $fields;
[302] Fix | Delete
}
[303] Fix | Delete
[304] Fix | Delete
public function get_transition_fields_css_props() {
[305] Fix | Delete
$fields = parent::get_transition_fields_css_props();
[306] Fix | Delete
[307] Fix | Delete
$fields['icon_color'] = array( 'color' => '.et_pb_social_media_follow %%order_class%% .icon:before' );
[308] Fix | Delete
$fields['icon_font_size'] = array(
[309] Fix | Delete
'font-size' => '.et_pb_social_media_follow %%order_class%% .icon:before',
[310] Fix | Delete
'line-height' => '.et_pb_social_media_follow %%order_class%% .icon:before',
[311] Fix | Delete
'height' => '.et_pb_social_media_follow %%order_class%% .icon:before',
[312] Fix | Delete
'width' => '.et_pb_social_media_follow %%order_class%% .icon:before',
[313] Fix | Delete
'height' => '.et_pb_social_media_follow %%order_class%% .icon',
[314] Fix | Delete
'width' => '.et_pb_social_media_follow %%order_class%% .icon',
[315] Fix | Delete
);
[316] Fix | Delete
[317] Fix | Delete
return $fields;
[318] Fix | Delete
}
[319] Fix | Delete
[320] Fix | Delete
function get_network_name( $network ) {
[321] Fix | Delete
$all_fields = $this->get_fields();
[322] Fix | Delete
$network_names_mapping = $all_fields['social_network']['options'];
[323] Fix | Delete
[324] Fix | Delete
if ( isset( $network_names_mapping[ $network ] ) && isset( $network_names_mapping[ $network ]['value'] ) ) {
[325] Fix | Delete
return $network_names_mapping[ $network ]['value'];
[326] Fix | Delete
}
[327] Fix | Delete
[328] Fix | Delete
return $network;
[329] Fix | Delete
}
[330] Fix | Delete
[331] Fix | Delete
function render( $attrs, $content = null, $render_slug ) {
[332] Fix | Delete
global $et_pb_social_media_follow_link;
[333] Fix | Delete
[334] Fix | Delete
$multi_view = et_pb_multi_view_options( $this );
[335] Fix | Delete
$multi_view->set_custom_prop( 'follow_button', $et_pb_social_media_follow_link['follow_button'] );
[336] Fix | Delete
[337] Fix | Delete
$social_network = $this->props['social_network'];
[338] Fix | Delete
$url = $this->props['url'];
[339] Fix | Delete
$skype_url = $this->props['skype_url'];
[340] Fix | Delete
$skype_action = $this->props['skype_action'];
[341] Fix | Delete
$custom_padding = $this->props['custom_padding'];
[342] Fix | Delete
$custom_padding_tablet = $this->props['custom_padding_tablet'];
[343] Fix | Delete
$custom_padding_phone = $this->props['custom_padding_phone'];
[344] Fix | Delete
$follow_button = '';
[345] Fix | Delete
$is_skype = false;
[346] Fix | Delete
$network_name = esc_attr( $this->get_network_name( trim( wp_strip_all_tags( $content ) ) ) );
[347] Fix | Delete
$use_icon_font_size = $this->props['use_icon_font_size'];
[348] Fix | Delete
$icon_color_hover = $this->get_hover_value('icon_color');
[349] Fix | Delete
$icon_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'icon_color' );
[350] Fix | Delete
$icon_font_size_hover = $this->get_hover_value( 'icon_font_size' );
[351] Fix | Delete
$icon_font_size_values = et_pb_responsive_options()->get_property_values( $this->props, 'icon_font_size' );
[352] Fix | Delete
[353] Fix | Delete
if ( 'skype' === $social_network ) {
[354] Fix | Delete
$skype_url = sprintf(
[355] Fix | Delete
'skype:%1$s?%2$s',
[356] Fix | Delete
sanitize_text_field( $skype_url ),
[357] Fix | Delete
sanitize_text_field( $skype_action )
[358] Fix | Delete
);
[359] Fix | Delete
$is_skype = true;
[360] Fix | Delete
}
[361] Fix | Delete
[362] Fix | Delete
if ( $multi_view->has_value( 'follow_button', 'on' ) ) {
[363] Fix | Delete
$follow_button_multi_view_attr = $multi_view->render_attrs( array(
[364] Fix | Delete
'visibility' => array(
[365] Fix | Delete
'follow_button' => 'on',
[366] Fix | Delete
),
[367] Fix | Delete
) );
[368] Fix | Delete
[369] Fix | Delete
$follow_button = sprintf(
[370] Fix | Delete
'<a href="%1$s" class="follow_button" title="%2$s"%3$s%5$s>%4$s</a>',
[371] Fix | Delete
! $is_skype ? esc_url( $url ) : $skype_url,
[372] Fix | Delete
$network_name,
[373] Fix | Delete
( 'on' === $et_pb_social_media_follow_link['url_new_window'] ? ' target="_blank"' : '' ),
[374] Fix | Delete
esc_html__( 'Follow', 'et_builder' ),
[375] Fix | Delete
$follow_button_multi_view_attr
[376] Fix | Delete
);
[377] Fix | Delete
}
[378] Fix | Delete
[379] Fix | Delete
if ( '' !== $custom_padding || '' !== $custom_padding_tablet || '' !== $custom_padding_phone ) {
[380] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[381] Fix | Delete
'selector' => '.et_pb_social_media_follow li%%order_class%% a',
[382] Fix | Delete
'declaration' => 'width: auto; height: auto;',
[383] Fix | Delete
) );
[384] Fix | Delete
}
[385] Fix | Delete
[386] Fix | Delete
// Icon Color.
[387] Fix | Delete
et_pb_responsive_options()->generate_responsive_css( $icon_color_values, '.et_pb_social_media_follow %%order_class%%.et_pb_social_icon .icon:before', 'color', $render_slug, '', 'color' );
[388] Fix | Delete
[389] Fix | Delete
if ( et_builder_is_hover_enabled( 'icon_color', $this->props ) ) {
[390] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[391] Fix | Delete
'selector' => '.et_pb_social_media_follow %%order_class%%.et_pb_social_icon:hover .icon:before',
[392] Fix | Delete
'declaration' => sprintf(
[393] Fix | Delete
'color: %1$s;',
[394] Fix | Delete
esc_html( $icon_color_hover )
[395] Fix | Delete
),
[396] Fix | Delete
) );
[397] Fix | Delete
}
[398] Fix | Delete
[399] Fix | Delete
// Icon Size.
[400] Fix | Delete
if ( 'off' !== $use_icon_font_size ) {
[401] Fix | Delete
// Proccess for each devices.
[402] Fix | Delete
foreach ( $icon_font_size_values as $font_size_key => $font_size_value ) {
[403] Fix | Delete
if ( '' === $font_size_value ) {
[404] Fix | Delete
continue;
[405] Fix | Delete
}
[406] Fix | Delete
[407] Fix | Delete
$media_query = 'general';
[408] Fix | Delete
if ( 'tablet' === $font_size_key ) {
[409] Fix | Delete
$media_query = ET_Builder_Element::get_media_query( 'max_width_980' );
[410] Fix | Delete
} elseif ( 'phone' === $font_size_key ) {
[411] Fix | Delete
$media_query = ET_Builder_Element::get_media_query( 'max_width_767' );
[412] Fix | Delete
}
[413] Fix | Delete
[414] Fix | Delete
$font_size_value_int = (int) $font_size_value;
[415] Fix | Delete
$font_size_value_unit = str_replace( $font_size_value_int, '', $font_size_value );
[416] Fix | Delete
$font_size_value_double = 0 < $font_size_value_int ? $font_size_value_int * 2 : 0;
[417] Fix | Delete
$font_size_value_double = (string) $font_size_value_double . $font_size_value_unit;
[418] Fix | Delete
[419] Fix | Delete
// Icon.
[420] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[421] Fix | Delete
'selector' => '.et_pb_social_media_follow %%order_class%% .icon:before',
[422] Fix | Delete
'declaration' => sprintf(
[423] Fix | Delete
'font-size:%1$s; line-height:%2$s; height:%2$s; width:%2$s;',
[424] Fix | Delete
esc_html( $font_size_value ),
[425] Fix | Delete
esc_html( $font_size_value_double )
[426] Fix | Delete
),
[427] Fix | Delete
'media_query' => $media_query,
[428] Fix | Delete
) );
[429] Fix | Delete
[430] Fix | Delete
// Icon Wrapper.
[431] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[432] Fix | Delete
'selector' => '.et_pb_social_media_follow %%order_class%% .icon',
[433] Fix | Delete
'declaration' => sprintf(
[434] Fix | Delete
'height:%1$s; width:%1$s;',
[435] Fix | Delete
esc_html( $font_size_value_double )
[436] Fix | Delete
),
[437] Fix | Delete
'media_query' => $media_query,
[438] Fix | Delete
) );
[439] Fix | Delete
}
[440] Fix | Delete
[441] Fix | Delete
// Icon hover styles.
[442] Fix | Delete
if ( et_builder_is_hover_enabled( 'icon_font_size', $this->props ) && ! empty( $icon_font_size_hover ) ) {
[443] Fix | Delete
$icon_font_size_hover_int = (int) $icon_font_size_hover;
[444] Fix | Delete
$icon_font_size_hover_unit = str_replace( $icon_font_size_hover_int, '', $icon_font_size_hover );
[445] Fix | Delete
$icon_font_size_hover_double = 0 < $icon_font_size_hover_int ? $icon_font_size_hover_int * 2 : 0;
[446] Fix | Delete
$icon_font_size_hover_double = (string) $icon_font_size_hover_double . $icon_font_size_hover_unit;
[447] Fix | Delete
[448] Fix | Delete
// Icon.
[449] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[450] Fix | Delete
'selector' => '.et_pb_social_media_follow %%order_class%% .icon:hover:before',
[451] Fix | Delete
'declaration' => sprintf(
[452] Fix | Delete
'font-size:%1$s; line-height:%2$s; height:%2$s; width:%2$s;',
[453] Fix | Delete
esc_html( $icon_font_size_hover ),
[454] Fix | Delete
esc_html( $icon_font_size_hover_double )
[455] Fix | Delete
),
[456] Fix | Delete
) );
[457] Fix | Delete
[458] Fix | Delete
// Icon Wrapper.
[459] Fix | Delete
ET_Builder_Element::set_style( $render_slug, array(
[460] Fix | Delete
'selector' => '.et_pb_social_media_follow %%order_class%% .icon:hover',
[461] Fix | Delete
'declaration' => sprintf(
[462] Fix | Delete
'height:%1$s; width:%1$s;',
[463] Fix | Delete
esc_html( $icon_font_size_hover_double )
[464] Fix | Delete
),
[465] Fix | Delete
) );
[466] Fix | Delete
}
[467] Fix | Delete
}
[468] Fix | Delete
[469] Fix | Delete
$social_network = ET_Builder_Element::add_module_order_class( $social_network, $render_slug );
[470] Fix | Delete
$video_background = $this->video_background();
[471] Fix | Delete
$parallax_image_background = $this->get_parallax_image_background();
[472] Fix | Delete
$social_network_link_url = ! $is_skype ? esc_url( $url ) : $skype_url;
[473] Fix | Delete
$social_network_link_target = 'on' === $et_pb_social_media_follow_link['url_new_window'] ? ' target="_blank"' : '';
[474] Fix | Delete
[475] Fix | Delete
// Get custom borders, if any
[476] Fix | Delete
$attrs = $this->props;
[477] Fix | Delete
[478] Fix | Delete
// Module classnames
[479] Fix | Delete
$this->add_classname( array(
[480] Fix | Delete
'et_pb_social_icon',
[481] Fix | Delete
'et_pb_social_network_link',
[482] Fix | Delete
) );
[483] Fix | Delete
[484] Fix | Delete
if ( '' !== $social_network ) {
[485] Fix | Delete
$this->add_classname( sprintf( ' et-social-%s', esc_attr( $social_network ) ) );
[486] Fix | Delete
}
[487] Fix | Delete
[488] Fix | Delete
// Remove automatically added classnames
[489] Fix | Delete
$this->remove_classname( array(
[490] Fix | Delete
$render_slug,
[491] Fix | Delete
'et_pb_module',
[492] Fix | Delete
'et_pb_section_video',
[493] Fix | Delete
'et_pb_preload',
[494] Fix | Delete
'et_pb_section_parallax',
[495] Fix | Delete
) );
[496] Fix | Delete
[497] Fix | Delete
// Format i18n link title
[498] Fix | Delete
$social_network_link_title = sprintf(
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function