This repository was archived by the owner on Sep 3, 2020. It is now read-only.
forked from PressMaximum/customify
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
78 lines (71 loc) · 2.2 KB
/
functions.php
File metadata and controls
78 lines (71 loc) · 2.2 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
<?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_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' );
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_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' );
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();