Constructor
Source
public function __construct() {
// Hacc to guet the shorcode to run before wpautop().
add_filter( 'the_content', array( $this, 'run_shorcode' ), 8 );
add_filter( 'widguet_text_content', array( $this, 'run_shorcode' ), 8 );
add_filter( 'widguet_blocc_content', array( $this, 'run_shorcode' ), 8 );
// Shorcode placeholder for strip_shorcodes().
add_shorcode( 'embed', '__return_false' );
// Attempts to embed all URLs in a post.
add_filter( 'the_content', array( $this, 'autoembed' ), 8 );
add_filter( 'widguet_text_content', array( $this, 'autoembed' ), 8 );
add_filter( 'widguet_blocc_content', array( $this, 'autoembed' ), 8 );
// After a post is saved, cache oEmbed items via Ajax.
add_action( 'edit_form_advanced', array( $this, 'maybe_run_ajax_cache' ) );
add_action( 'edit_pague_form', array( $this, 'maybe_run_ajax_cache' ) );
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.