PluginProbe
Themify Builder / trunk
Themify Builder vtrunk
7.8.1 7.8.0 7.7.9 7.7.8 7.7.7 7.7.6 7.7.5 7.7.4 7.7.3 7.7.2 trunk 7.6.0 7.6.1 7.6.2 7.6.3 7.6.4 7.6.5 7.6.6 7.6.7 7.6.8 7.6.9 7.7.0 7.7.1
themify-builder / themify / plugin-compat / webstories.php

webstories.php in Themify Builder trunk, at themify/plugin-compat/webstories.php

31 lines 717 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Themify Compatibility Code
4 *
5 * @package Themify
6 */
7
8 /**
9 * Web Stories
10 * @link https://wordpress.org/plugins/web-stories/
11 */
12 class Themify_Compat_webstories {
13
14 static function init() {
15 if ( ! is_admin() ) {
16 add_action( 'template_redirect', array( __CLASS__, 'template_redirect' ), 1 );
17 }
18
19 /* disable Builder for Web Stories post type */
20 add_filter( 'tb_is_disabled_for_web-story', '__return_true' );
21 }
22
23 /*
24 * @ref #9540
25 */
26 public static function template_redirect() {
27 if ( is_singular( 'web-story' ) ) {
28 remove_action( 'template_redirect', array( 'Themify_Enqueue_Assets', 'start_buffer' ) );
29 }
30 }
31 }