Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: make_clickable_rel

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
2903
2904      /**
2905       * Filters the rel value that is added to URL matches converted to links.
2906       *
2907       * @since 5.3.0
2908       *
2909       * @param string $rel The rel value.
2910       * @param string $url The matched URL being converted to a link tag.
2911       */
2912      $rel = apply_filters( 'make_clickable_rel', $rel, $url );
2913      $rel = esc_attr( $rel );
2914
2915      return $matches[1] . "<a href=\"$url\" rel=\"$rel\">$url</a>" . $suffix;
2916 }
2917
2918 /**
2919  * Callback to convert URL match to HTML A element.
2920  *
2921  * This function was backported from 2.5.0 to 2.3.2. Regex callback for make_clickable().
 
Line Code
2944      }
2945
2946      if ( 'comment_text' === current_filter() ) {
2947           $rel = 'nofollow ugc';
2948      } else {
2949           $rel = 'nofollow';
2950      }
2951
2952      /** This filter is documented in wp-includes/formatting.php */
2953      $rel = apply_filters( 'make_clickable_rel', $rel, $dest );
2954      $rel = esc_attr( $rel );
2955
2956      return $matches[1] . "<a href=\"$dest\" rel=\"$rel\">$dest</a>$ret";
2957 }
2958
2959 /**
2960  * Callback to convert email address match to HTML A element.
2961  *
2962  * This function was backported from 2.5.0 to 2.3.2. Regex callback for make_clickable().