public function content($atts, $content = null) { $title = $tab_id = ''; extract(shortcode_atts(array('url' => '', 'name' => ''), $atts)); $output = ''; require NV_FILES . '/adm/inc/social-media-urls.php'; // get social media button links // Get Social Icons $get_social_icons = social_icon_data(); foreach ($get_social_icons as $social_icon => $value) { $icon_id = str_replace('sociallink_', '', $social_icon); if ($icon_id == $name) { if ($url != '') { $sociallink = $url; } else { $sociallink = getsociallink(${'sociallink_' . $name}); } $icon_name = ''; $icon_name = strtolower(str_replace('.', '', $value['name'])); if ($icon_name == 'vimeo') { $icon_name = 'vimeo-square'; } if ($icon_name == 'email') { $icon_name = 'envelope'; } if ($icon_name == 'google') { $icon_name = 'google-plus'; } $output .= "\n\t\t" . '<li class="dock-tab social-' . strtolower(str_replace('.', '', $value['name'])) . '">'; $output .= "\n\t\t\t" . '<a href="' . str_replace(' ', '%20', $sociallink) . '" title="' . $value['name'] . '" target="_blank"><i class="social-icon fa fa-lg fa-' . $icon_name . '"></i></a>'; $output .= "\n\t\t" . '</li>'; } } return $output; }
require NV_FILES . '/adm/inc/social-media-urls.php'; $output = ''; $output .= "\n\t" . '<ul class="clearfix">'; // Get Social Icons $get_social_icons = social_icon_data(); foreach ($get_social_icons as $social_icon => $value) { $icon_id = str_replace('sociallink_', '', $social_icon); // Check global Social Options if (of_get_option('display_socialicons') == "yes" && get_post_meta($post->ID, '_cmb_socialicons', true) != "yes") { $global_socialicons = of_get_option('socialicons'); if ($global_socialicons[strtolower(str_replace('.', '', $value['name']))] == '0') { ${'NV_social' . $icon_id} = 'yes'; } } if (${'NV_social' . $icon_id} != 'yes') { $sociallink = isset(${$social_icon}) ? getsociallink(${$social_icon}) : ''; $icon_name = ''; $icon_name = strtolower(str_replace('.', '', $value['name'])); if ($icon_name == 'vimeo') { $icon_name = 'vimeo-square'; } if ($icon_name == 'email') { $icon_name = 'envelope'; } if ($icon_name == 'google') { $icon_name = 'google-plus'; } $output .= "\n\t\t" . '<li class="social-' . strtolower(str_replace('.', '', $value['name'])) . '">'; $output .= "\n\t\t\t" . '<div class="tooltip-info top center" data-tooltip-position="top center">'; $output .= "\n\t\t\t\t" . '<a href="' . $sociallink . '" title="' . $value['name'] . '" target="_blank"><i class="social-icon fa-lg fa fa-' . $icon_name . '"></i></a>'; $output .= "\n\t\t\t" . '</div>';