@@ -6,32 +6,32 @@ |
||
6 | 6 | |
7 | 7 | class SiteReviewsSummaryDefaults extends Defaults |
8 | 8 | { |
9 | - /** |
|
10 | - * @var array |
|
11 | - */ |
|
12 | - protected $guarded = [ |
|
13 | - 'labels', |
|
14 | - 'text', |
|
15 | - 'title', |
|
16 | - ]; |
|
9 | + /** |
|
10 | + * @var array |
|
11 | + */ |
|
12 | + protected $guarded = [ |
|
13 | + 'labels', |
|
14 | + 'text', |
|
15 | + 'title', |
|
16 | + ]; |
|
17 | 17 | |
18 | - /** |
|
19 | - * @return array |
|
20 | - */ |
|
21 | - protected function defaults() |
|
22 | - { |
|
23 | - return [ |
|
24 | - 'assigned_to' => '', |
|
25 | - 'category' => '', |
|
26 | - 'class' => '', |
|
27 | - 'hide' => '', |
|
28 | - 'id' => '', |
|
29 | - 'labels' => '', |
|
30 | - 'rating' => 1, |
|
31 | - 'schema' => false, |
|
32 | - 'text' => '', |
|
33 | - 'title' => '', |
|
34 | - 'type' => 'local', |
|
35 | - ]; |
|
36 | - } |
|
18 | + /** |
|
19 | + * @return array |
|
20 | + */ |
|
21 | + protected function defaults() |
|
22 | + { |
|
23 | + return [ |
|
24 | + 'assigned_to' => '', |
|
25 | + 'category' => '', |
|
26 | + 'class' => '', |
|
27 | + 'hide' => '', |
|
28 | + 'id' => '', |
|
29 | + 'labels' => '', |
|
30 | + 'rating' => 1, |
|
31 | + 'schema' => false, |
|
32 | + 'text' => '', |
|
33 | + 'title' => '', |
|
34 | + 'type' => 'local', |
|
35 | + ]; |
|
36 | + } |
|
37 | 37 | } |
@@ -6,24 +6,24 @@ |
||
6 | 6 | |
7 | 7 | class ValidationStringsDefaults extends Defaults |
8 | 8 | { |
9 | - /** |
|
10 | - * @return array |
|
11 | - */ |
|
12 | - protected function defaults() |
|
13 | - { |
|
14 | - return [ |
|
15 | - 'accepted' => __('This field must be accepted.', 'site-reviews'), |
|
16 | - 'between' => __('This field value must be between %s and %s.', 'site-reviews'), |
|
17 | - 'betweenlength' => __('This field must have between %s and %s characters.', 'site-reviews'), |
|
18 | - 'email' => __('This field requires a valid e-mail address.', 'site-reviews'), |
|
19 | - 'errors' => __('Please fix the submission errors.', 'site-reviews'), |
|
20 | - 'max' => __('Maximum value for this field is %s.', 'site-reviews'), |
|
21 | - 'maxlength' => __('This field allows a maximum of %s characters.', 'site-reviews'), |
|
22 | - 'min' => __('Minimum value for this field is %s.', 'site-reviews'), |
|
23 | - 'minlength' => __('This field requires a minimum of %s characters.', 'site-reviews'), |
|
24 | - 'number' => __('This field requires a number.', 'site-reviews'), |
|
25 | - 'required' => __('This field is required.', 'site-reviews'), |
|
26 | - 'unsupported' => __('The review could not be submitted (unsupported browser).', 'site-reviews'), |
|
27 | - ]; |
|
28 | - } |
|
9 | + /** |
|
10 | + * @return array |
|
11 | + */ |
|
12 | + protected function defaults() |
|
13 | + { |
|
14 | + return [ |
|
15 | + 'accepted' => __('This field must be accepted.', 'site-reviews'), |
|
16 | + 'between' => __('This field value must be between %s and %s.', 'site-reviews'), |
|
17 | + 'betweenlength' => __('This field must have between %s and %s characters.', 'site-reviews'), |
|
18 | + 'email' => __('This field requires a valid e-mail address.', 'site-reviews'), |
|
19 | + 'errors' => __('Please fix the submission errors.', 'site-reviews'), |
|
20 | + 'max' => __('Maximum value for this field is %s.', 'site-reviews'), |
|
21 | + 'maxlength' => __('This field allows a maximum of %s characters.', 'site-reviews'), |
|
22 | + 'min' => __('Minimum value for this field is %s.', 'site-reviews'), |
|
23 | + 'minlength' => __('This field requires a minimum of %s characters.', 'site-reviews'), |
|
24 | + 'number' => __('This field requires a number.', 'site-reviews'), |
|
25 | + 'required' => __('This field is required.', 'site-reviews'), |
|
26 | + 'unsupported' => __('The review could not be submitted (unsupported browser).', 'site-reviews'), |
|
27 | + ]; |
|
28 | + } |
|
29 | 29 | } |
@@ -12,18 +12,18 @@ |
||
12 | 12 | protected function defaults() |
13 | 13 | { |
14 | 14 | return [ |
15 | - 'accepted' => __('This field must be accepted.', 'site-reviews'), |
|
16 | - 'between' => __('This field value must be between %s and %s.', 'site-reviews'), |
|
17 | - 'betweenlength' => __('This field must have between %s and %s characters.', 'site-reviews'), |
|
18 | - 'email' => __('This field requires a valid e-mail address.', 'site-reviews'), |
|
19 | - 'errors' => __('Please fix the submission errors.', 'site-reviews'), |
|
20 | - 'max' => __('Maximum value for this field is %s.', 'site-reviews'), |
|
21 | - 'maxlength' => __('This field allows a maximum of %s characters.', 'site-reviews'), |
|
22 | - 'min' => __('Minimum value for this field is %s.', 'site-reviews'), |
|
23 | - 'minlength' => __('This field requires a minimum of %s characters.', 'site-reviews'), |
|
24 | - 'number' => __('This field requires a number.', 'site-reviews'), |
|
25 | - 'required' => __('This field is required.', 'site-reviews'), |
|
26 | - 'unsupported' => __('The review could not be submitted (unsupported browser).', 'site-reviews'), |
|
15 | + 'accepted' => __( 'This field must be accepted.', 'site-reviews' ), |
|
16 | + 'between' => __( 'This field value must be between %s and %s.', 'site-reviews' ), |
|
17 | + 'betweenlength' => __( 'This field must have between %s and %s characters.', 'site-reviews' ), |
|
18 | + 'email' => __( 'This field requires a valid e-mail address.', 'site-reviews' ), |
|
19 | + 'errors' => __( 'Please fix the submission errors.', 'site-reviews' ), |
|
20 | + 'max' => __( 'Maximum value for this field is %s.', 'site-reviews' ), |
|
21 | + 'maxlength' => __( 'This field allows a maximum of %s characters.', 'site-reviews' ), |
|
22 | + 'min' => __( 'Minimum value for this field is %s.', 'site-reviews' ), |
|
23 | + 'minlength' => __( 'This field requires a minimum of %s characters.', 'site-reviews' ), |
|
24 | + 'number' => __( 'This field requires a number.', 'site-reviews' ), |
|
25 | + 'required' => __( 'This field is required.', 'site-reviews' ), |
|
26 | + 'unsupported' => __( 'The review could not be submitted (unsupported browser).', 'site-reviews' ), |
|
27 | 27 | ]; |
28 | 28 | } |
29 | 29 | } |
@@ -6,28 +6,28 @@ |
||
6 | 6 | |
7 | 7 | class SiteReviewsFormDefaults extends Defaults |
8 | 8 | { |
9 | - /** |
|
10 | - * @var array |
|
11 | - */ |
|
12 | - protected $guarded = [ |
|
13 | - 'description', |
|
14 | - 'title', |
|
15 | - ]; |
|
9 | + /** |
|
10 | + * @var array |
|
11 | + */ |
|
12 | + protected $guarded = [ |
|
13 | + 'description', |
|
14 | + 'title', |
|
15 | + ]; |
|
16 | 16 | |
17 | - /** |
|
18 | - * @return array |
|
19 | - */ |
|
20 | - protected function defaults() |
|
21 | - { |
|
22 | - return [ |
|
23 | - 'assign_to' => '', |
|
24 | - 'category' => '', |
|
25 | - 'class' => '', |
|
26 | - 'description' => '', |
|
27 | - 'excluded' => '', |
|
28 | - 'hide' => '', |
|
29 | - 'id' => '', |
|
30 | - 'title' => '', |
|
31 | - ]; |
|
32 | - } |
|
17 | + /** |
|
18 | + * @return array |
|
19 | + */ |
|
20 | + protected function defaults() |
|
21 | + { |
|
22 | + return [ |
|
23 | + 'assign_to' => '', |
|
24 | + 'category' => '', |
|
25 | + 'class' => '', |
|
26 | + 'description' => '', |
|
27 | + 'excluded' => '', |
|
28 | + 'hide' => '', |
|
29 | + 'id' => '', |
|
30 | + 'title' => '', |
|
31 | + ]; |
|
32 | + } |
|
33 | 33 | } |
@@ -6,20 +6,20 @@ |
||
6 | 6 | |
7 | 7 | class StyleFieldsDefaults extends Defaults |
8 | 8 | { |
9 | - /** |
|
10 | - * @return array |
|
11 | - */ |
|
12 | - protected function defaults() |
|
13 | - { |
|
14 | - return [ |
|
15 | - 'input' => '', |
|
16 | - 'input_checkbox' => '', |
|
17 | - 'input_radio' => '', |
|
18 | - 'label' => '', |
|
19 | - 'label_checkbox' => '', |
|
20 | - 'label_radio' => '', |
|
21 | - 'select' => '', |
|
22 | - 'textarea' => '', |
|
23 | - ]; |
|
24 | - } |
|
9 | + /** |
|
10 | + * @return array |
|
11 | + */ |
|
12 | + protected function defaults() |
|
13 | + { |
|
14 | + return [ |
|
15 | + 'input' => '', |
|
16 | + 'input_checkbox' => '', |
|
17 | + 'input_radio' => '', |
|
18 | + 'label' => '', |
|
19 | + 'label_checkbox' => '', |
|
20 | + 'label_radio' => '', |
|
21 | + 'select' => '', |
|
22 | + 'textarea' => '', |
|
23 | + ]; |
|
24 | + } |
|
25 | 25 | } |
@@ -6,22 +6,22 @@ |
||
6 | 6 | |
7 | 7 | class StyleValidationDefaults extends Defaults |
8 | 8 | { |
9 | - /** |
|
10 | - * @return array |
|
11 | - */ |
|
12 | - protected function defaults() |
|
13 | - { |
|
14 | - return [ |
|
15 | - 'error_tag' => 'div', |
|
16 | - 'error_tag_class' => 'glsr-field-error', |
|
17 | - 'field_class' => 'glsr-field', |
|
18 | - 'field_error_class' => 'glsr-has-error', |
|
19 | - 'input_error_class' => 'glsr-is-invalid', |
|
20 | - 'message_error_class' => 'glsr-has-errors', |
|
21 | - 'message_initial_class' => 'glsr-is-visible', |
|
22 | - 'message_success_class' => 'glsr-has-success', |
|
23 | - 'message_tag' => 'div', |
|
24 | - 'message_tag_class' => 'glsr-form-message', |
|
25 | - ]; |
|
26 | - } |
|
9 | + /** |
|
10 | + * @return array |
|
11 | + */ |
|
12 | + protected function defaults() |
|
13 | + { |
|
14 | + return [ |
|
15 | + 'error_tag' => 'div', |
|
16 | + 'error_tag_class' => 'glsr-field-error', |
|
17 | + 'field_class' => 'glsr-field', |
|
18 | + 'field_error_class' => 'glsr-has-error', |
|
19 | + 'input_error_class' => 'glsr-is-invalid', |
|
20 | + 'message_error_class' => 'glsr-has-errors', |
|
21 | + 'message_initial_class' => 'glsr-is-visible', |
|
22 | + 'message_success_class' => 'glsr-has-success', |
|
23 | + 'message_tag' => 'div', |
|
24 | + 'message_tag_class' => 'glsr-form-message', |
|
25 | + ]; |
|
26 | + } |
|
27 | 27 | } |
@@ -6,19 +6,19 @@ |
||
6 | 6 | |
7 | 7 | class SlackDefaults extends Defaults |
8 | 8 | { |
9 | - /** |
|
10 | - * @return array |
|
11 | - */ |
|
12 | - protected function defaults() |
|
13 | - { |
|
14 | - return [ |
|
15 | - 'button_text' => __('View Review', 'site-reviews'), |
|
16 | - 'button_url' => '', |
|
17 | - 'color' => '#665068', |
|
18 | - 'fallback' => '', |
|
19 | - 'icon_url' => glsr()->url('assets/images/icon.png'), |
|
20 | - 'pretext' => '', |
|
21 | - 'username' => glsr()->name, |
|
22 | - ]; |
|
23 | - } |
|
9 | + /** |
|
10 | + * @return array |
|
11 | + */ |
|
12 | + protected function defaults() |
|
13 | + { |
|
14 | + return [ |
|
15 | + 'button_text' => __('View Review', 'site-reviews'), |
|
16 | + 'button_url' => '', |
|
17 | + 'color' => '#665068', |
|
18 | + 'fallback' => '', |
|
19 | + 'icon_url' => glsr()->url('assets/images/icon.png'), |
|
20 | + 'pretext' => '', |
|
21 | + 'username' => glsr()->name, |
|
22 | + ]; |
|
23 | + } |
|
24 | 24 | } |
@@ -12,11 +12,11 @@ |
||
12 | 12 | protected function defaults() |
13 | 13 | { |
14 | 14 | return [ |
15 | - 'button_text' => __('View Review', 'site-reviews'), |
|
15 | + 'button_text' => __( 'View Review', 'site-reviews' ), |
|
16 | 16 | 'button_url' => '', |
17 | 17 | 'color' => '#665068', |
18 | 18 | 'fallback' => '', |
19 | - 'icon_url' => glsr()->url('assets/images/icon.png'), |
|
19 | + 'icon_url' => glsr()->url( 'assets/images/icon.png' ), |
|
20 | 20 | 'pretext' => '', |
21 | 21 | 'username' => glsr()->name, |
22 | 22 | ]; |
@@ -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 | } |
@@ -13,8 +13,8 @@ |
||
13 | 13 | { |
14 | 14 | return [ |
15 | 15 | 'columns' => [ |
16 | - 'title' => __('Title', 'site-reviews'), |
|
17 | - 'date' => __('Date', 'site-reviews'), |
|
16 | + 'title' => __( 'Title', 'site-reviews' ), |
|
17 | + 'date' => __( 'Date', 'site-reviews' ), |
|
18 | 18 | ], |
19 | 19 | 'has_archive' => false, |
20 | 20 | 'hierarchical' => false, |
@@ -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 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | { |
14 | 14 | public function __construct() |
15 | 15 | { |
16 | - $this->meta = new WP_REST_Term_Meta_Fields(Application::TAXONOMY); |
|
16 | + $this->meta = new WP_REST_Term_Meta_Fields( Application::TAXONOMY ); |
|
17 | 17 | $this->namespace = Application::ID.'/v1'; |
18 | 18 | $this->rest_base = 'categories'; |
19 | 19 | $this->taxonomy = Application::TAXONOMY; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function register_routes() |
26 | 26 | { |
27 | - register_rest_route($this->namespace, '/'.$this->rest_base, [ |
|
27 | + register_rest_route( $this->namespace, '/'.$this->rest_base, [ |
|
28 | 28 | [ |
29 | 29 | 'args' => $this->get_collection_params(), |
30 | 30 | 'callback' => [$this, 'get_items'], |
@@ -32,6 +32,6 @@ discard block |
||
32 | 32 | 'permission_callback' => [$this, 'get_items_permissions_check'], |
33 | 33 | ], |
34 | 34 | 'schema' => [$this, 'get_public_item_schema'], |
35 | - ]); |
|
35 | + ] ); |
|
36 | 36 | } |
37 | 37 | } |