Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@eri-trabiccolo
Created June 17, 2015 14:59
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/8ddad749bf2c3fc71193 to your computer and use it in GitHub Desktop.
Save eri-trabiccolo/8ddad749bf2c3fc71193 to your computer and use it in GitHub Desktop.
Split socials part 2
add_filter('tc_tagline_display', 'display_default_socials');
function display_default_socials( $_tagline){
if ( ! method_exists('TC_header_main', 'tc_social_in_header') )
return;
ob_start();
TC_header_main::$instance -> tc_social_in_header();
$socials = ob_get_contents();
if ( $socials ) ob_end_clean();
$socials = str_replace('span5', 'span2', $socials);
$_tagline = str_replace('span7', 'span5', $_tagline);
if ( strpos($_tagline, '</div>') )
return str_replace( '</div>', $socials.'</div>', $_tagline );
return $_tagline . $socials;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment