Manager::render_shortcode( array $arguments, string $content, string $shortcode )

Makes sure we are correctly handling the Shortcodes we manage.

Parameters #


(array) (Required) Set of arguments passed to the Shortcode at hand.


(string) (Required) Contents passed to the shortcode, inside of the open and close brackets.


(string) (Required) Which shortcode tag are we handling here.

Top ↑

Return #

(string) The rendered shortcode HTML.

Top ↑

Source #

File: src/Tribe/Shortcode/Manager.php

	public function render_shortcode( $arguments, $content, $shortcode ) {
		$registered_shortcodes = $this->get_registered_shortcodes();

		// Bail when we try to handle an unregistered shortcode (shouldn't happen)
		if ( ! $this->is_shortcode_registered( $shortcode ) ) {
			return false;

		/** @var Shortcode_Interface $instance */
		$instance = new $registered_shortcodes[ $shortcode ];
		$instance->setup( $arguments, $content );

		return $instance->get_html();

Top ↑

Changelog #

Version Description
4.12.0 Introduced.