Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Your code goes below
- */
- /**
- * The template for displaying the Promotion Headline
- *
- * @package Decree Pro
- */
- if ( ! function_exists( 'decree_promo_head_display' ) ) :
- /**
- * Add Promotion Headline.
- *
- * @uses action hook decree_before_content
- *
- * @since Decree Pro 1.0
- */
- function decree_promo_head_display() {
- //decree_flush_transients();
- $output = '';
- $options = decree_get_theme_options();
- $enable_content = $options['promo_head_option'];
- $content_select = $options['promo_head_type'];
- if ( decree_check_section( $enable_content ) ) {
- if ( ! $output = get_transient( 'decree_promotion_headline' ) ) {
- echo '<!-- refreshing cache -->';
- $classes[] = $content_select ;
- $output ='
- <div id="promotion-headline-section" class="sections ' . implode( ' ', $classes ) . '">
- <div class="wrapper">';
- // Select content
- if ( 'demo' === $content_select ) {
- $output .= decree_demo_promotion_headline();
- }
- elseif ( 'post' === $content_select || 'page' === $content_select || 'category' === $content_select ) {
- $output .= decree_post_page_category_promotion_headline( $options );
- }
- elseif ( 'custom' === $content_select ) {
- $output .= decree_custom_promotion_headline( $options );
- }
- $output .= '
- </div><!-- .wrapper -->
- </div><!-- #promotion-section -->';
- }
- set_transient( 'decree_promotion_headline', $output, 86940 );
- }
- echo $output;
- }
- endif;
- add_action( 'decree_footer', 'decree_promo_head_display', 30 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement