[ Index ]

PHP Cross Reference of WordPress

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


Generated: Sat Nov 23 01:00:02 2024 Cross-referenced by PHPXref 0.7.1