tribe_doing_shortcode( null|string $tag = null )

Check whether a specific shortcode is being run.

This is limited to only shortcodes registered with Tribe\Shortcode\Manager.


Parameters #

$tag

(null|string) (Optional) The shortcode tag name, or null to check if doing any shortcode.

Default value: null


Top ↑

Return #

(bool) Whether the shortcode is currently being run.


Top ↑

Source #

File: src/functions/template-tags/general.php

	function tribe_doing_shortcode( $tag = null ) {
		return tribe( 'shortcode.manager' )->is_doing_shortcode( $tag );
	}

Top ↑

Changelog #

Changelog
Version Description
4.12.10 Introduced.