php 创世纪档案描述oEmbed Shortcode支持
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 创世纪档案描述oEmbed Shortcode支持相关的知识,希望对你有一定的参考价值。
<?php
//don't add again
add_action( 'genesis_before', 'your_prefix_embed_shortcode_archive_intro_text_support' );
/**
* Add oEmbed and Shortcode support Genesis archive description
*/
function your_prefix_embed_shortcode_archive_intro_text_support() {
global $wp_embed;
// Allow shortcodes and embeds on Genesis Archive Intro Text Tags and Categories
if ( is_category() || is_tag() || is_tax() ) :
add_filter( 'genesis_term_intro_text_output', array( $wp_embed, 'autoembed' ) );
add_filter( 'genesis_term_intro_text_output', 'do_shortcode' );
endif;
// Allow shortcodes and embeds on CPT archive descriptions
if ( is_post_type_archive() && genesis_has_post_type_archive_support() ) :
add_filter( 'genesis_cpt_archive_intro_text_output', array( $wp_embed, 'autoembed') );
add_filter( 'genesis_cpt_archive_intro_text_output', 'do_shortcode' );
endif;
// Allow shortcodes and embeds on Genesis Author Intro Text
if ( is_author() ) :
add_filter( 'genesis_author_intro_text_output', array( $wp_embed, 'autoembed') );
add_filter( 'genesis_author_intro_text_output', 'do_shortcode' );
endif;
}
以上是关于php 创世纪档案描述oEmbed Shortcode支持的主要内容,如果未能解决你的问题,请参考以下文章