-
Notifications
You must be signed in to change notification settings - Fork 0
/
make-clickable-wp.php
51 lines (43 loc) · 1.21 KB
/
make-clickable-wp.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* Plugin Name: Make Clickable WordPress
* Plugin URI: https://github.com/wpbrasil/Make-Clickable-WordPress
* Description: Convert plain text URI to HTML links. Converts URI, www, FTP, and email addresses.
* Author: leobaiano, valeriosza, rafaehlers, gugaalves, rafaelfunchal, miriamdepaula, dianakc, claudiosanches, bordoni, jimmymacedo, fdaciuk
* Author URI: http://guwp.org/
* Version: 1.0.0
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) )
exit; // Exit if accessed directly.
/**
* Make Clickable WordPress
*/
class Make_Clickable_WordPress {
/**
* Instance of this class.
*
* @var object
*/
protected static $instance = null;
/**
* Initialize the plugin public actions.
*/
private function __construct() {
add_filter( 'the_content', 'make_clickable' );
}
/**
* Return an instance of this class.
*
* @return object A single instance of this class.
*/
public static function get_instance() {
// If the single instance hasn't been set, set it now.
if ( null == self::$instance ) {
self::$instance = new self;
}
return self::$instance;
}
}
add_action( 'plugins_loaded', array( 'Make_Clickable_WordPress', 'get_instance' ), 0 );
?>