05/06/2016 at 12:09 pm
#375415
Keymaster
@ Claude
You could use the cn_output_link hook to change the output for a link too, like so (untested):
add_filter( 'cn_output_link', 'Claude_cn_output_link', 10, 4 );
function Claude_cn_output_link( $html, $link, $entry, $atts) {
$targetOptions = array( 'new' => '_blank', 'same' => '_self' );
$url = cnSanitize::field( 'url', $link->url );
$target = array_key_exists( $link->target, $targetOptions ) ? $targetOptions[ $link->target ] : '_self';
$follow = $link->follow ? '' : 'rel="nofollow"';
$html = '<span class="liens_en" style="font-weight:700"><a class="url" href="' . $url . '" ' . $target . ' ' . $follow . '>Visit us on the web !</a></span>';
return $html;
}
Hope that helps!
-
This reply was modified 10 years, 3 months ago by
Steven Zahm. Reason: Added missing semi-colon
