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: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184:
<?php
$shortcodes_config['profile'] = array(
'no_preview' => true,
'options' => array(
'name' => array(
'name' => __('Profile Name', 'inbound-pro' ),
'desc' => __('Enter the name.', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'meta' => array(
'name' => __('Profile Meta', 'inbound-pro' ),
'desc' => __('Enter the profile meta. e.g job position etc.', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'image' => array(
'name' => __('Profile Image', 'inbound-pro' ),
'desc' => __('Paste your profile image URL here.', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'link' => array(
'name' => __('Profile Link', 'inbound-pro' ),
'desc' => __('Paste your profile link URL here.', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'facebook' => array(
'name' => __('Profile Facebook', 'inbound-pro' ),
'desc' => __('Paste your facebook URL here.', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'twitter' => array(
'name' => __('Profile Twitter', 'inbound-pro' ),
'desc' => __('Paste your twitter URL here.', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'email' => array(
'name' => __('Profile Email Address', 'inbound-pro' ),
'desc' => __('Paste your email address here.', 'inbound-pro' ),
'type' => 'text',
'std' => ''
),
'content' => array(
'name' => __('Profile Description', 'leads'),
'desc' => __('Enter the profile description text.', 'leads'),
'type' => 'textarea',
'std' => ''
)
),
'shortcode' => '[profile name="{{name}}" meta="{{meta}}" image="{{image}}"]{{content}}[/profile]',
'popup_title' => 'Insert Profile Shortcode'
);
$freshbuilder_modules['profile'] = array(
'name' => __('Profile', 'inbound-pro' ),
'size' => 'one_fourth',
'options' => array(
'name' => array(
'name' => __('Profile Name', 'inbound-pro' ),
'desc' => __('Enter the name.', 'inbound-pro' ),
'type' => 'text',
'std' => '',
'class' => '',
'is_content' => 0
),
'meta' => array(
'name' => __('Profile Meta', 'inbound-pro' ),
'desc' => __('Enter the profile meta. e.g job position etc.', 'inbound-pro' ),
'type' => 'text',
'std' => '',
'class' => '',
'is_content' => 0
),
'image' => array(
'name' => __('Profile Image', 'inbound-pro' ),
'desc' => __('Paste your profile image URL here.', 'inbound-pro' ),
'type' => 'text',
'std' => '',
'class' => '',
'is_content' => 0
),
'link' => array(
'name' => __('Profile Link', 'inbound-pro' ),
'desc' => __('Paste your profile URL here.', 'inbound-pro' ),
'type' => 'text',
'std' => '',
'class' => '',
'is_content' => 0
),
'facebook' => array(
'name' => __('Profile Facebook', 'inbound-pro' ),
'desc' => __('Paste your facebook URL here.', 'inbound-pro' ),
'type' => 'text',
'std' => '',
'class' => '',
'is_content' => 0
),
'twitter' => array(
'name' => __('Profile Twitter', 'inbound-pro' ),
'desc' => __('Paste your twitter URL here.', 'inbound-pro' ),
'type' => 'text',
'std' => '',
'class' => '',
'is_content' => 0
),
'email' => array(
'name' => __('Profile Email Address', 'inbound-pro' ),
'desc' => __('Paste your email address here.', 'inbound-pro' ),
'type' => 'text',
'std' => '',
'class' => '',
'is_content' => 0
),
'content' => array(
'name' => __('Profile Description', 'inbound-pro' ),
'desc' => __('Enter the profile description text.', 'leads'),
'type' => 'textarea',
'std' => '',
'class' => '',
'is_content' => 1
)
)
);
add_shortcode('profile', 'inbound_shortcode_profile');
function inbound_shortcode_profile( $atts, $content = null ) {
extract(shortcode_atts(array(
'name' => '',
'meta' => '',
'image' => '',
'link' => '',
'facebook' => '',
'twitter' => '',
'email' => ''
), $atts));
$out = '';
$out .= '<div class="profile-box clearfix">';
if($link != '') :
$out .= '<figure class="profile-img"><a href="'. $link .'"><img src="'. $image .'" alt="'. $name .'"/></a></figure>';
else :
$out .= '<figure class="profile-img"><img src="'. $image .'" alt="'. $name .'"/></figure>';
endif;
if($name != '')
$out .= '<h3 class="profile-name">'. $name .'</h3>';
if($meta != '')
$out .= '<div class="profile-meta">'. $meta .'</div>';
$out .= '<div class="profile-desc">'. do_shortcode($content) .'</div>';
if($facebook || $twitter || $email ) {
$out .= '<div class="profile-footer">';
if($facebook != '')
$out .= '<a href="'. $facebook .'"><i class="icon-facebook-sign"></i> Facebook</a>';
if($twitter != '')
$out .= '<a href="'. $twitter .'"><i class="icon-twitter"></i> Twitter</a>';
if($email != '' && is_email($email) )
$out .= '<a href="mailto:'. $email .'"><i class="icon-envelope-alt"></i> Email</a>';
$out .= '</div>';
}
$out .= '</div>';
return $out;
}