Automattic\WooCommerce\EmailEditor\Engine\Templates
Template::__construct
Constructor of the class.
Метод класса: Template{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Template = new Template(); $Template->__construct( $plugin_uri, $slug, $title, $description, $content, $post_types );
- $plugin_uri(строка) (обязательный)
- The plugin uri.
- $slug(строка) (обязательный)
- The template slug.
- $title(строка) (обязательный)
- The template title.
- $description(строка) (обязательный)
- The template description.
- $content(строка) (обязательный)
- The template content.
- $post_types(string[])
- The list of post types supported by the template.
По умолчанию: array()
Код Template::__construct() Template:: construct WC 9.9.5
public function __construct( string $plugin_uri, string $slug, string $title, string $description, string $content, array $post_types = array() ) { $this->plugin_uri = $plugin_uri; $this->slug = $slug; $this->name = "{$plugin_uri}//{$slug}"; // The template name is composed from the namespace and the slug. $this->title = $title; $this->description = $description; $this->content = $content; $this->post_types = $post_types; }