Last active
December 23, 2015 16:49
-
-
Save aprakasa/6664473 to your computer and use it in GitHub Desktop.
This file contains 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 | |
add_action( 'init', 'ap_enable_autoembed_intro' ); | |
/** | |
* Run shortcodes and enable autoembed at Genesis archive intro text. | |
*/ | |
function ap_enable_autoembed_intro(){ | |
/** Global $wp_embed */ | |
global $wp_embed; | |
/** For Registered Taxonomy Archive Intro Text */ | |
add_filter( 'genesis_term_intro_text_output', 'do_shortcode' ); | |
add_filter( 'genesis_term_intro_text_output', array( $wp_embed, 'run_shortcode'), 8 ); | |
add_filter( 'genesis_term_intro_text_output', array( $wp_embed, 'autoembed'), 8 ); | |
/** For Author Archive Intro Text */ | |
add_filter( 'genesis_author_intro_text_output', 'do_shortcode' ); | |
add_filter( 'genesis_author_intro_text_output', array( $wp_embed, 'run_shortcode'), 8 ); | |
add_filter( 'genesis_author_intro_text_output', array( $wp_embed, 'autoembed'), 8 ); | |
/** For Registered Post Type Archive Intro Text */ | |
add_filter( 'genesis_cpt_archive_intro_text_output', 'do_shortcode' ); | |
add_filter( 'genesis_cpt_archive_intro_text_output', array( $wp_embed, 'run_shortcode'), 8 ); | |
add_filter( 'genesis_cpt_archive_intro_text_output', array( $wp_embed, 'autoembed'), 8 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment