| 1 |
<?php |
| 2 |
/** |
| 3 |
* Blocks API: WP_Block_Template class |
| 4 |
* |
| 5 |
* @package WordPress |
| 6 |
* @since 5.5.0 |
| 7 |
*/ |
| 8 |
|
| 9 |
/** |
| 10 |
* Class representing a block template. |
| 11 |
*/ |
| 12 |
class WP_Block_Template { |
| 13 |
|
| 14 |
/** |
| 15 |
* Type: wp_template or wp_template_part |
| 16 |
* |
| 17 |
* @var string |
| 18 |
*/ |
| 19 |
public $type; |
| 20 |
|
| 21 |
/** |
| 22 |
* Theme. |
| 23 |
* |
| 24 |
* @var string |
| 25 |
*/ |
| 26 |
public $theme; |
| 27 |
|
| 28 |
/** |
| 29 |
* Template slug. |
| 30 |
* |
| 31 |
* @var string |
| 32 |
*/ |
| 33 |
public $slug; |
| 34 |
|
| 35 |
/** |
| 36 |
* Id. |
| 37 |
* |
| 38 |
* @var string |
| 39 |
*/ |
| 40 |
public $id; |
| 41 |
|
| 42 |
/** |
| 43 |
* Title. |
| 44 |
* |
| 45 |
* @var string |
| 46 |
*/ |
| 47 |
public $title = ''; |
| 48 |
|
| 49 |
/** |
| 50 |
* Content. |
| 51 |
* |
| 52 |
* @var string |
| 53 |
*/ |
| 54 |
public $content = ''; |
| 55 |
|
| 56 |
/** |
| 57 |
* Description. |
| 58 |
* |
| 59 |
* @var string |
| 60 |
*/ |
| 61 |
public $description = ''; |
| 62 |
|
| 63 |
/** |
| 64 |
* Source of the content. `theme` and `custom` is used for now. |
| 65 |
* |
| 66 |
* @var string |
| 67 |
*/ |
| 68 |
public $source = 'theme'; |
| 69 |
|
| 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 |
* @var string |
| 76 |
*/ |
| 77 |
public $origin; |
| 78 |
|
| 79 |
/** |
| 80 |
* Post Id. |
| 81 |
* |
| 82 |
* @var integer|null |
| 83 |
*/ |
| 84 |
public $wp_id; |
| 85 |
|
| 86 |
/** |
| 87 |
* Template Status. |
| 88 |
* |
| 89 |
* @var string |
| 90 |
*/ |
| 91 |
public $status; |
| 92 |
|
| 93 |
/** |
| 94 |
* Whether a template is, or is based upon, an existing template file. |
| 95 |
* |
| 96 |
* @var boolean |
| 97 |
*/ |
| 98 |
public $has_theme_file; |
| 99 |
|
| 100 |
/** |
| 101 |
* Whether a template is a custom template. |
| 102 |
* |
| 103 |
* @var bool |
| 104 |
*/ |
| 105 |
public $is_custom = true; |
| 106 |
|
| 107 |
/** |
| 108 |
* Author. |
| 109 |
* |
| 110 |
* A value of 0 means no author. |
| 111 |
* |
| 112 |
* @var int |
| 113 |
*/ |
| 114 |
public $author = 0; |
| 115 |
} |
| 116 |
|