Filter hook 'make_clickable_rel'

in WP Core File wp-includes/formatting.php at line 3059

View Source

make_clickable_rel

Filter Hook
Description
Filters the rel value that is added to URL matches converted to links.

Hook Information

File Location wp-includes/formatting.php View on GitHub
Hook Type Filter
Line Number 3059

Hook Parameters

Type Name Description
string $rel The rel value.
string $url The matched URL being converted to a link tag.

Usage Examples

Basic Usage
<?php
// Hook into make_clickable_rel
add_filter('make_clickable_rel', 'my_custom_filter', 10, 2);

function my_custom_filter($rel, $url) {
    // Your custom filtering logic here
    return $rel;
}

Source Code Context

wp-includes/formatting.php:3059 - How this hook is used in WordPress core
<?php
3054  	 * @since 5.3.0
3055  	 *
3056  	 * @param string $rel The rel value.
3057  	 * @param string $url The matched URL being converted to a link tag.
3058  	 */
3059  	$rel = apply_filters( 'make_clickable_rel', $rel, $url );
3060  
3061  	$rel_attr = $rel ? ' rel="' . esc_attr( $rel ) . '"' : '';
3062  
3063  	return $rel_attr;
3064  }

PHP Documentation

<?php
/**
	 * Filters the rel value that is added to URL matches converted to links.
	 *
	 * @since 5.3.0
	 *
	 * @param string $rel The rel value.
	 * @param string $url The matched URL being converted to a link tag.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/formatting.php
Related Hooks

Related hooks will be displayed here in future updates.