summaryrefslogtreecommitdiffstats
path: root/wp-includes/class-wp-block-template.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:56:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:56:49 +0000
commita415c29efee45520ae252d2aa28f1083a521cd7b (patch)
treef4ade4b6668ecc0765de7e1424f7c1427ad433ff /wp-includes/class-wp-block-template.php
parentInitial commit. (diff)
downloadwordpress-a415c29efee45520ae252d2aa28f1083a521cd7b.tar.xz
wordpress-a415c29efee45520ae252d2aa28f1083a521cd7b.zip
Adding upstream version 6.4.3+dfsg1.upstream/6.4.3+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/class-wp-block-template.php')
-rw-r--r--wp-includes/class-wp-block-template.php157
1 files changed, 157 insertions, 0 deletions
diff --git a/wp-includes/class-wp-block-template.php b/wp-includes/class-wp-block-template.php
new file mode 100644
index 0000000..8149935
--- /dev/null
+++ b/wp-includes/class-wp-block-template.php
@@ -0,0 +1,157 @@
+<?php
+/**
+ * Blocks API: WP_Block_Template class
+ *
+ * @package WordPress
+ * @since 5.8.0
+ */
+
+/**
+ * Class representing a block template.
+ *
+ * @since 5.8.0
+ */
+#[AllowDynamicProperties]
+class WP_Block_Template {
+
+ /**
+ * Type: wp_template.
+ *
+ * @since 5.8.0
+ * @var string
+ */
+ public $type;
+
+ /**
+ * Theme.
+ *
+ * @since 5.8.0
+ * @var string
+ */
+ public $theme;
+
+ /**
+ * Template slug.
+ *
+ * @since 5.8.0
+ * @var string
+ */
+ public $slug;
+
+ /**
+ * ID.
+ *
+ * @since 5.8.0
+ * @var string
+ */
+ public $id;
+
+ /**
+ * Title.
+ *
+ * @since 5.8.0
+ * @var string
+ */
+ public $title = '';
+
+ /**
+ * Content.
+ *
+ * @since 5.8.0
+ * @var string
+ */
+ public $content = '';
+
+ /**
+ * Description.
+ *
+ * @since 5.8.0
+ * @var string
+ */
+ public $description = '';
+
+ /**
+ * Source of the content. `theme` and `custom` is used for now.
+ *
+ * @since 5.8.0
+ * @var string
+ */
+ public $source = 'theme';
+
+ /**
+ * Origin of the content when the content has been customized.
+ * When customized, origin takes on the value of source and source becomes
+ * 'custom'.
+ *
+ * @since 5.9.0
+ * @var string|null
+ */
+ public $origin;
+
+ /**
+ * Post ID.
+ *
+ * @since 5.8.0
+ * @var int|null
+ */
+ public $wp_id;
+
+ /**
+ * Template Status.
+ *
+ * @since 5.8.0
+ * @var string
+ */
+ public $status;
+
+ /**
+ * Whether a template is, or is based upon, an existing template file.
+ *
+ * @since 5.8.0
+ * @var bool
+ */
+ public $has_theme_file;
+
+ /**
+ * Whether a template is a custom template.
+ *
+ * @since 5.9.0
+ *
+ * @var bool
+ */
+ public $is_custom = true;
+
+ /**
+ * Author.
+ *
+ * A value of 0 means no author.
+ *
+ * @since 5.9.0
+ * @var int|null
+ */
+ public $author;
+
+ /**
+ * Post types.
+ *
+ * @since 5.9.0
+ * @var string[]|null
+ */
+ public $post_types;
+
+ /**
+ * Area.
+ *
+ * @since 5.9.0
+ * @var string|null
+ */
+ public $area;
+
+ /**
+ * Modified.
+ *
+ * @since 6.3.0
+ * @var string|null
+ */
+ public $modified;
+}