Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Split socials part 1
add_filter('tc_default_socials', 'add_new_socials', 20);
function add_new_socials($socials){
global $wp_current_filter;
$new_socials = array(
//tc_yoursocial => array
'tc_delicious' => array(
'link_title' => __( 'Find me on Delicious'),
'option_label' => __( 'Delicious profile url' ),
'default' => "http://delicious.com/"
),
);
if ( in_array('__navbar', $wp_current_filter) && ! in_array('tc_tagline_display', $wp_current_filter) )
return $new_socials;
if ( in_array('tc_tagline_display', $wp_current_filter ) )
return $socials;
return array_merge( $socials, $new_socials );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.