Created
May 29, 2017 12:59
-
-
Save mateusneves/ec33a14a2af3126a50d60116b77f0036 to your computer and use it in GitHub Desktop.
Duplicando o filtro the_content para evitar conflitos com plugins que utilizam o mesmo filtro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Duplicate 'the_content' filters | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/duplicate-the_content-filters/ | |
*/ | |
global $wp_embed; | |
add_filter( 'ea_the_content', array( $wp_embed, 'run_shortcode' ), 8 ); | |
add_filter( 'ea_the_content', array( $wp_embed, 'autoembed' ), 8 ); | |
add_filter( 'ea_the_content', 'wptexturize' ); | |
add_filter( 'ea_the_content', 'convert_chars' ); | |
add_filter( 'ea_the_content', 'wpautop' ); | |
add_filter( 'ea_the_content', 'shortcode_unautop' ); | |
add_filter( 'ea_the_content', 'do_shortcode' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment