function _gcustom_styler($repeater_id) { $style = ""; foreach (_go_repeated($repeater_id) as $styler_index => $styler) { if (!empty($styler['custom_selector']) && (!empty($styler['custom_color']) || !empty($styler['custom_bg_color']))) { $style .= $styler['custom_selector'] . "{"; $important = !empty($styler['important']) ? " !important" : ""; $style .= !empty($styler['custom_color']) ? "color: " . $styler['custom_color'] . $important . ";" : ""; $style .= !empty($styler['custom_bg_color']) ? "background-color: " . $styler['custom_bg_color'] . $important . ";" : ""; $style .= "}"; } } return $style; }
function biznex_social($atts, $content = null) { extract(shortcode_atts(array('style' => ''), $atts)); $content = biznex_shortcode_fix(do_shortcode($content)); if ('' !== $style) { $style = ' style="' . htmlspecialchars($style) . '" '; } $output = ''; $social = array('facebook' => _go('social_platforms_facebook'), 'twitter' => _go('social_platforms_twitter'), 'google-plus' => _go('social_platforms_google'), 'linkedin' => _go('social_platforms_linkedin'), 'dribbble' => _go('social_platforms_dribbble'), 'pinterest' => _go('social_platforms_pinterest'), 'instagram' => _go('social_platforms_instagram')); $social_custom = _go_repeated('Custom Icons'); $social_filtered = array_filter($social); $output .= '<div class="social-icons align-center" ' . $style . ' >'; foreach ($social_filtered as $social_key => $social_value) { $output .= '<a href="' . htmlspecialchars($social_value) . '"><img src="' . tesla_locate_uri('img/social-' . $social_key . '.png') . '" alt="social" /></a>'; } foreach ($social_custom as $social_custom_icon) { if ('' !== $social_custom_icon['custom_social_url'] && '' !== $social_custom_icon['custom_social_image']) { $output .= '<a href="' . htmlspecialchars($social_custom_icon['custom_social_url']) . '"><img src="' . htmlspecialchars($social_custom_icon['custom_social_image']) . '" alt="social" /></a>'; } } $output .= '</div>'; return $output; }