@@ -13,15 +13,15 @@ discard block |
||
| 13 | 13 | public function fields() |
| 14 | 14 | { |
| 15 | 15 | return [[ |
| 16 | - 'html' => sprintf( '<p class="strong">%s</p>', esc_html__( 'All settings are optional.', 'site-reviews' )), |
|
| 16 | + 'html' => sprintf( '<p class="strong">%s</p>', esc_html__( 'All settings are optional.', 'site-reviews' ) ), |
|
| 17 | 17 | 'minWidth' => 320, |
| 18 | 18 | 'type' => 'container', |
| 19 | - ],[ |
|
| 19 | + ], [ |
|
| 20 | 20 | 'label' => esc_html__( 'Title', 'site-reviews' ), |
| 21 | 21 | 'name' => 'title', |
| 22 | 22 | 'tooltip' => esc_attr__( 'Enter a custom shortcode heading.', 'site-reviews' ), |
| 23 | 23 | 'type' => 'textbox', |
| 24 | - ],[ |
|
| 24 | + ], [ |
|
| 25 | 25 | 'label' => esc_html__( 'Count', 'site-reviews' ), |
| 26 | 26 | 'maxLength' => 5, |
| 27 | 27 | 'name' => 'count', |
@@ -29,19 +29,19 @@ discard block |
||
| 29 | 29 | 'text' => '10', |
| 30 | 30 | 'tooltip' => esc_attr__( 'How many reviews would you like to display (default: 10)?', 'site-reviews' ), |
| 31 | 31 | 'type' => 'textbox', |
| 32 | - ],[ |
|
| 32 | + ], [ |
|
| 33 | 33 | 'label' => esc_html__( 'Rating', 'site-reviews' ), |
| 34 | 34 | 'name' => 'rating', |
| 35 | 35 | 'options' => [ |
| 36 | - '5' => esc_html( sprintf( __( '%s star', '%s stars', 5, 'site-reviews' ), 5 )), |
|
| 37 | - '4' => esc_html( sprintf( __( '%s star', '%s stars', 4, 'site-reviews' ), 4 )), |
|
| 38 | - '3' => esc_html( sprintf( __( '%s star', '%s stars', 3, 'site-reviews' ), 3 )), |
|
| 39 | - '2' => esc_html( sprintf( __( '%s star', '%s stars', 2, 'site-reviews' ), 2 )), |
|
| 40 | - '1' => esc_html( sprintf( __( '%s star', '%s stars', 1, 'site-reviews' ), 1 )), |
|
| 36 | + '5' => esc_html( sprintf( __( '%s star', '%s stars', 5, 'site-reviews' ), 5 ) ), |
|
| 37 | + '4' => esc_html( sprintf( __( '%s star', '%s stars', 4, 'site-reviews' ), 4 ) ), |
|
| 38 | + '3' => esc_html( sprintf( __( '%s star', '%s stars', 3, 'site-reviews' ), 3 ) ), |
|
| 39 | + '2' => esc_html( sprintf( __( '%s star', '%s stars', 2, 'site-reviews' ), 2 ) ), |
|
| 40 | + '1' => esc_html( sprintf( __( '%s star', '%s stars', 1, 'site-reviews' ), 1 ) ), |
|
| 41 | 41 | ], |
| 42 | 42 | 'tooltip' => esc_attr__( 'What is the minimum rating to display (default: 1 star)?', 'site-reviews' ), |
| 43 | 43 | 'type' => 'listbox', |
| 44 | - ],[ |
|
| 44 | + ], [ |
|
| 45 | 45 | 'label' => esc_html__( 'Pagination', 'site-reviews' ), |
| 46 | 46 | 'name' => 'pagination', |
| 47 | 47 | 'options' => [ |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | 'name' => 'assigned_to', |
| 60 | 60 | 'tooltip' => esc_attr__( 'Limit reviews to those assigned to this post ID (separate multiple IDs with a comma). You can also enter "post_id" to use the ID of the current page.', 'site-reviews' ), |
| 61 | 61 | 'type' => 'textbox', |
| 62 | - ],[ |
|
| 62 | + ], [ |
|
| 63 | 63 | 'label' => esc_html__( 'Schema', 'site-reviews' ), |
| 64 | 64 | 'name' => 'schema', |
| 65 | 65 | 'options' => [ |
@@ -68,49 +68,49 @@ discard block |
||
| 68 | 68 | ], |
| 69 | 69 | 'tooltip' => esc_attr__( 'Rich snippets are disabled by default.', 'site-reviews' ), |
| 70 | 70 | 'type' => 'listbox', |
| 71 | - ],[ |
|
| 71 | + ], [ |
|
| 72 | 72 | 'label' => esc_html__( 'Classes', 'site-reviews' ), |
| 73 | 73 | 'name' => 'class', |
| 74 | 74 | 'tooltip' => esc_attr__( 'Add custom CSS classes to the shortcode.', 'site-reviews' ), |
| 75 | 75 | 'type' => 'textbox', |
| 76 | - ],[ |
|
| 76 | + ], [ |
|
| 77 | 77 | 'columns' => 2, |
| 78 | 78 | 'items' => [[ |
| 79 | 79 | 'name' => 'hide_assigned_to', |
| 80 | 80 | 'text' => esc_html__( 'Assigned To', 'site-reviews' ), |
| 81 | 81 | 'tooltip' => esc_attr__( 'Hide the assigned to link?', 'site-reviews' ), |
| 82 | 82 | 'type' => 'checkbox', |
| 83 | - ],[ |
|
| 83 | + ], [ |
|
| 84 | 84 | 'name' => 'hide_author', |
| 85 | 85 | 'text' => esc_html__( 'Author', 'site-reviews' ), |
| 86 | 86 | 'tooltip' => esc_attr__( 'Hide the review author?', 'site-reviews' ), |
| 87 | 87 | 'type' => 'checkbox', |
| 88 | - ],[ |
|
| 88 | + ], [ |
|
| 89 | 89 | 'name' => 'hide_avatar', |
| 90 | 90 | 'text' => esc_html__( 'Avatar', 'site-reviews' ), |
| 91 | 91 | 'tooltip' => esc_attr__( 'Hide the reviewer avatar if shown?', 'site-reviews' ), |
| 92 | 92 | 'type' => 'checkbox', |
| 93 | - ],[ |
|
| 93 | + ], [ |
|
| 94 | 94 | 'name' => 'hide_content', |
| 95 | 95 | 'text' => esc_html__( 'Content', 'site-reviews' ), |
| 96 | 96 | 'tooltip' => esc_attr__( 'Hide the review content?', 'site-reviews' ), |
| 97 | 97 | 'type' => 'checkbox', |
| 98 | - ],[ |
|
| 98 | + ], [ |
|
| 99 | 99 | 'name' => 'hide_date', |
| 100 | 100 | 'text' => esc_html__( 'Date', 'site-reviews' ), |
| 101 | 101 | 'tooltip' => esc_attr__( 'Hide the review date?', 'site-reviews' ), |
| 102 | 102 | 'type' => 'checkbox', |
| 103 | - ],[ |
|
| 103 | + ], [ |
|
| 104 | 104 | 'name' => 'hide_rating', |
| 105 | 105 | 'text' => esc_html__( 'Rating', 'site-reviews' ), |
| 106 | 106 | 'tooltip' => esc_attr__( 'Hide the review rating?', 'site-reviews' ), |
| 107 | 107 | 'type' => 'checkbox', |
| 108 | - ],[ |
|
| 108 | + ], [ |
|
| 109 | 109 | 'name' => 'hide_response', |
| 110 | 110 | 'text' => esc_html__( 'Response', 'site-reviews' ), |
| 111 | 111 | 'tooltip' => esc_attr__( 'Hide the review response?', 'site-reviews' ), |
| 112 | 112 | 'type' => 'checkbox', |
| 113 | - ],[ |
|
| 113 | + ], [ |
|
| 114 | 114 | 'name' => 'hide_title', |
| 115 | 115 | 'text' => esc_html__( 'Title', 'site-reviews' ), |
| 116 | 116 | 'tooltip' => esc_attr__( 'Hide the review title?', 'site-reviews' ), |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | 'label' => esc_html__( 'Hide', 'site-reviews' ), |
| 121 | 121 | 'spacing' => 5, |
| 122 | 122 | 'type' => 'container', |
| 123 | - ],[ |
|
| 123 | + ], [ |
|
| 124 | 124 | 'hidden' => true, |
| 125 | 125 | 'name' => 'id', |
| 126 | 126 | 'type' => 'textbox', |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | public function getTerms() |
| 134 | 134 | { |
| 135 | 135 | $terms = glsr( Database::class )->getTerms(); |
| 136 | - if( empty( $terms )) { |
|
| 136 | + if( empty($terms) ) { |
|
| 137 | 137 | return []; |
| 138 | 138 | } |
| 139 | 139 | return [ |