PluginProbe
Code Snippets / 4.0.0-beta.2
Code Snippets v4.0.0-beta.2
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
← All changes | php/Model/Snippet.php +7 -0 3.10.24.0.0-beta.2 View file →
@@ -32,8 +32,10 @@
32 32 * @property string|null $code_error_trace Stack trace captured when last testing snippet code.
33 33 * @property int $revision Revision or version number of snippet.
34 34 * @property int $cloud_id The cloud ID of the snippet, if applicable.
35 35 * @property bool $is_cloud_owner Whether the user is the owner of the cloud snippet, if applicable.
36 + * @property int $created_by User ID of the snippet's original author. 0 if unknown.
37 + * @property int $updated_by User ID of the last person to save the snippet. 0 if unknown.
36 38 *
37 39 * @property-read int $last_active Timestamp of when the snippet was last active, if available.
38 40 * @property-read string $display_name The snippet name if it exists or a placeholder if it does not.
39 41 * @property-read string $tags_list The tags in string list format.
@@ -42,8 +44,9 @@
42 44 * @property-read string $type The type of snippet.
43 45 * @property-read string $lang The language that the snippet code is written in.
44 46 * @property-read int $modified_timestamp The last modification date in Unix timestamp format.
45 47 * @property-read DateTime $modified_local The last modification date in the local timezone.
48 + * @property-read DateTime $modified_iso The last modification date in ISO 8601 format.
46 49 * @property-read bool $is_pro Whether the snippet type is pro-only.
47 50 * @property-read string $cloud_id_owner Cloud ownership information as a single value, if applicable.
48 51 */
49 52 class Snippet extends Model {
@@ -82,8 +85,10 @@
82 85 'code_error_trace' => null,
83 86 'revision' => 1,
84 87 'cloud_id' => 0,
85 88 'is_cloud_owner' => false,
89 + 'created_by' => 0,
90 + 'updated_by' => 0,
86 91 ];
87 92
88 93 /**
89 94 * Field name aliases.
@@ -110,8 +115,10 @@
110 115 case 'priority':
111 116 case 'condition_id':
112 117 case 'cloud_id':
113 118 case 'revision':
119 + case 'created_by':
120 + case 'updated_by':
114 121 return absint( $value );
115 122
116 123 case 'tags':
117 124 return code_snippets_build_tags_array( $value );