@@ -107,11 +107,11 @@ |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |
110 | - * Registers a Meta Data object as defined REST field. |
|
111 | - * |
|
112 | - * @param \PinkCrab\Registerables\Meta_Data $meta |
|
113 | - * @return void |
|
114 | - */ |
|
110 | + * Registers a Meta Data object as defined REST field. |
|
111 | + * |
|
112 | + * @param \PinkCrab\Registerables\Meta_Data $meta |
|
113 | + * @return void |
|
114 | + */ |
|
115 | 115 | public function register_meta_rest_field( Meta_Data $meta ) { |
116 | 116 | // Skip if not sub type defined for post or term. |
117 | 117 | if ( null === $meta->get_subtype() ) { |
@@ -72,15 +72,15 @@ discard block |
||
72 | 72 | protected $default = ''; |
73 | 73 | |
74 | 74 | /** |
75 | - * The meta fields callbacks |
|
76 | - * |
|
77 | - * @var array{ |
|
78 | - * sanitize: null|callable, |
|
79 | - * permissions: null|callable, |
|
80 | - * rest_view: null|callable(mixed[]): void, |
|
81 | - * rest_update: null|callable(mixed,\WP_Post|\WP_Term|\WP_User|\WP_Comment): void |
|
82 | - * } |
|
83 | - */ |
|
75 | + * The meta fields callbacks |
|
76 | + * |
|
77 | + * @var array{ |
|
78 | + * sanitize: null|callable, |
|
79 | + * permissions: null|callable, |
|
80 | + * rest_view: null|callable(mixed[]): void, |
|
81 | + * rest_update: null|callable(mixed,\WP_Post|\WP_Term|\WP_User|\WP_Comment): void |
|
82 | + * } |
|
83 | + */ |
|
84 | 84 | protected $callbacks = array( |
85 | 85 | 'sanitize' => null, |
86 | 86 | 'permissions' => null, |
@@ -233,11 +233,11 @@ discard block |
||
233 | 233 | } |
234 | 234 | |
235 | 235 | /** |
236 | - * Sets the GET callback for REST requests. |
|
237 | - * |
|
238 | - * @param callable|null $callback |
|
239 | - * @return self |
|
240 | - */ |
|
236 | + * Sets the GET callback for REST requests. |
|
237 | + * |
|
238 | + * @param callable|null $callback |
|
239 | + * @return self |
|
240 | + */ |
|
241 | 241 | public function rest_view( ?callable $callback ): self { |
242 | 242 | $this->callbacks['rest_view'] = $callback; |
243 | 243 | return $this; |
@@ -314,10 +314,10 @@ discard block |
||
314 | 314 | } |
315 | 315 | |
316 | 316 | /** |
317 | - * Gets the GET callback for REST requests. |
|
318 | - * |
|
319 | - * @return null|callable(mixed[]): void |
|
320 | - */ |
|
317 | + * Gets the GET callback for REST requests. |
|
318 | + * |
|
319 | + * @return null|callable(mixed[]): void |
|
320 | + */ |
|
321 | 321 | public function get_rest_view(): ?callable { |
322 | 322 | return $this->callbacks['rest_view']; |
323 | 323 | } |