-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathfunctions.php
More file actions
89 lines (80 loc) · 2.45 KB
/
functions.php
File metadata and controls
89 lines (80 loc) · 2.45 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
/**
* Customify functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package customify
*/
/**
* Same the hook `the_content`
*
* @TODO: do not effect content by plugins
*
* 8 WP_Embed:run_shortcode
* 8 WP_Embed:autoembed
* 10 wptexturize
* 10 wpautop
* 10 shortcode_unautop
* 10 prepend_attachment
* 10 wp_filter_content_tags || wp_make_content_images_responsive
* 11 capital_P_dangit
* 11 do_shortcode
* 20 convert_smilies
*/
global $wp_embed;
add_filter('customify_the_content', array($wp_embed, 'run_shortcode'), 8);
add_filter('customify_the_content', array($wp_embed, 'autoembed'), 8);
add_filter('customify_the_content', 'wptexturize');
add_filter('customify_the_content', 'wpautop');
add_filter('customify_the_content', 'shortcode_unautop');
if (function_exists('wp_filter_content_tags')) {
add_filter('customify_the_content', 'wp_filter_content_tags');
} else {
add_filter('customify_the_content', 'wp_make_content_images_responsive');
}
add_filter('customify_the_content', 'capital_P_dangit');
add_filter('customify_the_content', 'do_shortcode');
add_filter('customify_the_content', 'convert_smilies');
/**
* Same the hook `the_content` but not auto P
*
* @TODO: do not effect content by plugins
*
* 8 WP_Embed:run_shortcode
* 8 WP_Embed:autoembed
* 10 wptexturize
* 10 shortcode_unautop
* 10 prepend_attachment
* 10 wp_filter_content_tags || wp_make_content_images_responsive
* 11 capital_P_dangit
* 11 do_shortcode
* 20 convert_smilies
*/
add_filter('customify_the_title', array($wp_embed, 'run_shortcode'), 8);
add_filter('customify_the_title', array($wp_embed, 'autoembed'), 8);
add_filter('customify_the_title', 'wptexturize');
add_filter('customify_the_title', 'shortcode_unautop');
if (function_exists('wp_filter_content_tags')) {
add_filter('customify_the_title', 'wp_filter_content_tags');
} else {
add_filter('customify_the_title', 'wp_make_content_images_responsive');
}
add_filter('customify_the_title', 'capital_P_dangit');
add_filter('customify_the_title', 'do_shortcode');
add_filter('customify_the_title', 'convert_smilies');
// Include the main Customify class.
require_once get_template_directory() . '/inc/class-customify.php';
/**
* Main instance of Customify.
*
* Returns the main instance of Customify.
*
* @return Customify
*/
function Customify()
{
// phpc:ignore WordPress.NamingConventions.ValidFunctionName.
return Customify::get_instance();
}
Customify();