Skip to content

Instantly share code, notes, and snippets.

@eri-trabiccolo
Created June 17, 2015 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eri-trabiccolo/83cf159d9aae2d0483cb to your computer and use it in GitHub Desktop.
Save eri-trabiccolo/83cf159d9aae2d0483cb to your computer and use it in GitHub Desktop.
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