No Description

class-wp-block-template.php 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?php
  2. /**
  3. * Blocks API: WP_Block_Template class
  4. *
  5. * @package WordPress
  6. * @since 5.8.0
  7. */
  8. /**
  9. * Class representing a block template.
  10. *
  11. * @since 5.8.0
  12. */
  13. class WP_Block_Template {
  14. /**
  15. * Type: wp_template.
  16. *
  17. * @since 5.8.0
  18. * @var string
  19. */
  20. public $type;
  21. /**
  22. * Theme.
  23. *
  24. * @since 5.8.0
  25. * @var string
  26. */
  27. public $theme;
  28. /**
  29. * Template slug.
  30. *
  31. * @since 5.8.0
  32. * @var string
  33. */
  34. public $slug;
  35. /**
  36. * ID.
  37. *
  38. * @since 5.8.0
  39. * @var string
  40. */
  41. public $id;
  42. /**
  43. * Title.
  44. *
  45. * @since 5.8.0
  46. * @var string
  47. */
  48. public $title = '';
  49. /**
  50. * Content.
  51. *
  52. * @since 5.8.0
  53. * @var string
  54. */
  55. public $content = '';
  56. /**
  57. * Description.
  58. *
  59. * @since 5.8.0
  60. * @var string
  61. */
  62. public $description = '';
  63. /**
  64. * Source of the content. `theme` and `custom` is used for now.
  65. *
  66. * @since 5.8.0
  67. * @var string
  68. */
  69. public $source = 'theme';
  70. /**
  71. * Origin of the content when the content has been customized.
  72. * When customized, origin takes on the value of source and source becomes
  73. * 'custom'.
  74. *
  75. * @since 5.9.0
  76. * @var string
  77. */
  78. public $origin;
  79. /**
  80. * Post ID.
  81. *
  82. * @since 5.8.0
  83. * @var int|null
  84. */
  85. public $wp_id;
  86. /**
  87. * Template Status.
  88. *
  89. * @since 5.8.0
  90. * @var string
  91. */
  92. public $status;
  93. /**
  94. * Whether a template is, or is based upon, an existing template file.
  95. *
  96. * @since 5.8.0
  97. * @var bool
  98. */
  99. public $has_theme_file;
  100. /**
  101. * Whether a template is a custom template.
  102. *
  103. * @since 5.9.0
  104. *
  105. * @var bool
  106. */
  107. public $is_custom = true;
  108. /**
  109. * Author.
  110. *
  111. * A value of 0 means no author.
  112. *
  113. * @since 5.9.0
  114. * @var int
  115. */
  116. public $author;
  117. /**
  118. * Post types.
  119. *
  120. * @since 5.9.0
  121. * @var array
  122. */
  123. public $post_types;
  124. /**
  125. * Area.
  126. *
  127. * @since 5.9.0
  128. * @var string
  129. */
  130. public $area;
  131. }