@@ -6,19 +6,19 @@ |
||
6 | 6 | |
7 | 7 | class BuilderDefaults extends Defaults |
8 | 8 | { |
9 | - /** |
|
10 | - * @return array |
|
11 | - */ |
|
12 | - protected function defaults() |
|
13 | - { |
|
14 | - return [ |
|
15 | - 'class' => '', |
|
16 | - 'id' => '', |
|
17 | - 'label' => '', |
|
18 | - 'options' => [], |
|
19 | - 'text' => '', |
|
20 | - 'type' => '', |
|
21 | - 'value' => '', |
|
22 | - ]; |
|
23 | - } |
|
9 | + /** |
|
10 | + * @return array |
|
11 | + */ |
|
12 | + protected function defaults() |
|
13 | + { |
|
14 | + return [ |
|
15 | + 'class' => '', |
|
16 | + 'id' => '', |
|
17 | + 'label' => '', |
|
18 | + 'options' => [], |
|
19 | + 'text' => '', |
|
20 | + 'type' => '', |
|
21 | + 'value' => '', |
|
22 | + ]; |
|
23 | + } |
|
24 | 24 | } |
@@ -6,32 +6,32 @@ |
||
6 | 6 | |
7 | 7 | class PostTypeDefaults extends Defaults |
8 | 8 | { |
9 | - /** |
|
10 | - * @return array |
|
11 | - */ |
|
12 | - protected function defaults() |
|
13 | - { |
|
14 | - return [ |
|
15 | - 'columns' => [ |
|
16 | - 'title' => __('Title', 'site-reviews'), |
|
17 | - 'date' => __('Date', 'site-reviews'), |
|
18 | - ], |
|
19 | - 'has_archive' => false, |
|
20 | - 'hierarchical' => false, |
|
21 | - 'labels' => [], |
|
22 | - 'menu_icon' => null, |
|
23 | - 'menu_name' => '', |
|
24 | - 'menu_position' => 25, |
|
25 | - 'plural' => '', //Required |
|
26 | - 'post_type' => '', //Required |
|
27 | - 'public' => false, |
|
28 | - 'query_var' => true, |
|
29 | - 'rewrite' => ['with_front' => false], |
|
30 | - 'show_in_menu' => true, |
|
31 | - 'show_ui' => true, |
|
32 | - 'single' => '', //Required |
|
33 | - 'supports' => ['title', 'editor'], |
|
34 | - 'taxonomies' => [], |
|
35 | - ]; |
|
36 | - } |
|
9 | + /** |
|
10 | + * @return array |
|
11 | + */ |
|
12 | + protected function defaults() |
|
13 | + { |
|
14 | + return [ |
|
15 | + 'columns' => [ |
|
16 | + 'title' => __('Title', 'site-reviews'), |
|
17 | + 'date' => __('Date', 'site-reviews'), |
|
18 | + ], |
|
19 | + 'has_archive' => false, |
|
20 | + 'hierarchical' => false, |
|
21 | + 'labels' => [], |
|
22 | + 'menu_icon' => null, |
|
23 | + 'menu_name' => '', |
|
24 | + 'menu_position' => 25, |
|
25 | + 'plural' => '', //Required |
|
26 | + 'post_type' => '', //Required |
|
27 | + 'public' => false, |
|
28 | + 'query_var' => true, |
|
29 | + 'rewrite' => ['with_front' => false], |
|
30 | + 'show_in_menu' => true, |
|
31 | + 'show_ui' => true, |
|
32 | + 'single' => '', //Required |
|
33 | + 'supports' => ['title', 'editor'], |
|
34 | + 'taxonomies' => [], |
|
35 | + ]; |
|
36 | + } |
|
37 | 37 | } |
@@ -11,27 +11,27 @@ |
||
11 | 11 | |
12 | 12 | class RestCategoryController extends RestController |
13 | 13 | { |
14 | - public function __construct() |
|
15 | - { |
|
16 | - $this->meta = new WP_REST_Term_Meta_Fields(Application::TAXONOMY); |
|
17 | - $this->namespace = Application::ID.'/v1'; |
|
18 | - $this->rest_base = 'categories'; |
|
19 | - $this->taxonomy = Application::TAXONOMY; |
|
20 | - } |
|
14 | + public function __construct() |
|
15 | + { |
|
16 | + $this->meta = new WP_REST_Term_Meta_Fields(Application::TAXONOMY); |
|
17 | + $this->namespace = Application::ID.'/v1'; |
|
18 | + $this->rest_base = 'categories'; |
|
19 | + $this->taxonomy = Application::TAXONOMY; |
|
20 | + } |
|
21 | 21 | |
22 | - /** |
|
23 | - * @return void |
|
24 | - */ |
|
25 | - public function register_routes() |
|
26 | - { |
|
27 | - register_rest_route($this->namespace, '/'.$this->rest_base, [ |
|
28 | - [ |
|
29 | - 'args' => $this->get_collection_params(), |
|
30 | - 'callback' => [$this, 'get_items'], |
|
31 | - 'methods' => Server::READABLE, |
|
32 | - 'permission_callback' => [$this, 'get_items_permissions_check'], |
|
33 | - ], |
|
34 | - 'schema' => [$this, 'get_public_item_schema'], |
|
35 | - ]); |
|
36 | - } |
|
22 | + /** |
|
23 | + * @return void |
|
24 | + */ |
|
25 | + public function register_routes() |
|
26 | + { |
|
27 | + register_rest_route($this->namespace, '/'.$this->rest_base, [ |
|
28 | + [ |
|
29 | + 'args' => $this->get_collection_params(), |
|
30 | + 'callback' => [$this, 'get_items'], |
|
31 | + 'methods' => Server::READABLE, |
|
32 | + 'permission_callback' => [$this, 'get_items_permissions_check'], |
|
33 | + ], |
|
34 | + 'schema' => [$this, 'get_public_item_schema'], |
|
35 | + ]); |
|
36 | + } |
|
37 | 37 | } |
@@ -4,14 +4,14 @@ |
||
4 | 4 | |
5 | 5 | class TogglePinned |
6 | 6 | { |
7 | - public $id; |
|
8 | - public $pinned; |
|
7 | + public $id; |
|
8 | + public $pinned; |
|
9 | 9 | |
10 | - public function __construct($input) |
|
11 | - { |
|
12 | - $this->id = $input['id']; |
|
13 | - $this->pinned = isset($input['pinned']) |
|
14 | - ? wp_validate_boolean($input['pinned']) |
|
15 | - : null; |
|
16 | - } |
|
10 | + public function __construct($input) |
|
11 | + { |
|
12 | + $this->id = $input['id']; |
|
13 | + $this->pinned = isset($input['pinned']) |
|
14 | + ? wp_validate_boolean($input['pinned']) |
|
15 | + : null; |
|
16 | + } |
|
17 | 17 | } |
@@ -4,14 +4,14 @@ |
||
4 | 4 | |
5 | 5 | class ChangeStatus |
6 | 6 | { |
7 | - public $id; |
|
8 | - public $status; |
|
7 | + public $id; |
|
8 | + public $status; |
|
9 | 9 | |
10 | - public function __construct($input) |
|
11 | - { |
|
12 | - $this->id = $input['post_id']; |
|
13 | - $this->status = 'approve' == $input['status'] |
|
14 | - ? 'publish' |
|
15 | - : 'pending'; |
|
16 | - } |
|
10 | + public function __construct($input) |
|
11 | + { |
|
12 | + $this->id = $input['post_id']; |
|
13 | + $this->status = 'approve' == $input['status'] |
|
14 | + ? 'publish' |
|
15 | + : 'pending'; |
|
16 | + } |
|
17 | 17 | } |
@@ -4,10 +4,10 @@ |
||
4 | 4 | |
5 | 5 | class RegisterTinymcePopups |
6 | 6 | { |
7 | - public $popups; |
|
7 | + public $popups; |
|
8 | 8 | |
9 | - public function __construct($input) |
|
10 | - { |
|
11 | - $this->popups = $input; |
|
12 | - } |
|
9 | + public function __construct($input) |
|
10 | + { |
|
11 | + $this->popups = $input; |
|
12 | + } |
|
13 | 13 | } |
@@ -4,10 +4,10 @@ |
||
4 | 4 | |
5 | 5 | class RegisterTaxonomy |
6 | 6 | { |
7 | - public $args; |
|
7 | + public $args; |
|
8 | 8 | |
9 | - public function __construct($input) |
|
10 | - { |
|
11 | - $this->args = $input; |
|
12 | - } |
|
9 | + public function __construct($input) |
|
10 | + { |
|
11 | + $this->args = $input; |
|
12 | + } |
|
13 | 13 | } |
@@ -4,10 +4,10 @@ |
||
4 | 4 | |
5 | 5 | class EnqueueAdminAssets |
6 | 6 | { |
7 | - public $pointers; |
|
7 | + public $pointers; |
|
8 | 8 | |
9 | - public function __construct(array $input) |
|
10 | - { |
|
11 | - $this->pointers = $input['pointers']; |
|
12 | - } |
|
9 | + public function __construct(array $input) |
|
10 | + { |
|
11 | + $this->pointers = $input['pointers']; |
|
12 | + } |
|
13 | 13 | } |
@@ -4,10 +4,10 @@ |
||
4 | 4 | |
5 | 5 | class RegisterShortcodes |
6 | 6 | { |
7 | - public $shortcodes; |
|
7 | + public $shortcodes; |
|
8 | 8 | |
9 | - public function __construct($input) |
|
10 | - { |
|
11 | - $this->shortcodes = $input; |
|
12 | - } |
|
9 | + public function __construct($input) |
|
10 | + { |
|
11 | + $this->shortcodes = $input; |
|
12 | + } |
|
13 | 13 | } |