WPCF7_ShortcodeManager{}CF7 1.0

Хуков нет.

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

$WPCF7_ShortcodeManager = new WPCF7_ShortcodeManager();
// use class methods

Методы

  1. public static get_instance()
  2. public get_scanned_tags()
  3. public add_shortcode( $tag, $callback, $has_name = false )
  4. public remove_shortcode( $tag )
  5. public normalize_shortcode( $content )
  6. public do_shortcode( $content, $exec = true )
  7. public scan_shortcode( $content )
  8. private __construct()

Код WPCF7_ShortcodeManager{} CF7 6.1.7

class WPCF7_ShortcodeManager {

	private static $form_tags_manager;

	private function __construct() {}

	public static function get_instance() {
		wpcf7_deprecated_function( __METHOD__, '4.6',
			'WPCF7_FormTagsManager::get_instance'
		);

		self::$form_tags_manager = WPCF7_FormTagsManager::get_instance();
		return new self();
	}

	public function get_scanned_tags() {
		wpcf7_deprecated_function( __METHOD__, '4.6',
			'WPCF7_FormTagsManager::get_scanned_tags'
		);

		return self::$form_tags_manager->get_scanned_tags();
	}

	public function add_shortcode( $tag, $callback, $has_name = false ) {
		wpcf7_deprecated_function( __METHOD__, '4.6',
			'WPCF7_FormTagsManager::add'
		);

		return self::$form_tags_manager->add( $tag, $callback, $has_name );
	}

	public function remove_shortcode( $tag ) {
		wpcf7_deprecated_function( __METHOD__, '4.6',
			'WPCF7_FormTagsManager::remove'
		);

		return self::$form_tags_manager->remove( $tag );
	}

	public function normalize_shortcode( $content ) {
		wpcf7_deprecated_function( __METHOD__, '4.6',
			'WPCF7_FormTagsManager::normalize'
		);

		return self::$form_tags_manager->normalize( $content );
	}

	public function do_shortcode( $content, $exec = true ) {
		wpcf7_deprecated_function( __METHOD__, '4.6',
			'WPCF7_FormTagsManager::replace_all'
		);

		if ( $exec ) {
			return self::$form_tags_manager->replace_all( $content );
		} else {
			return self::$form_tags_manager->scan( $content );
		}
	}

	public function scan_shortcode( $content ) {
		wpcf7_deprecated_function( __METHOD__, '4.6',
			'WPCF7_FormTagsManager::scan'
		);

		return self::$form_tags_manager->scan( $content );
	}
}