Edit File by line
/home/barbar84/www/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
'sticky' => false,
[120] Fix | Delete
);
[121] Fix | Delete
}
[122] Fix | Delete
[123] Fix | Delete
function get_fields() {
[124] Fix | Delete
$fields = array(
[125] Fix | Delete
'social_network' => array(
[126] Fix | Delete
'label' => esc_html__( 'Social Network', 'et_builder' ),
[127] Fix | Delete
'type' => 'select',
[128] Fix | Delete
'option_category' => 'basic_option',
[129] Fix | Delete
'class' => 'et-pb-social-network',
[130] Fix | Delete
'options' => array(
[131] Fix | Delete
'' => esc_html__( 'Select a Network', 'et_builder' ),
[132] Fix | Delete
'facebook' => array(
[133] Fix | Delete
'value' => esc_html__( 'Facebook', 'et_builder' ),
[134] Fix | Delete
'data' => array( 'color' => '#3b5998' ),
[135] Fix | Delete
),
[136] Fix | Delete
'twitter' => array(
[137] Fix | Delete
'value' => esc_html__( 'Twitter', 'et_builder' ),
[138] Fix | Delete
'data' => array( 'color' => '#00aced' ),
[139] Fix | Delete
),
[140] Fix | Delete
'google-plus' => array(
[141] Fix | Delete
'value' => esc_html__( 'Google+', 'et_builder' ),
[142] Fix | Delete
'data' => array( 'color' => '#dd4b39' ),
[143] Fix | Delete
),
[144] Fix | Delete
'pinterest' => array(
[145] Fix | Delete
'value' => esc_html__( 'Pinterest', 'et_builder' ),
[146] Fix | Delete
'data' => array( 'color' => '#cb2027' ),
[147] Fix | Delete
),
[148] Fix | Delete
'linkedin' => array(
[149] Fix | Delete
'value' => esc_html__( 'LinkedIn', 'et_builder' ),
[150] Fix | Delete
'data' => array( 'color' => '#007bb6' ),
[151] Fix | Delete
),
[152] Fix | Delete
'tumblr' => array(
[153] Fix | Delete
'value' => esc_html__( 'tumblr', 'et_builder' ),
[154] Fix | Delete
'data' => array( 'color' => '#32506d' ),
[155] Fix | Delete
),
[156] Fix | Delete
'instagram' => array(
[157] Fix | Delete
'value' => esc_html__( 'Instagram', 'et_builder' ),
[158] Fix | Delete
'data' => array( 'color' => '#ea2c59' ),
[159] Fix | Delete
),
[160] Fix | Delete
'skype' => array(
[161] Fix | Delete
'value' => esc_html__( 'skype', 'et_builder' ),
[162] Fix | Delete
'data' => array( 'color' => '#12A5F4' ),
[163] Fix | Delete
),
[164] Fix | Delete
'flikr' => array(
[165] Fix | Delete
'value' => esc_html__( 'Flickr', 'et_builder' ),
[166] Fix | Delete
'data' => array( 'color' => '#ff0084' ),
[167] Fix | Delete
),
[168] Fix | Delete
'myspace' => array(
[169] Fix | Delete
'value' => esc_html__( 'MySpace', 'et_builder' ),
[170] Fix | Delete
'data' => array( 'color' => '#3b5998' ),
[171] Fix | Delete
),
[172] Fix | Delete
'dribbble' => array(
[173] Fix | Delete
'value' => esc_html__( 'dribbble', 'et_builder' ),
[174] Fix | Delete
'data' => array( 'color' => '#ea4c8d' ),
[175] Fix | Delete
),
[176] Fix | Delete
'youtube' => array(
[177] Fix | Delete
'value' => esc_html__( 'Youtube', 'et_builder' ),
[178] Fix | Delete
'data' => array( 'color' => '#a82400' ),
[179] Fix | Delete
),
[180] Fix | Delete
'vimeo' => array(
[181] Fix | Delete
'value' => esc_html__( 'Vimeo', 'et_builder' ),
[182] Fix | Delete
'data' => array( 'color' => '#45bbff' ),
[183] Fix | Delete
),
[184] Fix | Delete
'rss' => array(
[185] Fix | Delete
'value' => esc_html__( 'RSS', 'et_builder' ),
[186] Fix | Delete
'data' => array( 'color' => '#ff8a3c' ),
[187] Fix | Delete
),
[188] Fix | Delete
),
[189] Fix | Delete
'affects' => array(
[190] Fix | Delete
'url',
[191] Fix | Delete
'skype_url',
[192] Fix | Delete
'skype_action',
[193] Fix | Delete
),
[194] Fix | Delete
'overwrite_onchange' => array(
[195] Fix | Delete
'background_color',
[196] Fix | Delete
),
[197] Fix | Delete
'description' => esc_html__( 'Choose the social network', 'et_builder' ),
[198] Fix | Delete
'toggle_slug' => 'main_content',
[199] Fix | Delete
),
[200] Fix | Delete
'content' => array(
[201] Fix | Delete
'label' => et_builder_i18n( 'Body' ),
[202] Fix | Delete
'type' => 'hidden',
[203] Fix | Delete
'toggle_slug' => 'main_content',
[204] Fix | Delete
),
[205] Fix | Delete
'url' => array(
[206] Fix | Delete
'label' => esc_html__( 'Account Link URL', 'et_builder' ),
[207] Fix | Delete
'type' => 'text',
[208] Fix | Delete
'option_category' => 'basic_option',
[209] Fix | Delete
'description' => esc_html__( 'The URL for this social network link.', 'et_builder' ),
[210] Fix | Delete
'depends_show_if_not' => 'skype',
[211] Fix | Delete
'depends_on' => array(
[212] Fix | Delete
'social_network',
[213] Fix | Delete
),
[214] Fix | Delete
'toggle_slug' => 'link',
[215] Fix | Delete
'default_on_front' => '#',
[216] Fix | Delete
'dynamic_content' => 'url',
[217] Fix | Delete
),
[218] Fix | Delete
'skype_url' => array(
[219] Fix | Delete
'label' => esc_html__( 'Account Name', 'et_builder' ),
[220] Fix | Delete
'type' => 'text',
[221] Fix | Delete
'option_category' => 'basic_option',
[222] Fix | Delete
'description' => esc_html__( 'The Skype account name.', 'et_builder' ),
[223] Fix | Delete
'depends_show_if' => 'skype',
[224] Fix | Delete
'depends_on' => array(
[225] Fix | Delete
'social_network',
[226] Fix | Delete
),
[227] Fix | Delete
'toggle_slug' => 'main_content',
[228] Fix | Delete
),
[229] Fix | Delete
'skype_action' => array(
[230] Fix | Delete
'label' => esc_html__( 'Skype Button Action', 'et_builder' ),
[231] Fix | Delete
'type' => 'select',
[232] Fix | Delete
'option_category' => 'basic_option',
[233] Fix | Delete
'options' => array(
[234] Fix | Delete
'call' => esc_html__( 'Call', 'et_builder' ),
[235] Fix | Delete
'chat' => esc_html__( 'Chat', 'et_builder' ),
[236] Fix | Delete
),
[237] Fix | Delete
'depends_show_if' => 'skype',
[238] Fix | Delete
'depends_on' => array(
[239] Fix | Delete
'social_network',
[240] Fix | Delete
),
[241] Fix | Delete
'description' => esc_html__( 'Here you can choose which action to execute on button click', 'et_builder' ),
[242] Fix | Delete
'toggle_slug' => 'main_content',
[243] Fix | Delete
'default_on_front' => 'call',
[244] Fix | Delete
),
[245] Fix | Delete
'icon_color' => array(
[246] Fix | Delete
'label' => esc_html__( 'Icon Color', 'et_builder' ),
[247] Fix | Delete
'description' => esc_html__( 'Here you can define a custom color for the social network icon.', 'et_builder' ),
[248] Fix | Delete
'type' => 'color-alpha',
[249] Fix | Delete
'custom_color' => true,
[250] Fix | Delete
'tab_slug' => 'advanced',
[251] Fix | Delete
'toggle_slug' => 'icon',
[252] Fix | Delete
'hover' => 'tabs',
[253] Fix | Delete
'mobile_options' => true,
[254] Fix | Delete
'sticky' => true,
[255] Fix | Delete
),
[256] Fix | Delete
'use_icon_font_size' => array(
[257] Fix | Delete
'label' => esc_html__( 'Use Custom Icon Size', 'et_builder' ),
[258] Fix | Delete
'description' => esc_html__( 'If you would like to control the size of the icon, you must first enable this option.', 'et_builder' ),
[259] Fix | Delete
'type' => 'yes_no_button',
[260] Fix | Delete
'options' => array(
[261] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[262] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[263] Fix | Delete
),
[264] Fix | Delete
'default_on_front' => 'off',
[265] Fix | Delete
'affects' => array(
[266] Fix | Delete
'icon_font_size',
[267] Fix | Delete
),
[268] Fix | Delete
'depends_show_if' => 'on',
[269] Fix | Delete
'tab_slug' => 'advanced',
[270] Fix | Delete
'toggle_slug' => 'icon',
[271] Fix | Delete
'option_category' => 'font_option',
[272] Fix | Delete
),
[273] Fix | Delete
'icon_font_size' => array(
[274] Fix | Delete
'label' => esc_html__( 'Icon Font Size', 'et_builder' ),
[275] Fix | Delete
'description' => esc_html__( 'Control the size of the icon by increasing or decreasing the font size.', 'et_builder' ),
[276] Fix | Delete
'type' => 'range',
[277] Fix | Delete
'option_category' => 'font_option',
[278] Fix | Delete
'tab_slug' => 'advanced',
[279] Fix | Delete
'toggle_slug' => 'icon',
[280] Fix | Delete
'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
[281] Fix | Delete
'default' => '16px',
[282] Fix | Delete
'default_unit' => 'px',
[283] Fix | Delete
'default_on_front' => '',
[284] Fix | Delete
'range_settings' => array(
[285] Fix | Delete
'min' => '1',
[286] Fix | Delete
'max' => '120',
[287] Fix | Delete
'step' => '1',
[288] Fix | Delete
),
[289] Fix | Delete
'mobile_options' => true,
[290] Fix | Delete
'depends_show_if' => 'on',
[291] Fix | Delete
'responsive' => true,
[292] Fix | Delete
'hover' => 'tabs',
[293] Fix | Delete
'sticky' => true,
[294] Fix | Delete
),
[295] Fix | Delete
);
[296] Fix | Delete
[297] Fix | Delete
// Automatically parse social_network's option as value_overwrite
[298] Fix | Delete
foreach ( $fields['social_network']['options'] as $value_overwrite_key => $value_overwrite ) {
[299] Fix | Delete
if ( is_array( $value_overwrite ) && isset( $value_overwrite['data'] ) && $value_overwrite['data']['color'] ) {
[300] Fix | Delete
$fields['social_network']['value_overwrite'][ $value_overwrite_key ] = $value_overwrite['data']['color'];
[301] Fix | Delete
}
[302] Fix | Delete
}
[303] Fix | Delete
[304] Fix | Delete
return $fields;
[305] Fix | Delete
}
[306] Fix | Delete
[307] Fix | Delete
public function get_transition_fields_css_props() {
[308] Fix | Delete
$fields = parent::get_transition_fields_css_props();
[309] Fix | Delete
[310] Fix | Delete
$fields['icon_color'] = array( 'color' => '.et_pb_social_media_follow %%order_class%% .icon:before' );
[311] Fix | Delete
$fields['icon_font_size'] = array(
[312] Fix | Delete
'font-size' => '.et_pb_social_media_follow %%order_class%% .icon:before',
[313] Fix | Delete
'line-height' => '.et_pb_social_media_follow %%order_class%% .icon:before',
[314] Fix | Delete
'height' => '.et_pb_social_media_follow %%order_class%% .icon:before',
[315] Fix | Delete
'width' => '.et_pb_social_media_follow %%order_class%% .icon:before',
[316] Fix | Delete
'height' => '.et_pb_social_media_follow %%order_class%% .icon',
[317] Fix | Delete
'width' => '.et_pb_social_media_follow %%order_class%% .icon',
[318] Fix | Delete
);
[319] Fix | Delete
[320] Fix | Delete
return $fields;
[321] Fix | Delete
}
[322] Fix | Delete
[323] Fix | Delete
function get_network_name( $network ) {
[324] Fix | Delete
$all_fields = $this->get_fields();
[325] Fix | Delete
$network_names_mapping = $all_fields['social_network']['options'];
[326] Fix | Delete
[327] Fix | Delete
if ( isset( $network_names_mapping[ $network ] ) && isset( $network_names_mapping[ $network ]['value'] ) ) {
[328] Fix | Delete
return $network_names_mapping[ $network ]['value'];
[329] Fix | Delete
}
[330] Fix | Delete
[331] Fix | Delete
return $network;
[332] Fix | Delete
}
[333] Fix | Delete
[334] Fix | Delete
/**
[335] Fix | Delete
* Renders the module output.
[336] Fix | Delete
*
[337] Fix | Delete
* @param array $attrs List of attributes.
[338] Fix | Delete
* @param string $content Content being processed.
[339] Fix | Delete
* @param string $render_slug Slug of module that is used for rendering output.
[340] Fix | Delete
*
[341] Fix | Delete
* @return string
[342] Fix | Delete
*/
[343] Fix | Delete
public function render( $attrs, $content, $render_slug ) {
[344] Fix | Delete
global $et_pb_social_media_follow_link,
[345] Fix | Delete
$et_pb_social_media_follow_sticky;
[346] Fix | Delete
[347] Fix | Delete
$multi_view = et_pb_multi_view_options( $this );
[348] Fix | Delete
$multi_view->set_custom_prop( 'follow_button', $et_pb_social_media_follow_link['follow_button'] );
[349] Fix | Delete
[350] Fix | Delete
$social_network = $this->props['social_network'];
[351] Fix | Delete
$url = $this->props['url'];
[352] Fix | Delete
$skype_url = $this->props['skype_url'];
[353] Fix | Delete
$skype_action = $this->props['skype_action'];
[354] Fix | Delete
$custom_padding = $this->props['custom_padding'];
[355] Fix | Delete
$custom_padding_tablet = $this->props['custom_padding_tablet'];
[356] Fix | Delete
$custom_padding_phone = $this->props['custom_padding_phone'];
[357] Fix | Delete
$follow_button = '';
[358] Fix | Delete
$is_skype = false;
[359] Fix | Delete
$network_name = esc_attr( $this->get_network_name( trim( wp_strip_all_tags( $content ) ) ) );
[360] Fix | Delete
$use_icon_font_size = $this->props['use_icon_font_size'];
[361] Fix | Delete
$icon_font_size_values = et_pb_responsive_options()->get_property_values( $this->props, 'icon_font_size' );
[362] Fix | Delete
[363] Fix | Delete
if ( 'skype' === $social_network ) {
[364] Fix | Delete
$skype_url = sprintf(
[365] Fix | Delete
'skype:%1$s?%2$s',
[366] Fix | Delete
sanitize_text_field( $skype_url ),
[367] Fix | Delete
sanitize_text_field( $skype_action )
[368] Fix | Delete
);
[369] Fix | Delete
$is_skype = true;
[370] Fix | Delete
}
[371] Fix | Delete
[372] Fix | Delete
if ( $multi_view->has_value( 'follow_button', 'on' ) ) {
[373] Fix | Delete
$follow_button_multi_view_attr = $multi_view->render_attrs(
[374] Fix | Delete
array(
[375] Fix | Delete
'visibility' => array(
[376] Fix | Delete
'follow_button' => 'on',
[377] Fix | Delete
),
[378] Fix | Delete
)
[379] Fix | Delete
);
[380] Fix | Delete
[381] Fix | Delete
$follow_button = sprintf(
[382] Fix | Delete
'<a href="%1$s" class="follow_button" title="%2$s"%3$s%5$s>%4$s</a>',
[383] Fix | Delete
! $is_skype ? esc_url( $url ) : $skype_url,
[384] Fix | Delete
$network_name,
[385] Fix | Delete
( 'on' === $et_pb_social_media_follow_link['url_new_window'] ? ' target="_blank"' : '' ),
[386] Fix | Delete
esc_html__( 'Follow', 'et_builder' ),
[387] Fix | Delete
$follow_button_multi_view_attr
[388] Fix | Delete
);
[389] Fix | Delete
}
[390] Fix | Delete
[391] Fix | Delete
if ( '' !== $custom_padding || '' !== $custom_padding_tablet || '' !== $custom_padding_phone ) {
[392] Fix | Delete
$el_style = array(
[393] Fix | Delete
'selector' => '.et_pb_social_media_follow li%%order_class%% a',
[394] Fix | Delete
'declaration' => 'width: auto; height: auto;',
[395] Fix | Delete
);
[396] Fix | Delete
ET_Builder_Element::set_style( $render_slug, $el_style );
[397] Fix | Delete
}
[398] Fix | Delete
[399] Fix | Delete
// Icon Color.
[400] Fix | Delete
$this->generate_styles(
[401] Fix | Delete
array(
[402] Fix | Delete
'base_attr_name' => 'icon_color',
[403] Fix | Delete
'selector' => '.et_pb_social_media_follow %%order_class%%.et_pb_social_icon .icon:before',
[404] Fix | Delete
'hover_selector' => '.et_pb_social_media_follow %%order_class%%.et_pb_social_icon:hover .icon:before',
[405] Fix | Delete
'sticky_pseudo_selector_location' => 'prefix',
[406] Fix | Delete
'css_property' => 'color',
[407] Fix | Delete
'render_slug' => $render_slug,
[408] Fix | Delete
'type' => 'color',
[409] Fix | Delete
'is_sticky_module' => $et_pb_social_media_follow_sticky,
[410] Fix | Delete
)
[411] Fix | Delete
);
[412] Fix | Delete
[413] Fix | Delete
// Icon Size.
[414] Fix | Delete
if ( 'off' !== $use_icon_font_size ) {
[415] Fix | Delete
// Calculate icon size + its wrapper dimension.
[416] Fix | Delete
$this->generate_styles(
[417] Fix | Delete
array(
[418] Fix | Delete
'base_attr_name' => 'icon_font_size',
[419] Fix | Delete
'selector' => '.et_pb_social_media_follow %%order_class%% .icon:before',
[420] Fix | Delete
'selector_wrapper' => '.et_pb_social_media_follow %%order_class%% .icon',
[421] Fix | Delete
'hover_pseudo_selector_location' => 'suffix',
[422] Fix | Delete
'sticky_pseudo_selector_location' => 'prefix',
[423] Fix | Delete
'render_slug' => $render_slug,
[424] Fix | Delete
'type' => 'range',
[425] Fix | Delete
'css_property' => 'right',
[426] Fix | Delete
'is_sticky_module' => $et_pb_social_media_follow_sticky,
[427] Fix | Delete
[428] Fix | Delete
// processed attr value can't be directly assigned to single css property so
[429] Fix | Delete
// custom processor is needed to render this attr. Processor required is 100%
[430] Fix | Delete
// identical to social media follow module's. Thus it is being re-used.
[431] Fix | Delete
'processor' => array(
[432] Fix | Delete
'ET_Builder_Module_Helper_Style_Processor',
[433] Fix | Delete
'process_social_media_icon_font_size',
[434] Fix | Delete
),
[435] Fix | Delete
)
[436] Fix | Delete
);
[437] Fix | Delete
}
[438] Fix | Delete
[439] Fix | Delete
$social_network = ET_Builder_Element::add_module_order_class( $social_network, $render_slug );
[440] Fix | Delete
$video_background = $this->video_background();
[441] Fix | Delete
$parallax_image_background = $this->get_parallax_image_background();
[442] Fix | Delete
$social_network_link_url = ! $is_skype ? esc_url( $url ) : $skype_url;
[443] Fix | Delete
$social_network_link_target = 'on' === $et_pb_social_media_follow_link['url_new_window'] ? ' target="_blank"' : '';
[444] Fix | Delete
[445] Fix | Delete
// Get custom borders, if any
[446] Fix | Delete
$attrs = $this->props;
[447] Fix | Delete
[448] Fix | Delete
// Module classnames
[449] Fix | Delete
$this->add_classname(
[450] Fix | Delete
array(
[451] Fix | Delete
'et_pb_social_icon',
[452] Fix | Delete
'et_pb_social_network_link',
[453] Fix | Delete
)
[454] Fix | Delete
);
[455] Fix | Delete
[456] Fix | Delete
if ( '' !== $social_network ) {
[457] Fix | Delete
$this->add_classname( sprintf( ' et-social-%s', esc_attr( $social_network ) ) );
[458] Fix | Delete
}
[459] Fix | Delete
[460] Fix | Delete
// Remove automatically added classnames
[461] Fix | Delete
$this->remove_classname(
[462] Fix | Delete
array(
[463] Fix | Delete
$render_slug,
[464] Fix | Delete
'et_pb_module',
[465] Fix | Delete
'et_pb_section_video',
[466] Fix | Delete
'et_pb_preload',
[467] Fix | Delete
'et_pb_section_parallax',
[468] Fix | Delete
)
[469] Fix | Delete
);
[470] Fix | Delete
[471] Fix | Delete
// Format i18n link title
[472] Fix | Delete
$social_network_link_title = sprintf(
[473] Fix | Delete
esc_html__( 'Follow on %s', 'et_builder' ),
[474] Fix | Delete
$network_name
[475] Fix | Delete
);
[476] Fix | Delete
[477] Fix | Delete
// Format i18n link text (visible, but ignored by screen readers)
[478] Fix | Delete
$social_network_link_text = esc_html__( 'Follow', 'et_builder' );
[479] Fix | Delete
[480] Fix | Delete
// Prepare CSS classes for the link
[481] Fix | Delete
$social_network_link_classes = array( 'icon', 'et_pb_with_border' );
[482] Fix | Delete
if ( '' !== $video_background ) {
[483] Fix | Delete
array_push(
[484] Fix | Delete
$social_network_link_classes,
[485] Fix | Delete
'et_pb_section_video',
[486] Fix | Delete
'et_pb_preload',
[487] Fix | Delete
$video_background
[488] Fix | Delete
);
[489] Fix | Delete
}
[490] Fix | Delete
if ( '' !== $parallax_image_background ) {
[491] Fix | Delete
array_push(
[492] Fix | Delete
$social_network_link_classes,
[493] Fix | Delete
'et_pb_section_parallax'
[494] Fix | Delete
);
[495] Fix | Delete
}
[496] Fix | Delete
$social_network_link_classes = implode( ' ', $social_network_link_classes );
[497] Fix | Delete
[498] Fix | Delete
$output = "<li
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function