@@ -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() ) { |
@@ -70,15 +70,15 @@ discard block |
||
| 70 | 70 | protected $default = ''; |
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | - * The meta fields callbacks |
|
| 74 | - * |
|
| 75 | - * @var array{ |
|
| 76 | - * sanitize: null|callable, |
|
| 77 | - * permissions: null|callable, |
|
| 78 | - * rest_view: null|callable(mixed[]): void, |
|
| 79 | - * rest_update: null|callable(mixed,\WP_Post|\WP_Term|\WP_User|\WP_Comment): void |
|
| 80 | - * } |
|
| 81 | - */ |
|
| 73 | + * The meta fields callbacks |
|
| 74 | + * |
|
| 75 | + * @var array{ |
|
| 76 | + * sanitize: null|callable, |
|
| 77 | + * permissions: null|callable, |
|
| 78 | + * rest_view: null|callable(mixed[]): void, |
|
| 79 | + * rest_update: null|callable(mixed,\WP_Post|\WP_Term|\WP_User|\WP_Comment): void |
|
| 80 | + * } |
|
| 81 | + */ |
|
| 82 | 82 | protected array $callbacks = array( |
| 83 | 83 | 'sanitize' => null, |
| 84 | 84 | 'permissions' => null, |
@@ -231,11 +231,11 @@ discard block |
||
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | /** |
| 234 | - * Sets the GET callback for REST requests. |
|
| 235 | - * |
|
| 236 | - * @param callable|null $callback |
|
| 237 | - * @return self |
|
| 238 | - */ |
|
| 234 | + * Sets the GET callback for REST requests. |
|
| 235 | + * |
|
| 236 | + * @param callable|null $callback |
|
| 237 | + * @return self |
|
| 238 | + */ |
|
| 239 | 239 | public function rest_view( ?callable $callback ): self { |
| 240 | 240 | $this->callbacks['rest_view'] = $callback; |
| 241 | 241 | return $this; |
@@ -312,10 +312,10 @@ discard block |
||
| 312 | 312 | } |
| 313 | 313 | |
| 314 | 314 | /** |
| 315 | - * Gets the GET callback for REST requests. |
|
| 316 | - * |
|
| 317 | - * @return null|callable(mixed[]): void |
|
| 318 | - */ |
|
| 315 | + * Gets the GET callback for REST requests. |
|
| 316 | + * |
|
| 317 | + * @return null|callable(mixed[]): void |
|
| 318 | + */ |
|
| 319 | 319 | public function get_rest_view(): ?callable { |
| 320 | 320 | return $this->callbacks['rest_view']; |
| 321 | 321 | } |