Skip to content

Instantly share code, notes, and snippets.

@jameskoster
Created October 21, 2014 13:55
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 jameskoster/e38af9ae14fb664455df to your computer and use it in GitHub Desktop.
Save jameskoster/e38af9ae14fb664455df to your computer and use it in GitHub Desktop.
Subscribe and Connect adjust social network markup to include nofollow
add_filter( 'subscribe_and_connect_networks_list', 'jk_change_social_links_markup' );
function jk_change_social_links_markup( $list ) {
global $subscribe_and_connect;
$settings = $subscribe_and_connect->get_settings();
$networks = Subscribe_And_Connect_Utils::get_networks_in_order( $settings['connect']['networks'], $settings['connect']['networks_order'] );
$list = '';
if ( 0 < count( $networks ) ) {
foreach ( $networks as $k => $v ) {
if ( ! isset( $v['url'] ) || '' == $v['url'] ) continue;
$class = $k;
$list .= '<li class="' . esc_attr( $class ) . '"><a href="' . esc_url( $v['url'] ) . '" rel="nofollow"><span>' . "\n";
$list .= '</span></a></li>' . "\n";
}
}
return $list;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment