WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Embed::run_shortcode() public WP 1.0

Process the shortcode.

Since the shortcode needs to be run earlier than other shortcodes, this function removes all existing shortcodes, registers the shortcode, calls do_shortcode(), and then re-registers the old shortcodes.

Это метод класса: WP_Embed{}

Хуков нет.

Возвращает

Строку. Content with shortcode parsed

Использование

$WP_Embed = new WP_Embed();
$WP_Embed->run_shortcode( $content );
$content(строка) (обязательный)
Content to parse

Заметки

  • Global. Массив. $shortcode_tags

Код WP_Embed::run_shortcode() WP 5.5.1

wp-includes/class-wp-embed.php
<?php
public function run_shortcode( $content ) {
	global $shortcode_tags;

	// Back up current registered shortcodes and clear them all out.
	$orig_shortcode_tags = $shortcode_tags;
	remove_all_shortcodes();

	add_shortcode( 'embed', array( $this, 'shortcode' ) );

	// Do the shortcode (only the [embed] one is registered).
	$content = do_shortcode( $content, true );

	// Put the original shortcodes back.
	$shortcode_tags = $orig_shortcode_tags;

	return $content;
}