Helper::is_autoembed_allowed()

Check if embedding is allowed.


Description

Used to check if autoembedding in post content is prevented by using the available filters.


Return

(bool) Embed is allowed (true) or is prevented (false).


Source

File: includes/libs/helper.class.php

	public static function is_autoembed_allowed(){

		$allowed = true;

		if( !is_admin() ){
			/**
			 * Filter that can prevent video embedding into the post content.
			 * Preventing the video embedding into the post content is useful when using custom theme templates for the video posts.
			 *
			 * @param bool $allow Allow automatic embedding into the post content (true) or prevent it (false).
			 */
			$allowed =  apply_filters( 'vimeotheque\post_content_embed', true );;
		}

		return $allowed;
	}

Start your video site now!

Manage and coordinate your Vimeo channels, albums or videos with your WordPress website. Perfect fit for membership, portfolio, online courses or any type of video collection.

Get Vimeotheque PRO!