[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/ -> class-wp-block-template.php (source)

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


Generated : Thu Nov 21 08:20:01 2024 Cross-referenced by PHPXref