WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/make clickable

Contents

Description

Convert plain text URI to HTML links.

Converts URI, www, FTP, and email addresses. Finishes by fixing links within links.

Usage

<?php make_clickable$ret ?>

Parameters

$ret
(string) (required) Content to convert URIs.
Default: None

Return Values

(string) 
Content with converted URIs.

Examples

Display all URLs in clickable links

<?php 
$string = "This is a long text that contains some links like http://www.wordpress.org and http://www.wordpress.com .";
echo make_clickable($string); 
?>

Notes

Change Log

Since: 0.71

Source File

make_clickable() is located in wp-includes/formatting.php.

Related

See also index of Function Reference and index of Template Tags.