Tribe__Events__Editor__Template__Overwrite::hook()

Hook into the Events Template single page to allow Blocks to be properly reordered


Return

(void)


Top ↑

Source

File: src/Tribe/Editor/Template/Overwrite.php

	public function hook() {
		/**
		 * @todo remove filter if WP 5.0 patches this function and filter
		 */
		if ( ! function_exists( 'gutenberg_disable_editor_settings_wpautop' ) ) {
			add_filter( 'wp_editor_settings', array( $this, 'disable_editor_settings_wpautop' ), 10, 2 );
		}

		/**
		 * @todo remove filter if WP 5.0 patches this function and filter
		 */
		if ( ! function_exists( 'gutenberg_wpautop' ) ) {
			remove_filter( 'the_content', 'wpautop' );
			add_filter( 'the_content', array( $this, 'wpautop' ), 6 );
		}

		add_filter( 'tribe_events_template_single-event.php', array( $this, 'silence' ) );
		add_action( 'tribe_events_before_view', array( $this, 'include_blocks' ), 1, PHP_INT_MAX );
	}

Top ↑

Changelog

Changelog
Version Description
4.7 Introduced.