1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94:
<?php
$shortcodes_config['social_links'] = array(
'no_preview' => true,
'options' => array(
'facebook' => array(
'name' => __('Facebook', 'inbound-pro' ),
'desc' => __('Enter your facebook profile URL', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'twitter' => array(
'name' => __('Twitter', 'inbound-pro' ),
'desc' => __('Enter your twitter profile URL', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'google_plus' => array(
'name' => __('Google+', 'inbound-pro' ),
'desc' => __('Enter your google plus profile URL', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'linkedin' => array(
'name' => __('Linkedin', 'inbound-pro' ),
'desc' => __('Enter your linkedin profile URL', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'github' => array(
'name' => __('Github', 'inbound-pro' ),
'desc' => __('Enter your github profile URL', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'pinterest' => array(
'name' => __('Instagram', 'inbound-pro' ),
'desc' => __('Enter your instagram profile URL', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'pinterest' => array(
'name' => __('Pinterest', 'inbound-pro' ),
'desc' => __('Enter your pinterest profile URL', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'rss' => array(
'name' => __('RSS', 'inbound-pro' ),
'desc' => __('Enter your RSS feeds URL', 'inbound-pro' ),
'type' => 'text',
'std' => ''
)
),
'shortcode' => '[social_links facebook="{{facebook}}" twitter="{{twitter}}" google_plus="{{google_plus}}" linkedin="{{linkedin}}" github="{{github}}" pinterest="{{pinterest}}" /]',
'popup_title' => 'Insert Social Link Shortcode'
);
add_shortcode('social_links', 'inbound_shortcode_social_links');
function inbound_shortcode_social_links( $atts, $content = null ) {
extract(shortcode_atts(array(
'facebook' => '',
'twitter' => '',
'google_plus' => '',
'linkedin' => '',
'github' => '',
'instagram' => '',
'pinterest' => '',
'rss' => ''
), $atts));
$out = '';
$out .= '<ul class="inboundnow-social-links">';
if( $facebook ) { $out .= '<li class="facebook"><a href="'. $facebook .'"><i class="icon-facebook icon-large"></i></a></li>'; }
if( $twitter ) { $out .= '<li class="twitter"><a href="'. $twitter .'"><i class="icon-twitter icon-large"></i></a></li>'; }
if( $google_plus ) { $out .= '<li class="google-plus"><a href="'. $google_plus .'"><i class="icon-google-plus icon-large"></i></a></li>'; }
if( $linkedin ) { $out .= '<li class="linkedin"><a href="'. $linkedin .'"><i class="icon-linkedin icon-large"></i></a></li>'; }
if( $github ) { $out .= '<li class="github"><a href="'. $github .'"><i class="icon-github icon-large"></i></a></li>'; }
if( $instagram ) { $out .= '<li class="instagram"><a href="'. $instagram .'"><i class="icon-camera-retro icon-large"></i></a></li>'; }
if( $pinterest ) { $out .= '<li class="pinterest"><a href="'. $pinterest .'"><i class="icon-pinterest icon-large"></i></a></li>'; }
if( $rss ) { $out .= '<li class="rss"><a href="'. $rss .'"><i class="icon-rss icon-large"></i></a></li>'; }
$out .= '</ul>';
return $out;
}