Passed
Push — master ( 359d6b...f85fc3 )
by Paul
04:03
created
plugin/Controllers/AjaxController.php 1 patch
Indentation   +179 added lines, -179 removed lines patch added patch discarded remove patch
@@ -15,195 +15,195 @@
 block discarded – undo
15 15
 
16 16
 class AjaxController extends Controller
17 17
 {
18
-    /**
19
-     * @return void
20
-     */
21
-    public function routerChangeStatus(array $request)
22
-    {
23
-        wp_send_json_success($this->execute(new ChangeStatus($request)));
24
-    }
18
+	/**
19
+	 * @return void
20
+	 */
21
+	public function routerChangeStatus(array $request)
22
+	{
23
+		wp_send_json_success($this->execute(new ChangeStatus($request)));
24
+	}
25 25
 
26
-    /**
27
-     * @return void
28
-     */
29
-    public function routerClearConsole()
30
-    {
31
-        glsr(AdminController::class)->routerClearConsole();
32
-        wp_send_json_success([
33
-            'console' => glsr(Console::class)->get(),
34
-            'notices' => glsr(Notice::class)->get(),
35
-        ]);
36
-    }
26
+	/**
27
+	 * @return void
28
+	 */
29
+	public function routerClearConsole()
30
+	{
31
+		glsr(AdminController::class)->routerClearConsole();
32
+		wp_send_json_success([
33
+			'console' => glsr(Console::class)->get(),
34
+			'notices' => glsr(Notice::class)->get(),
35
+		]);
36
+	}
37 37
 
38
-    /**
39
-     * @return void
40
-     */
41
-    public function routerCountReviews()
42
-    {
43
-        glsr(AdminController::class)->routerCountReviews();
44
-        wp_send_json_success([
45
-            'notices' => glsr(Notice::class)->get(),
46
-        ]);
47
-    }
38
+	/**
39
+	 * @return void
40
+	 */
41
+	public function routerCountReviews()
42
+	{
43
+		glsr(AdminController::class)->routerCountReviews();
44
+		wp_send_json_success([
45
+			'notices' => glsr(Notice::class)->get(),
46
+		]);
47
+	}
48 48
 
49
-    /**
50
-     * @return void
51
-     */
52
-    public function routerMigrateReviews()
53
-    {
54
-        glsr(AdminController::class)->routerMigrateReviews();
55
-        wp_send_json_success([
56
-            'notices' => glsr(Notice::class)->get(),
57
-        ]);
58
-    }
49
+	/**
50
+	 * @return void
51
+	 */
52
+	public function routerMigrateReviews()
53
+	{
54
+		glsr(AdminController::class)->routerMigrateReviews();
55
+		wp_send_json_success([
56
+			'notices' => glsr(Notice::class)->get(),
57
+		]);
58
+	}
59 59
 
60
-    /**
61
-     * @return void
62
-     */
63
-    public function routerDismissNotice(array $request)
64
-    {
65
-        glsr(NoticeController::class)->routerDismissNotice($request);
66
-        wp_send_json_success();
67
-    }
60
+	/**
61
+	 * @return void
62
+	 */
63
+	public function routerDismissNotice(array $request)
64
+	{
65
+		glsr(NoticeController::class)->routerDismissNotice($request);
66
+		wp_send_json_success();
67
+	}
68 68
 
69
-    /**
70
-     * @return void
71
-     */
72
-    public function routerMceShortcode(array $request)
73
-    {
74
-        $shortcode = $request['shortcode'];
75
-        $response = false;
76
-        if (array_key_exists($shortcode, glsr()->mceShortcodes)) {
77
-            $data = glsr()->mceShortcodes[$shortcode];
78
-            if (!empty($data['errors'])) {
79
-                $data['btn_okay'] = [esc_html__('Okay', 'site-reviews')];
80
-            }
81
-            $response = [
82
-                'body' => $data['fields'],
83
-                'close' => $data['btn_close'],
84
-                'ok' => $data['btn_okay'],
85
-                'shortcode' => $shortcode,
86
-                'title' => $data['title'],
87
-            ];
88
-        }
89
-        wp_send_json_success($response);
90
-    }
69
+	/**
70
+	 * @return void
71
+	 */
72
+	public function routerMceShortcode(array $request)
73
+	{
74
+		$shortcode = $request['shortcode'];
75
+		$response = false;
76
+		if (array_key_exists($shortcode, glsr()->mceShortcodes)) {
77
+			$data = glsr()->mceShortcodes[$shortcode];
78
+			if (!empty($data['errors'])) {
79
+				$data['btn_okay'] = [esc_html__('Okay', 'site-reviews')];
80
+			}
81
+			$response = [
82
+				'body' => $data['fields'],
83
+				'close' => $data['btn_close'],
84
+				'ok' => $data['btn_okay'],
85
+				'shortcode' => $shortcode,
86
+				'title' => $data['title'],
87
+			];
88
+		}
89
+		wp_send_json_success($response);
90
+	}
91 91
 
92
-    /**
93
-     * @return void
94
-     */
95
-    public function routerFetchConsole()
96
-    {
97
-        glsr(AdminController::class)->routerFetchConsole();
98
-        wp_send_json_success([
99
-            'console' => glsr(Console::class)->get(),
100
-            'notices' => glsr(Notice::class)->get(),
101
-        ]);
102
-    }
92
+	/**
93
+	 * @return void
94
+	 */
95
+	public function routerFetchConsole()
96
+	{
97
+		glsr(AdminController::class)->routerFetchConsole();
98
+		wp_send_json_success([
99
+			'console' => glsr(Console::class)->get(),
100
+			'notices' => glsr(Notice::class)->get(),
101
+		]);
102
+	}
103 103
 
104
-    /**
105
-     * @return void
106
-     */
107
-    public function routerResetPermissions()
108
-    {
109
-        glsr(Role::class)->resetAll();
110
-        glsr(Notice::class)->clear()->addSuccess(__('The permissions have been reset, please reload the page for them to take effect.', 'site-reviews'));
111
-        wp_send_json_success([
112
-            'notices' => glsr(Notice::class)->get(),
113
-        ]);
114
-    }
104
+	/**
105
+	 * @return void
106
+	 */
107
+	public function routerResetPermissions()
108
+	{
109
+		glsr(Role::class)->resetAll();
110
+		glsr(Notice::class)->clear()->addSuccess(__('The permissions have been reset, please reload the page for them to take effect.', 'site-reviews'));
111
+		wp_send_json_success([
112
+			'notices' => glsr(Notice::class)->get(),
113
+		]);
114
+	}
115 115
 
116
-    /**
117
-     * @return void
118
-     */
119
-    public function routerSearchPosts(array $request)
120
-    {
121
-        $results = glsr(Database::class)->searchPosts($request['search']);
122
-        wp_send_json_success([
123
-            'empty' => '<div>'.__('Nothing found.', 'site-reviews').'</div>',
124
-            'items' => $results,
125
-        ]);
126
-    }
116
+	/**
117
+	 * @return void
118
+	 */
119
+	public function routerSearchPosts(array $request)
120
+	{
121
+		$results = glsr(Database::class)->searchPosts($request['search']);
122
+		wp_send_json_success([
123
+			'empty' => '<div>'.__('Nothing found.', 'site-reviews').'</div>',
124
+			'items' => $results,
125
+		]);
126
+	}
127 127
 
128
-    /**
129
-     * @return void
130
-     */
131
-    public function routerSearchTranslations(array $request)
132
-    {
133
-        if (empty($request['exclude'])) {
134
-            $request['exclude'] = [];
135
-        }
136
-        $results = glsr(Translation::class)
137
-            ->search($request['search'])
138
-            ->exclude()
139
-            ->exclude($request['exclude'])
140
-            ->renderResults();
141
-        wp_send_json_success([
142
-            'empty' => '<div>'.__('Nothing found.', 'site-reviews').'</div>',
143
-            'items' => $results,
144
-        ]);
145
-    }
128
+	/**
129
+	 * @return void
130
+	 */
131
+	public function routerSearchTranslations(array $request)
132
+	{
133
+		if (empty($request['exclude'])) {
134
+			$request['exclude'] = [];
135
+		}
136
+		$results = glsr(Translation::class)
137
+			->search($request['search'])
138
+			->exclude()
139
+			->exclude($request['exclude'])
140
+			->renderResults();
141
+		wp_send_json_success([
142
+			'empty' => '<div>'.__('Nothing found.', 'site-reviews').'</div>',
143
+			'items' => $results,
144
+		]);
145
+	}
146 146
 
147
-    /**
148
-     * @return void
149
-     */
150
-    public function routerSubmitReview(array $request)
151
-    {
152
-        $command = glsr(PublicController::class)->routerSubmitReview($request);
153
-        $redirect = trim(strval(get_post_meta($command->post_id, 'redirect_to', true)));
154
-        $redirect = apply_filters('site-reviews/review/redirect', $redirect, $command);
155
-        $data = [
156
-            'errors' => glsr()->sessionGet($command->form_id.'errors', false),
157
-            'message' => glsr()->sessionGet($command->form_id.'message', ''),
158
-            'recaptcha' => glsr()->sessionGet($command->form_id.'recaptcha', false),
159
-            'redirect' => $redirect,
160
-        ];
161
-        if (false === $data['errors']) {
162
-            glsr()->sessionClear();
163
-            wp_send_json_success($data);
164
-        }
165
-        wp_send_json_error($data);
166
-    }
147
+	/**
148
+	 * @return void
149
+	 */
150
+	public function routerSubmitReview(array $request)
151
+	{
152
+		$command = glsr(PublicController::class)->routerSubmitReview($request);
153
+		$redirect = trim(strval(get_post_meta($command->post_id, 'redirect_to', true)));
154
+		$redirect = apply_filters('site-reviews/review/redirect', $redirect, $command);
155
+		$data = [
156
+			'errors' => glsr()->sessionGet($command->form_id.'errors', false),
157
+			'message' => glsr()->sessionGet($command->form_id.'message', ''),
158
+			'recaptcha' => glsr()->sessionGet($command->form_id.'recaptcha', false),
159
+			'redirect' => $redirect,
160
+		];
161
+		if (false === $data['errors']) {
162
+			glsr()->sessionClear();
163
+			wp_send_json_success($data);
164
+		}
165
+		wp_send_json_error($data);
166
+	}
167 167
 
168
-    /**
169
-     * @return void
170
-     */
171
-    public function routerFetchPagedReviews(array $request)
172
-    {
173
-        $args = [
174
-            'paged' => Arr::get($request, 'page', false),
175
-            'pagedUrl' => '',
176
-            'pagination' => 'ajax',
177
-            'schema' => false,
178
-        ];
179
-        if (!$args['paged']) {
180
-            $homePath = untrailingslashit(parse_url(home_url(), PHP_URL_PATH));
181
-            $urlPath = untrailingslashit(parse_url(Arr::get($request, 'url'), PHP_URL_PATH));
182
-            $urlQuery = [];
183
-            parse_str(parse_url(Arr::get($request, 'url'), PHP_URL_QUERY), $urlQuery);
184
-            $args['paged'] = (int) Arr::get($urlQuery, glsr()->constant('PAGED_QUERY_VAR'), 1);
185
-            $args['pagedUrl'] = $homePath === $urlPath
186
-                ? trailingslashit(home_url())
187
-                : trailingslashit(home_url($urlPath));
188
-        }
189
-        $atts = (array) json_decode(Arr::get($request, 'atts'));
190
-        $atts = glsr(SiteReviewsShortcode::class)->normalizeAtts($atts);
191
-        $html = glsr(SiteReviewsPartial::class)->build(wp_parse_args($args, $atts));
192
-        return wp_send_json_success([
193
-            'pagination' => $html->getPagination(),
194
-            'reviews' => $html->getReviews(),
195
-        ]);
196
-    }
168
+	/**
169
+	 * @return void
170
+	 */
171
+	public function routerFetchPagedReviews(array $request)
172
+	{
173
+		$args = [
174
+			'paged' => Arr::get($request, 'page', false),
175
+			'pagedUrl' => '',
176
+			'pagination' => 'ajax',
177
+			'schema' => false,
178
+		];
179
+		if (!$args['paged']) {
180
+			$homePath = untrailingslashit(parse_url(home_url(), PHP_URL_PATH));
181
+			$urlPath = untrailingslashit(parse_url(Arr::get($request, 'url'), PHP_URL_PATH));
182
+			$urlQuery = [];
183
+			parse_str(parse_url(Arr::get($request, 'url'), PHP_URL_QUERY), $urlQuery);
184
+			$args['paged'] = (int) Arr::get($urlQuery, glsr()->constant('PAGED_QUERY_VAR'), 1);
185
+			$args['pagedUrl'] = $homePath === $urlPath
186
+				? trailingslashit(home_url())
187
+				: trailingslashit(home_url($urlPath));
188
+		}
189
+		$atts = (array) json_decode(Arr::get($request, 'atts'));
190
+		$atts = glsr(SiteReviewsShortcode::class)->normalizeAtts($atts);
191
+		$html = glsr(SiteReviewsPartial::class)->build(wp_parse_args($args, $atts));
192
+		return wp_send_json_success([
193
+			'pagination' => $html->getPagination(),
194
+			'reviews' => $html->getReviews(),
195
+		]);
196
+	}
197 197
 
198
-    /**
199
-     * @return void
200
-     */
201
-    public function routerTogglePinned(array $request)
202
-    {
203
-        $isPinned = $this->execute(new TogglePinned($request));
204
-        wp_send_json_success([
205
-            'notices' => glsr(Notice::class)->get(),
206
-            'pinned' => $isPinned,
207
-        ]);
208
-    }
198
+	/**
199
+	 * @return void
200
+	 */
201
+	public function routerTogglePinned(array $request)
202
+	{
203
+		$isPinned = $this->execute(new TogglePinned($request));
204
+		wp_send_json_success([
205
+			'notices' => glsr(Notice::class)->get(),
206
+			'pinned' => $isPinned,
207
+		]);
208
+	}
209 209
 }
Please login to merge, or discard this patch.
config/settings.php 1 patch
Indentation   +561 added lines, -561 removed lines patch added patch discarded remove patch
@@ -1,565 +1,565 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 return [
4
-    'settings.general.style' => [
5
-        'default' => 'default',
6
-        'description' => __('Site Reviews relies on the CSS of your theme to style the submission form. If your theme does not provide proper CSS rules for form elements and you are using a WordPress plugin/theme or CSS Framework listed here, please try selecting it, otherwise choose "Site Reviews (default)".', 'site-reviews'),
7
-        'label' => __('Plugin Style', 'site-reviews'),
8
-        'options' => [
9
-            'bootstrap_4' => 'CSS Framework: Bootstrap 4',
10
-            'bootstrap_4_custom' => 'CSS Framework: Bootstrap 4 (Custom Forms)',
11
-            'contact_form_7' => 'Plugin: Contact Form 7 (v5)',
12
-            'ninja_forms' => 'Plugin: Ninja Forms (v3)',
13
-            'wpforms' => 'Plugin: WPForms Lite (v1)',
14
-            'default' => __('Site Reviews (default)', 'site-reviews'),
15
-            'minimal' => __('Site Reviews (minimal)', 'site-reviews'),
16
-            'divi' => 'Theme: Divi (v3)',
17
-            'materialize' => 'Theme: Materialize',
18
-            'twentyfifteen' => 'Theme: Twenty Fifteen',
19
-            'twentyseventeen' => 'Theme: Twenty Seventeen',
20
-            'twentynineteen' => 'Theme: Twenty Nineteen',
21
-        ],
22
-        'type' => 'select',
23
-    ],
24
-    'settings.general.require.approval' => [
25
-        'default' => 'no',
26
-        'description' => __('Set the status of new review submissions to "unapproved".', 'site-reviews'),
27
-        'label' => __('Require Approval', 'site-reviews'),
28
-        'type' => 'yes_no',
29
-    ],
30
-    'settings.general.require.login' => [
31
-        'default' => 'no',
32
-        'description' => __('Only allow review submissions from registered users.', 'site-reviews'),
33
-        'label' => __('Require Login', 'site-reviews'),
34
-        'type' => 'yes_no',
35
-    ],
36
-    'settings.general.require.login_register' => [
37
-        'default' => 'no',
38
-        'depends_on' => [
39
-            'settings.general.require.login' => 'yes',
40
-        ],
41
-        'description' => sprintf(__('Show a link for a new user to register. The %s Membership option must be enabled in General Settings for this to work.', 'site-reviews'),
42
-            '<a href="'.admin_url('options-general.php#users_can_register').'">'.__('Anyone can register', 'site-reviews').'</a>'
43
-        ),
44
-        'label' => __('Show Registration Link', 'site-reviews'),
45
-        'type' => 'yes_no',
46
-    ],
47
-    'settings.general.multilingual' => [
48
-        'default' => '',
49
-        'description' => __('Integrate with a multilingual plugin to calculate ratings for all languages of a post.', 'site-reviews'),
50
-        'label' => __('Multilingual', 'site-reviews'),
51
-        'options' => [
52
-            '' => __('No Integration', 'site-reviews'),
53
-            'polylang' => __('Integrate with Polylang', 'site-reviews'),
54
-            'wpml' => __('Integrate with WPML', 'site-reviews'),
55
-        ],
56
-        'type' => 'select',
57
-    ],
58
-    'settings.general.trustalyze' => [
59
-        'default' => 'no',
60
-        'description' => sprintf(__('Integrate with the %s and validate your reviews on the blockchain to increase online reputation, trust, and transparency.', 'site-reviews'),
61
-            '<a href="https://trustalyze.com/plans?ref=105" target="_blank">Trustalyze Confidence System</a>'
62
-        ),
63
-        'label' => __('Blockchain Validation', 'site-reviews'),
64
-        'type' => 'yes_no',
65
-    ],
66
-    'settings.general.trustalyze_email' => [
67
-        'default' => '',
68
-        'depends_on' => [
69
-            'settings.general.trustalyze' => ['yes'],
70
-        ],
71
-        'description' => __('Enter your Trustalyze account email here.', 'site-reviews'),
72
-        'label' => __('Trustalyze Email', 'site-reviews'),
73
-        'type' => 'text',
74
-    ],
75
-    'settings.general.trustalyze_serial' => [
76
-        'default' => '',
77
-        'depends_on' => [
78
-            'settings.general.trustalyze' => ['yes'],
79
-        ],
80
-        'description' => __('Enter your Trustalyze account serial key here.', 'site-reviews'),
81
-        'label' => __('Trustalyze Serial Key', 'site-reviews'),
82
-        'type' => 'password',
83
-    ],
84
-    'settings.general.notifications' => [
85
-        'default' => [],
86
-        'label' => __('Notifications', 'site-reviews'),
87
-        'options' => [
88
-            'admin' => __('Send to administrator', 'site-reviews').' <code>'.(string) get_option('admin_email').'</code>',
89
-            'author' => __('Send to author of the page that the review is assigned to', 'site-reviews'),
90
-            'custom' => __('Send to one or more email addresses', 'site-reviews'),
91
-            'slack' => __('Send to <a href="https://slack.com/">Slack</a>', 'site-reviews'),
92
-        ],
93
-        'type' => 'checkbox',
94
-    ],
95
-    'settings.general.notification_email' => [
96
-        'default' => '',
97
-        'depends_on' => [
98
-            'settings.general.notifications' => ['custom'],
99
-        ],
100
-        'label' => __('Send Notification Emails To', 'site-reviews'),
101
-        'placeholder' => __('Separate multiple emails with a comma', 'site-reviews'),
102
-        'type' => 'text',
103
-    ],
104
-    'settings.general.notification_slack' => [
105
-        'default' => '',
106
-        'depends_on' => [
107
-            'settings.general.notifications' => ['slack'],
108
-        ],
109
-        'description' => sprintf(__('To send notifications to Slack, create a new %s and then paste the provided Webhook URL in the field above.', 'site-reviews'),
110
-            '<a href="https://api.slack.com/incoming-webhooks">'.__('Incoming WebHook', 'site-reviews').'</a>'
111
-        ),
112
-        'label' => __('Slack Webhook URL', 'site-reviews'),
113
-        'type' => 'text',
114
-    ],
115
-    'settings.general.notification_message' => [
116
-        'default' => glsr('Modules\Html\Template')->build('templates/email-notification'),
117
-        'depends_on' => [
118
-            'settings.general.notifications' => ['admin', 'author', 'custom', 'slack'],
119
-        ],
120
-        'description' => __(
121
-            'To restore the default text, save an empty template. '.
122
-            'If you are sending notifications to Slack then this template will only be used as a fallback in the event that <a href="https://api.slack.com/docs/attachments">Message Attachments</a> have been disabled. Available template tags:'.
123
-            '<br><code>{review_rating}</code> The review rating number (1-5)'.
124
-            '<br><code>{review_title}</code> The review title'.
125
-            '<br><code>{review_content}</code> The review content'.
126
-            '<br><code>{review_author}</code> The review author'.
127
-            '<br><code>{review_email}</code> The email of the review author'.
128
-            '<br><code>{review_ip}</code> The IP address of the review author'.
129
-            '<br><code>{review_link}</code> The link to edit/view a review',
130
-            'site-reviews'
131
-        ),
132
-        'label' => __('Notification Template', 'site-reviews'),
133
-        'rows' => 10,
134
-        'type' => 'code',
135
-    ],
136
-    'settings.reviews.date.format' => [
137
-        'default' => '',
138
-        'description' => sprintf(__('The default date format is the one set in your %s.', 'site-reviews'),
139
-            '<a href="'.admin_url('options-general.php#date_format_custom').'">'.__('WordPress settings', 'site-reviews').'</a>'
140
-        ),
141
-        'label' => __('Date Format', 'site-reviews'),
142
-        'options' => [
143
-            '' => __('Use the default date format', 'site-reviews'),
144
-            'relative' => __('Use a relative date format', 'site-reviews'),
145
-            'custom' => __('Use a custom date format', 'site-reviews'),
146
-        ],
147
-        'type' => 'select',
148
-    ],
149
-    'settings.reviews.date.custom' => [
150
-        'default' => get_option('date_format'),
151
-        'depends_on' => [
152
-            'settings.reviews.date.format' => 'custom',
153
-        ],
154
-        'description' => __('Enter a custom date format (<a href="https://codex.wordpress.org/Formatting_Date_and_Time">documentation on date and time formatting</a>).', 'site-reviews'),
155
-        'label' => __('Custom Date Format', 'site-reviews'),
156
-        'type' => 'text',
157
-    ],
158
-    'settings.reviews.name.format' => [
159
-        'default' => '',
160
-        'description' => __('Choose how names are shown in your reviews.', 'site-reviews'),
161
-        'label' => __('Name Format', 'site-reviews'),
162
-        'options' => [
163
-            '' => __('Use the name as given', 'site-reviews'),
164
-            'first' => __('Use the first name only', 'site-reviews'),
165
-            'first_initial' => __('Convert first name to an initial', 'site-reviews'),
166
-            'last_initial' => __('Convert last name to an initial', 'site-reviews'),
167
-            'initials' => __('Convert to all initials', 'site-reviews'),
168
-        ],
169
-        'type' => 'select',
170
-    ],
171
-    'settings.reviews.name.initial' => [
172
-        'default' => '',
173
-        'depends_on' => [
174
-            'settings.reviews.name.format' => ['first_initial', 'last_initial', 'initials'],
175
-        ],
176
-        'description' => __('Choose how the initial is displayed.', 'site-reviews'),
177
-        'label' => __('Initial Format', 'site-reviews'),
178
-        'options' => [
179
-            '' => __('Initial with a space', 'site-reviews'),
180
-            'period' => __('Initial with a period', 'site-reviews'),
181
-            'period_space' => __('Initial with a period and a space', 'site-reviews'),
182
-        ],
183
-        'type' => 'select',
184
-    ],
185
-    'settings.reviews.assigned_links' => [
186
-        'default' => 'no',
187
-        'description' => __('Display a link to the assigned post of a review.', 'site-reviews'),
188
-        'label' => __('Enable Assigned Links', 'site-reviews'),
189
-        'type' => 'yes_no',
190
-    ],
191
-    'settings.reviews.avatars' => [
192
-        'default' => 'no',
193
-        'description' => __('Display reviewer avatars. These are generated from the email address of the reviewer using <a href="https://gravatar.com">Gravatar</a>.', 'site-reviews'),
194
-        'label' => __('Enable Avatars', 'site-reviews'),
195
-        'type' => 'yes_no',
196
-    ],
197
-    'settings.reviews.avatars_regenerate' => [
198
-        'default' => 'no',
199
-        'depends_on' => [
200
-            'settings.reviews.avatars' => 'yes',
201
-        ],
202
-        'description' => __('Regenerate the avatar whenever a local review is shown?', 'site-reviews'),
203
-        'label' => __('Regenerate Avatars', 'site-reviews'),
204
-        'type' => 'yes_no',
205
-    ],
206
-    'settings.reviews.avatars_size' => [
207
-        'default' => 40,
208
-        'depends_on' => [
209
-            'settings.reviews.avatars' => 'yes',
210
-        ],
211
-        'description' => __('Set the avatar size in pixels.', 'site-reviews'),
212
-        'label' => __('Avatar Size', 'site-reviews'),
213
-        'type' => 'number',
214
-    ],
215
-    'settings.reviews.excerpts' => [
216
-        'default' => 'yes',
217
-        'description' => __('Display an excerpt instead of the full review.', 'site-reviews'),
218
-        'label' => __('Enable Excerpts', 'site-reviews'),
219
-        'type' => 'yes_no',
220
-    ],
221
-    'settings.reviews.excerpts_length' => [
222
-        'default' => 55,
223
-        'depends_on' => [
224
-            'settings.reviews.excerpts' => 'yes',
225
-        ],
226
-        'description' => __('Set the excerpt word length.', 'site-reviews'),
227
-        'label' => __('Excerpt Length', 'site-reviews'),
228
-        'type' => 'number',
229
-    ],
230
-    'settings.reviews.fallback' => [
231
-        'default' => 'yes',
232
-        'description' => sprintf(__('Display the fallback text when there are no reviews to display. This can be changed on the %s page. You may also override this by using the "fallback" option on the shortcode. The default fallback text is: %s', 'site-reviews'),
233
-            '<a href="'.admin_url('edit.php?post_type='.glsr()->post_type.'&page=settings#tab-translations').'">'.__('Translations', 'site-reviews').'</a>',
234
-            '<code>'.__('There are no reviews yet. Be the first one to write one.', 'site-reviews').'</code>'
235
-        ),
236
-        'label' => __('Enable Fallback Text', 'site-reviews'),
237
-        'type' => 'yes_no',
238
-    ],
239
-    'settings.reviews.pagination.url_parameter' => [
240
-        'default' => 'yes',
241
-        'description' => sprintf(
242
-            _x('Paginated URLs include the %s URL parameter. If you would like to keep the pagination links but prevent search engines from indexing them, add the following lines to your %s file instead: %s', 'admin-text', 'site-reviews'),
243
-            '<code>?'.glsr()->constant('PAGED_QUERY_VAR').'={page_number}</code>',
244
-            '<a href="https://www.robotstxt.org/">robots.txt</a>',
245
-            '<br><code>user-agent: *</code>'.
246
-            '<br><code>Disallow: /*?'.glsr()->constant('PAGED_QUERY_VAR').'=*</code>'.
247
-            '<br><code>Disallow: /*?*'.glsr()->constant('PAGED_QUERY_VAR').'=*</code>'
248
-        ),
249
-        'label' => esc_html_x('Enable Paginated URLs', 'admin-text', 'site-reviews'),
250
-        'type' => 'yes_no',
251
-    ],
252
-    'settings.schema.type.default' => [
253
-        'default' => 'LocalBusiness',
254
-        'description' => __('Custom Field name', 'site-reviews').': <code>schema_type</code>',
255
-        'label' => __('Default Schema Type', 'site-reviews'),
256
-        'options' => [
257
-            'LocalBusiness' => __('Local Business', 'site-reviews'),
258
-            'Product' => __('Product', 'site-reviews'),
259
-            'custom' => __('Custom', 'site-reviews'),
260
-        ],
261
-        'type' => 'select',
262
-    ],
263
-    'settings.schema.type.custom' => [
264
-        'default' => '',
265
-        'depends_on' => [
266
-            'settings.schema.type.default' => 'custom',
267
-        ],
268
-        'description' => '<a href="https://schema.org/docs/schemas.html">'.__('View more information on schema types here', 'site-reviews').'</a>',
269
-        'label' => __('Custom Schema Type', 'site-reviews'),
270
-        'type' => 'text',
271
-    ],
272
-    'settings.schema.name.default' => [
273
-        'default' => 'post',
274
-        'description' => __('Custom Field name', 'site-reviews').': <code>schema_name</code>',
275
-        'label' => __('Default Name', 'site-reviews'),
276
-        'options' => [
277
-            'post' => __('Use the assigned or current page title', 'site-reviews'),
278
-            'custom' => __('Enter a custom title', 'site-reviews'),
279
-        ],
280
-        'type' => 'select',
281
-    ],
282
-    'settings.schema.name.custom' => [
283
-        'default' => '',
284
-        'depends_on' => [
285
-            'settings.schema.name.default' => 'custom',
286
-        ],
287
-        'label' => __('Custom Name', 'site-reviews'),
288
-        'type' => 'text',
289
-    ],
290
-    'settings.schema.description.default' => [
291
-        'default' => 'post',
292
-        'description' => __('Custom Field name', 'site-reviews').': <code>schema_description</code>',
293
-        'label' => __('Default Description', 'site-reviews'),
294
-        'options' => [
295
-            'post' => __('Use the assigned or current page excerpt', 'site-reviews'),
296
-            'custom' => __('Enter a custom description', 'site-reviews'),
297
-        ],
298
-        'type' => 'select',
299
-    ],
300
-    'settings.schema.description.custom' => [
301
-        'default' => '',
302
-        'depends_on' => [
303
-            'settings.schema.description.default' => 'custom',
304
-        ],
305
-        'label' => __('Custom Description', 'site-reviews'),
306
-        'type' => 'text',
307
-    ],
308
-    'settings.schema.url.default' => [
309
-        'default' => 'post',
310
-        'description' => __('Custom Field name', 'site-reviews').': <code>schema_url</code>',
311
-        'label' => __('Default URL', 'site-reviews'),
312
-        'options' => [
313
-            'post' => __('Use the assigned or current page URL', 'site-reviews'),
314
-            'custom' => __('Enter a custom URL', 'site-reviews'),
315
-        ],
316
-        'type' => 'select',
317
-    ],
318
-    'settings.schema.url.custom' => [
319
-        'default' => '',
320
-        'depends_on' => [
321
-            'settings.schema.url.default' => 'custom',
322
-        ],
323
-        'label' => __('Custom URL', 'site-reviews'),
324
-        'type' => 'text',
325
-    ],
326
-    'settings.schema.image.default' => [
327
-        'default' => 'post',
328
-        'description' => __('Custom Field name', 'site-reviews').': <code>schema_image</code>',
329
-        'label' => __('Default Image', 'site-reviews'),
330
-        'options' => [
331
-            'post' => __('Use the featured image of the assigned or current page', 'site-reviews'),
332
-            'custom' => __('Enter a custom image URL', 'site-reviews'),
333
-        ],
334
-        'type' => 'select',
335
-    ],
336
-    'settings.schema.image.custom' => [
337
-        'default' => '',
338
-        'depends_on' => [
339
-            'settings.schema.image.default' => 'custom',
340
-        ],
341
-        'label' => __('Custom Image URL', 'site-reviews'),
342
-        'type' => 'text',
343
-    ],
344
-    'settings.schema.address' => [
345
-        'default' => '',
346
-        'depends_on' => [
347
-            'settings.schema.type.default' => 'LocalBusiness',
348
-        ],
349
-        'description' => __('Custom Field name', 'site-reviews').': <code>schema_address</code>',
350
-        'label' => __('Address', 'site-reviews'),
351
-        'placeholder' => '60 29th Street #343, San Francisco, CA 94110, US',
352
-        'type' => 'text',
353
-    ],
354
-    'settings.schema.telephone' => [
355
-        'default' => '',
356
-        'depends_on' => [
357
-            'settings.schema.type.default' => 'LocalBusiness',
358
-        ],
359
-        'description' => __('Custom Field name', 'site-reviews').': <code>schema_telephone</code>',
360
-        'label' => __('Telephone Number', 'site-reviews'),
361
-        'placeholder' => '+1 (877) 273-3049',
362
-        'type' => 'text',
363
-    ],
364
-    'settings.schema.pricerange' => [
365
-        'default' => '',
366
-        'depends_on' => [
367
-            'settings.schema.type.default' => 'LocalBusiness',
368
-        ],
369
-        'description' => __('Custom Field name', 'site-reviews').': <code>schema_pricerange</code>',
370
-        'label' => __('Price Range', 'site-reviews'),
371
-        'placeholder' => '$$-$$$',
372
-        'type' => 'text',
373
-    ],
374
-    'settings.schema.offertype' => [
375
-        'default' => 'AggregateOffer',
376
-        'depends_on' => [
377
-            'settings.schema.type.default' => 'Product',
378
-        ],
379
-        'description' => __('Custom Field name', 'site-reviews').': <code>schema_offertype</code>',
380
-        'label' => __('Offer Type', 'site-reviews'),
381
-        'options' => [
382
-            'AggregateOffer' => __('AggregateOffer', 'site-reviews'),
383
-            'Offer' => __('Offer', 'site-reviews'),
384
-        ],
385
-        'type' => 'select',
386
-    ],
387
-    'settings.schema.price' => [
388
-        'default' => '',
389
-        'depends_on' => [
390
-            'settings.schema.type.default' => 'Product',
391
-            'settings.schema.offertype' => 'Offer',
392
-        ],
393
-        'description' => __('Custom Field name', 'site-reviews').': <code>schema_price</code>',
394
-        'label' => __('Price', 'site-reviews'),
395
-        'placeholder' => '50.00',
396
-        'type' => 'text',
397
-    ],
398
-    'settings.schema.lowprice' => [
399
-        'default' => '',
400
-        'depends_on' => [
401
-            'settings.schema.type.default' => 'Product',
402
-            'settings.schema.offertype' => 'AggregateOffer',
403
-        ],
404
-        'description' => __('Custom Field name', 'site-reviews').': <code>schema_lowprice</code>',
405
-        'label' => __('Low Price', 'site-reviews'),
406
-        'placeholder' => '10.00',
407
-        'type' => 'text',
408
-    ],
409
-    'settings.schema.highprice' => [
410
-        'default' => '',
411
-        'depends_on' => [
412
-            'settings.schema.type.default' => 'Product',
413
-            'settings.schema.offertype' => 'AggregateOffer',
414
-        ],
415
-        'description' => __('Custom Field name', 'site-reviews').': <code>schema_highprice</code>',
416
-        'label' => __('High Price', 'site-reviews'),
417
-        'placeholder' => '100.00',
418
-        'type' => 'text',
419
-    ],
420
-    'settings.schema.pricecurrency' => [
421
-        'default' => '',
422
-        'depends_on' => [
423
-            'settings.schema.type.default' => 'Product',
424
-        ],
425
-        'description' => __('Custom Field name', 'site-reviews').': <code>schema_pricecurrency</code>',
426
-        'label' => __('Price Currency', 'site-reviews'),
427
-        'placeholder' => 'USD',
428
-        'type' => 'text',
429
-    ],
430
-    'settings.submissions.required' => [
431
-        'default' => ['content', 'email', 'name', 'rating', 'terms', 'title'],
432
-        'description' => __('Choose which fields should be required in the submission form.', 'site-reviews'),
433
-        'label' => __('Required Fields', 'site-reviews'),
434
-        'options' => [
435
-            'rating' => __('Rating', 'site-reviews'),
436
-            'title' => __('Title', 'site-reviews'),
437
-            'content' => __('Review', 'site-reviews'),
438
-            'name' => __('Name', 'site-reviews'),
439
-            'email' => __('Email', 'site-reviews'),
440
-            'terms' => __('Terms', 'site-reviews'),
441
-        ],
442
-        'type' => 'checkbox',
443
-    ],
444
-    'settings.submissions.limit' => [
445
-        'default' => '',
446
-        'description' => __('Limits the number of reviews that can be submitted to one-per-person. If you are assigning reviews, then the limit will be applied to the assigned page or category.', 'site-reviews'),
447
-        'label' => __('Limit Reviews', 'site-reviews'),
448
-        'options' => [
449
-            '' => __('No Limit', 'site-reviews'),
450
-            'email' => __('By Email Address', 'site-reviews'),
451
-            'ip_address' => __('By IP Address', 'site-reviews'),
452
-            'username' => __('By Username (will only work for registered users)', 'site-reviews'),
453
-        ],
454
-        'type' => 'select',
455
-    ],
456
-    'settings.submissions.limit_whitelist.email' => [
457
-        'default' => '',
458
-        'depends_on' => [
459
-            'settings.submissions.limit' => ['email'],
460
-        ],
461
-        'description' => __('One Email per line. All emails in the whitelist will be excluded from the review submission limit.', 'site-reviews'),
462
-        'label' => __('Email Whitelist', 'site-reviews'),
463
-        'rows' => 5,
464
-        'type' => 'code',
465
-    ],
466
-    'settings.submissions.limit_whitelist.ip_address' => [
467
-        'default' => '',
468
-        'depends_on' => [
469
-            'settings.submissions.limit' => ['ip_address'],
470
-        ],
471
-        'description' => __('One IP Address per line. All IP Addresses in the whitelist will be excluded from the review submission limit..', 'site-reviews'),
472
-        'label' => __('IP Address Whitelist', 'site-reviews'),
473
-        'rows' => 5,
474
-        'type' => 'code',
475
-    ],
476
-    'settings.submissions.limit_whitelist.username' => [
477
-        'default' => '',
478
-        'depends_on' => [
479
-            'settings.submissions.limit' => ['username'],
480
-        ],
481
-        'description' => __('One Username per line. All registered users with a Username in the whitelist will be excluded from the review submission limit.', 'site-reviews'),
482
-        'label' => __('Username Whitelist', 'site-reviews'),
483
-        'rows' => 5,
484
-        'type' => 'code',
485
-    ],
486
-    'settings.submissions.recaptcha.integration' => [
487
-        'default' => '',
488
-        'description' => __('Invisible reCAPTCHA is a free anti-spam service from Google. To use it, you will need to <a href="https://www.google.com/recaptcha/admin" target="_blank">sign up</a> for an API key pair for your site.', 'site-reviews'),
489
-        'label' => __('Invisible reCAPTCHA', 'site-reviews'),
490
-        'options' => [
491
-            '' => 'Do not use reCAPTCHA',
492
-            'all' => 'Use reCAPTCHA',
493
-            'guest' => 'Use reCAPTCHA only for guest users',
494
-        ],
495
-        'type' => 'select',
496
-    ],
497
-    'settings.submissions.recaptcha.key' => [
498
-        'default' => '',
499
-        'depends_on' => [
500
-            'settings.submissions.recaptcha.integration' => ['all', 'guest'],
501
-        ],
502
-        'label' => __('Site Key', 'site-reviews'),
503
-        'type' => 'text',
504
-    ],
505
-    'settings.submissions.recaptcha.secret' => [
506
-        'default' => '',
507
-        'depends_on' => [
508
-            'settings.submissions.recaptcha.integration' => ['all', 'guest'],
509
-        ],
510
-        'label' => __('Site Secret', 'site-reviews'),
511
-        'type' => 'text',
512
-    ],
513
-    'settings.submissions.recaptcha.position' => [
514
-        'default' => 'bottomleft',
515
-        'depends_on' => [
516
-            'settings.submissions.recaptcha.integration' => ['all', 'guest'],
517
-        ],
518
-        'description' => __('This option may not work consistently if another plugin is loading reCAPTCHA on the same page as Site Reviews.', 'site-reviews'),
519
-        'label' => __('Badge Position', 'site-reviews'),
520
-        'options' => [
521
-            'bottomleft' => 'Bottom Left',
522
-            'bottomright' => 'Bottom Right',
523
-            'inline' => 'Inline',
524
-        ],
525
-        'type' => 'select',
526
-    ],
527
-    'settings.submissions.akismet' => [
528
-        'default' => 'no',
529
-        'description' => __('The <a href="https://akismet.com" target="_blank">Akismet plugin</a> integration provides spam-filtering for your reviews. In order for this setting to have any affect, you will need to first install and activate the Akismet plugin and set up a WordPress.com API key.', 'site-reviews'),
530
-        'label' => __('Enable Akismet Integration', 'site-reviews'),
531
-        'type' => 'yes_no',
532
-    ],
533
-    'settings.submissions.blacklist.integration' => [
534
-        'default' => '',
535
-        'description' => sprintf(__('Choose which Blacklist you would prefer to use for reviews. The %s can be found in the WordPress Discussion Settings page.', 'site-reviews'),
536
-            '<a href="'.admin_url('options-discussion.php#users_can_register').'">'.__('Comment Blacklist', 'site-reviews').'</a>'
537
-        ),
538
-        'label' => __('Blacklist', 'site-reviews'),
539
-        'options' => [
540
-            '' => 'Use the Site Reviews Blacklist',
541
-            'comments' => 'Use the WordPress Comment Blacklist',
542
-        ],
543
-        'type' => 'select',
544
-    ],
545
-    'settings.submissions.blacklist.entries' => [
546
-        'default' => '',
547
-        'depends_on' => [
548
-            'settings.submissions.blacklist.integration' => [''],
549
-        ],
550
-        'description' => __('One entry or IP address per line. When a review contains any of these entries in its title, content, name, email, or IP address, it will be rejected. It is case-insensitive and will match partial words, so "press" will match "WordPress".', 'site-reviews'),
551
-        'label' => __('Review Blacklist', 'site-reviews'),
552
-        'rows' => 10,
553
-        'type' => 'code',
554
-    ],
555
-    'settings.submissions.blacklist.action' => [
556
-        'default' => 'unapprove',
557
-        'description' => __('Choose the action that should be taken when a review is blacklisted.', 'site-reviews'),
558
-        'label' => __('Blacklist Action', 'site-reviews'),
559
-        'options' => [
560
-            'unapprove' => __('Require approval', 'site-reviews'),
561
-            'reject' => __('Reject submission', 'site-reviews'),
562
-        ],
563
-        'type' => 'select',
564
-    ],
4
+	'settings.general.style' => [
5
+		'default' => 'default',
6
+		'description' => __('Site Reviews relies on the CSS of your theme to style the submission form. If your theme does not provide proper CSS rules for form elements and you are using a WordPress plugin/theme or CSS Framework listed here, please try selecting it, otherwise choose "Site Reviews (default)".', 'site-reviews'),
7
+		'label' => __('Plugin Style', 'site-reviews'),
8
+		'options' => [
9
+			'bootstrap_4' => 'CSS Framework: Bootstrap 4',
10
+			'bootstrap_4_custom' => 'CSS Framework: Bootstrap 4 (Custom Forms)',
11
+			'contact_form_7' => 'Plugin: Contact Form 7 (v5)',
12
+			'ninja_forms' => 'Plugin: Ninja Forms (v3)',
13
+			'wpforms' => 'Plugin: WPForms Lite (v1)',
14
+			'default' => __('Site Reviews (default)', 'site-reviews'),
15
+			'minimal' => __('Site Reviews (minimal)', 'site-reviews'),
16
+			'divi' => 'Theme: Divi (v3)',
17
+			'materialize' => 'Theme: Materialize',
18
+			'twentyfifteen' => 'Theme: Twenty Fifteen',
19
+			'twentyseventeen' => 'Theme: Twenty Seventeen',
20
+			'twentynineteen' => 'Theme: Twenty Nineteen',
21
+		],
22
+		'type' => 'select',
23
+	],
24
+	'settings.general.require.approval' => [
25
+		'default' => 'no',
26
+		'description' => __('Set the status of new review submissions to "unapproved".', 'site-reviews'),
27
+		'label' => __('Require Approval', 'site-reviews'),
28
+		'type' => 'yes_no',
29
+	],
30
+	'settings.general.require.login' => [
31
+		'default' => 'no',
32
+		'description' => __('Only allow review submissions from registered users.', 'site-reviews'),
33
+		'label' => __('Require Login', 'site-reviews'),
34
+		'type' => 'yes_no',
35
+	],
36
+	'settings.general.require.login_register' => [
37
+		'default' => 'no',
38
+		'depends_on' => [
39
+			'settings.general.require.login' => 'yes',
40
+		],
41
+		'description' => sprintf(__('Show a link for a new user to register. The %s Membership option must be enabled in General Settings for this to work.', 'site-reviews'),
42
+			'<a href="'.admin_url('options-general.php#users_can_register').'">'.__('Anyone can register', 'site-reviews').'</a>'
43
+		),
44
+		'label' => __('Show Registration Link', 'site-reviews'),
45
+		'type' => 'yes_no',
46
+	],
47
+	'settings.general.multilingual' => [
48
+		'default' => '',
49
+		'description' => __('Integrate with a multilingual plugin to calculate ratings for all languages of a post.', 'site-reviews'),
50
+		'label' => __('Multilingual', 'site-reviews'),
51
+		'options' => [
52
+			'' => __('No Integration', 'site-reviews'),
53
+			'polylang' => __('Integrate with Polylang', 'site-reviews'),
54
+			'wpml' => __('Integrate with WPML', 'site-reviews'),
55
+		],
56
+		'type' => 'select',
57
+	],
58
+	'settings.general.trustalyze' => [
59
+		'default' => 'no',
60
+		'description' => sprintf(__('Integrate with the %s and validate your reviews on the blockchain to increase online reputation, trust, and transparency.', 'site-reviews'),
61
+			'<a href="https://trustalyze.com/plans?ref=105" target="_blank">Trustalyze Confidence System</a>'
62
+		),
63
+		'label' => __('Blockchain Validation', 'site-reviews'),
64
+		'type' => 'yes_no',
65
+	],
66
+	'settings.general.trustalyze_email' => [
67
+		'default' => '',
68
+		'depends_on' => [
69
+			'settings.general.trustalyze' => ['yes'],
70
+		],
71
+		'description' => __('Enter your Trustalyze account email here.', 'site-reviews'),
72
+		'label' => __('Trustalyze Email', 'site-reviews'),
73
+		'type' => 'text',
74
+	],
75
+	'settings.general.trustalyze_serial' => [
76
+		'default' => '',
77
+		'depends_on' => [
78
+			'settings.general.trustalyze' => ['yes'],
79
+		],
80
+		'description' => __('Enter your Trustalyze account serial key here.', 'site-reviews'),
81
+		'label' => __('Trustalyze Serial Key', 'site-reviews'),
82
+		'type' => 'password',
83
+	],
84
+	'settings.general.notifications' => [
85
+		'default' => [],
86
+		'label' => __('Notifications', 'site-reviews'),
87
+		'options' => [
88
+			'admin' => __('Send to administrator', 'site-reviews').' <code>'.(string) get_option('admin_email').'</code>',
89
+			'author' => __('Send to author of the page that the review is assigned to', 'site-reviews'),
90
+			'custom' => __('Send to one or more email addresses', 'site-reviews'),
91
+			'slack' => __('Send to <a href="https://slack.com/">Slack</a>', 'site-reviews'),
92
+		],
93
+		'type' => 'checkbox',
94
+	],
95
+	'settings.general.notification_email' => [
96
+		'default' => '',
97
+		'depends_on' => [
98
+			'settings.general.notifications' => ['custom'],
99
+		],
100
+		'label' => __('Send Notification Emails To', 'site-reviews'),
101
+		'placeholder' => __('Separate multiple emails with a comma', 'site-reviews'),
102
+		'type' => 'text',
103
+	],
104
+	'settings.general.notification_slack' => [
105
+		'default' => '',
106
+		'depends_on' => [
107
+			'settings.general.notifications' => ['slack'],
108
+		],
109
+		'description' => sprintf(__('To send notifications to Slack, create a new %s and then paste the provided Webhook URL in the field above.', 'site-reviews'),
110
+			'<a href="https://api.slack.com/incoming-webhooks">'.__('Incoming WebHook', 'site-reviews').'</a>'
111
+		),
112
+		'label' => __('Slack Webhook URL', 'site-reviews'),
113
+		'type' => 'text',
114
+	],
115
+	'settings.general.notification_message' => [
116
+		'default' => glsr('Modules\Html\Template')->build('templates/email-notification'),
117
+		'depends_on' => [
118
+			'settings.general.notifications' => ['admin', 'author', 'custom', 'slack'],
119
+		],
120
+		'description' => __(
121
+			'To restore the default text, save an empty template. '.
122
+			'If you are sending notifications to Slack then this template will only be used as a fallback in the event that <a href="https://api.slack.com/docs/attachments">Message Attachments</a> have been disabled. Available template tags:'.
123
+			'<br><code>{review_rating}</code> The review rating number (1-5)'.
124
+			'<br><code>{review_title}</code> The review title'.
125
+			'<br><code>{review_content}</code> The review content'.
126
+			'<br><code>{review_author}</code> The review author'.
127
+			'<br><code>{review_email}</code> The email of the review author'.
128
+			'<br><code>{review_ip}</code> The IP address of the review author'.
129
+			'<br><code>{review_link}</code> The link to edit/view a review',
130
+			'site-reviews'
131
+		),
132
+		'label' => __('Notification Template', 'site-reviews'),
133
+		'rows' => 10,
134
+		'type' => 'code',
135
+	],
136
+	'settings.reviews.date.format' => [
137
+		'default' => '',
138
+		'description' => sprintf(__('The default date format is the one set in your %s.', 'site-reviews'),
139
+			'<a href="'.admin_url('options-general.php#date_format_custom').'">'.__('WordPress settings', 'site-reviews').'</a>'
140
+		),
141
+		'label' => __('Date Format', 'site-reviews'),
142
+		'options' => [
143
+			'' => __('Use the default date format', 'site-reviews'),
144
+			'relative' => __('Use a relative date format', 'site-reviews'),
145
+			'custom' => __('Use a custom date format', 'site-reviews'),
146
+		],
147
+		'type' => 'select',
148
+	],
149
+	'settings.reviews.date.custom' => [
150
+		'default' => get_option('date_format'),
151
+		'depends_on' => [
152
+			'settings.reviews.date.format' => 'custom',
153
+		],
154
+		'description' => __('Enter a custom date format (<a href="https://codex.wordpress.org/Formatting_Date_and_Time">documentation on date and time formatting</a>).', 'site-reviews'),
155
+		'label' => __('Custom Date Format', 'site-reviews'),
156
+		'type' => 'text',
157
+	],
158
+	'settings.reviews.name.format' => [
159
+		'default' => '',
160
+		'description' => __('Choose how names are shown in your reviews.', 'site-reviews'),
161
+		'label' => __('Name Format', 'site-reviews'),
162
+		'options' => [
163
+			'' => __('Use the name as given', 'site-reviews'),
164
+			'first' => __('Use the first name only', 'site-reviews'),
165
+			'first_initial' => __('Convert first name to an initial', 'site-reviews'),
166
+			'last_initial' => __('Convert last name to an initial', 'site-reviews'),
167
+			'initials' => __('Convert to all initials', 'site-reviews'),
168
+		],
169
+		'type' => 'select',
170
+	],
171
+	'settings.reviews.name.initial' => [
172
+		'default' => '',
173
+		'depends_on' => [
174
+			'settings.reviews.name.format' => ['first_initial', 'last_initial', 'initials'],
175
+		],
176
+		'description' => __('Choose how the initial is displayed.', 'site-reviews'),
177
+		'label' => __('Initial Format', 'site-reviews'),
178
+		'options' => [
179
+			'' => __('Initial with a space', 'site-reviews'),
180
+			'period' => __('Initial with a period', 'site-reviews'),
181
+			'period_space' => __('Initial with a period and a space', 'site-reviews'),
182
+		],
183
+		'type' => 'select',
184
+	],
185
+	'settings.reviews.assigned_links' => [
186
+		'default' => 'no',
187
+		'description' => __('Display a link to the assigned post of a review.', 'site-reviews'),
188
+		'label' => __('Enable Assigned Links', 'site-reviews'),
189
+		'type' => 'yes_no',
190
+	],
191
+	'settings.reviews.avatars' => [
192
+		'default' => 'no',
193
+		'description' => __('Display reviewer avatars. These are generated from the email address of the reviewer using <a href="https://gravatar.com">Gravatar</a>.', 'site-reviews'),
194
+		'label' => __('Enable Avatars', 'site-reviews'),
195
+		'type' => 'yes_no',
196
+	],
197
+	'settings.reviews.avatars_regenerate' => [
198
+		'default' => 'no',
199
+		'depends_on' => [
200
+			'settings.reviews.avatars' => 'yes',
201
+		],
202
+		'description' => __('Regenerate the avatar whenever a local review is shown?', 'site-reviews'),
203
+		'label' => __('Regenerate Avatars', 'site-reviews'),
204
+		'type' => 'yes_no',
205
+	],
206
+	'settings.reviews.avatars_size' => [
207
+		'default' => 40,
208
+		'depends_on' => [
209
+			'settings.reviews.avatars' => 'yes',
210
+		],
211
+		'description' => __('Set the avatar size in pixels.', 'site-reviews'),
212
+		'label' => __('Avatar Size', 'site-reviews'),
213
+		'type' => 'number',
214
+	],
215
+	'settings.reviews.excerpts' => [
216
+		'default' => 'yes',
217
+		'description' => __('Display an excerpt instead of the full review.', 'site-reviews'),
218
+		'label' => __('Enable Excerpts', 'site-reviews'),
219
+		'type' => 'yes_no',
220
+	],
221
+	'settings.reviews.excerpts_length' => [
222
+		'default' => 55,
223
+		'depends_on' => [
224
+			'settings.reviews.excerpts' => 'yes',
225
+		],
226
+		'description' => __('Set the excerpt word length.', 'site-reviews'),
227
+		'label' => __('Excerpt Length', 'site-reviews'),
228
+		'type' => 'number',
229
+	],
230
+	'settings.reviews.fallback' => [
231
+		'default' => 'yes',
232
+		'description' => sprintf(__('Display the fallback text when there are no reviews to display. This can be changed on the %s page. You may also override this by using the "fallback" option on the shortcode. The default fallback text is: %s', 'site-reviews'),
233
+			'<a href="'.admin_url('edit.php?post_type='.glsr()->post_type.'&page=settings#tab-translations').'">'.__('Translations', 'site-reviews').'</a>',
234
+			'<code>'.__('There are no reviews yet. Be the first one to write one.', 'site-reviews').'</code>'
235
+		),
236
+		'label' => __('Enable Fallback Text', 'site-reviews'),
237
+		'type' => 'yes_no',
238
+	],
239
+	'settings.reviews.pagination.url_parameter' => [
240
+		'default' => 'yes',
241
+		'description' => sprintf(
242
+			_x('Paginated URLs include the %s URL parameter. If you would like to keep the pagination links but prevent search engines from indexing them, add the following lines to your %s file instead: %s', 'admin-text', 'site-reviews'),
243
+			'<code>?'.glsr()->constant('PAGED_QUERY_VAR').'={page_number}</code>',
244
+			'<a href="https://www.robotstxt.org/">robots.txt</a>',
245
+			'<br><code>user-agent: *</code>'.
246
+			'<br><code>Disallow: /*?'.glsr()->constant('PAGED_QUERY_VAR').'=*</code>'.
247
+			'<br><code>Disallow: /*?*'.glsr()->constant('PAGED_QUERY_VAR').'=*</code>'
248
+		),
249
+		'label' => esc_html_x('Enable Paginated URLs', 'admin-text', 'site-reviews'),
250
+		'type' => 'yes_no',
251
+	],
252
+	'settings.schema.type.default' => [
253
+		'default' => 'LocalBusiness',
254
+		'description' => __('Custom Field name', 'site-reviews').': <code>schema_type</code>',
255
+		'label' => __('Default Schema Type', 'site-reviews'),
256
+		'options' => [
257
+			'LocalBusiness' => __('Local Business', 'site-reviews'),
258
+			'Product' => __('Product', 'site-reviews'),
259
+			'custom' => __('Custom', 'site-reviews'),
260
+		],
261
+		'type' => 'select',
262
+	],
263
+	'settings.schema.type.custom' => [
264
+		'default' => '',
265
+		'depends_on' => [
266
+			'settings.schema.type.default' => 'custom',
267
+		],
268
+		'description' => '<a href="https://schema.org/docs/schemas.html">'.__('View more information on schema types here', 'site-reviews').'</a>',
269
+		'label' => __('Custom Schema Type', 'site-reviews'),
270
+		'type' => 'text',
271
+	],
272
+	'settings.schema.name.default' => [
273
+		'default' => 'post',
274
+		'description' => __('Custom Field name', 'site-reviews').': <code>schema_name</code>',
275
+		'label' => __('Default Name', 'site-reviews'),
276
+		'options' => [
277
+			'post' => __('Use the assigned or current page title', 'site-reviews'),
278
+			'custom' => __('Enter a custom title', 'site-reviews'),
279
+		],
280
+		'type' => 'select',
281
+	],
282
+	'settings.schema.name.custom' => [
283
+		'default' => '',
284
+		'depends_on' => [
285
+			'settings.schema.name.default' => 'custom',
286
+		],
287
+		'label' => __('Custom Name', 'site-reviews'),
288
+		'type' => 'text',
289
+	],
290
+	'settings.schema.description.default' => [
291
+		'default' => 'post',
292
+		'description' => __('Custom Field name', 'site-reviews').': <code>schema_description</code>',
293
+		'label' => __('Default Description', 'site-reviews'),
294
+		'options' => [
295
+			'post' => __('Use the assigned or current page excerpt', 'site-reviews'),
296
+			'custom' => __('Enter a custom description', 'site-reviews'),
297
+		],
298
+		'type' => 'select',
299
+	],
300
+	'settings.schema.description.custom' => [
301
+		'default' => '',
302
+		'depends_on' => [
303
+			'settings.schema.description.default' => 'custom',
304
+		],
305
+		'label' => __('Custom Description', 'site-reviews'),
306
+		'type' => 'text',
307
+	],
308
+	'settings.schema.url.default' => [
309
+		'default' => 'post',
310
+		'description' => __('Custom Field name', 'site-reviews').': <code>schema_url</code>',
311
+		'label' => __('Default URL', 'site-reviews'),
312
+		'options' => [
313
+			'post' => __('Use the assigned or current page URL', 'site-reviews'),
314
+			'custom' => __('Enter a custom URL', 'site-reviews'),
315
+		],
316
+		'type' => 'select',
317
+	],
318
+	'settings.schema.url.custom' => [
319
+		'default' => '',
320
+		'depends_on' => [
321
+			'settings.schema.url.default' => 'custom',
322
+		],
323
+		'label' => __('Custom URL', 'site-reviews'),
324
+		'type' => 'text',
325
+	],
326
+	'settings.schema.image.default' => [
327
+		'default' => 'post',
328
+		'description' => __('Custom Field name', 'site-reviews').': <code>schema_image</code>',
329
+		'label' => __('Default Image', 'site-reviews'),
330
+		'options' => [
331
+			'post' => __('Use the featured image of the assigned or current page', 'site-reviews'),
332
+			'custom' => __('Enter a custom image URL', 'site-reviews'),
333
+		],
334
+		'type' => 'select',
335
+	],
336
+	'settings.schema.image.custom' => [
337
+		'default' => '',
338
+		'depends_on' => [
339
+			'settings.schema.image.default' => 'custom',
340
+		],
341
+		'label' => __('Custom Image URL', 'site-reviews'),
342
+		'type' => 'text',
343
+	],
344
+	'settings.schema.address' => [
345
+		'default' => '',
346
+		'depends_on' => [
347
+			'settings.schema.type.default' => 'LocalBusiness',
348
+		],
349
+		'description' => __('Custom Field name', 'site-reviews').': <code>schema_address</code>',
350
+		'label' => __('Address', 'site-reviews'),
351
+		'placeholder' => '60 29th Street #343, San Francisco, CA 94110, US',
352
+		'type' => 'text',
353
+	],
354
+	'settings.schema.telephone' => [
355
+		'default' => '',
356
+		'depends_on' => [
357
+			'settings.schema.type.default' => 'LocalBusiness',
358
+		],
359
+		'description' => __('Custom Field name', 'site-reviews').': <code>schema_telephone</code>',
360
+		'label' => __('Telephone Number', 'site-reviews'),
361
+		'placeholder' => '+1 (877) 273-3049',
362
+		'type' => 'text',
363
+	],
364
+	'settings.schema.pricerange' => [
365
+		'default' => '',
366
+		'depends_on' => [
367
+			'settings.schema.type.default' => 'LocalBusiness',
368
+		],
369
+		'description' => __('Custom Field name', 'site-reviews').': <code>schema_pricerange</code>',
370
+		'label' => __('Price Range', 'site-reviews'),
371
+		'placeholder' => '$$-$$$',
372
+		'type' => 'text',
373
+	],
374
+	'settings.schema.offertype' => [
375
+		'default' => 'AggregateOffer',
376
+		'depends_on' => [
377
+			'settings.schema.type.default' => 'Product',
378
+		],
379
+		'description' => __('Custom Field name', 'site-reviews').': <code>schema_offertype</code>',
380
+		'label' => __('Offer Type', 'site-reviews'),
381
+		'options' => [
382
+			'AggregateOffer' => __('AggregateOffer', 'site-reviews'),
383
+			'Offer' => __('Offer', 'site-reviews'),
384
+		],
385
+		'type' => 'select',
386
+	],
387
+	'settings.schema.price' => [
388
+		'default' => '',
389
+		'depends_on' => [
390
+			'settings.schema.type.default' => 'Product',
391
+			'settings.schema.offertype' => 'Offer',
392
+		],
393
+		'description' => __('Custom Field name', 'site-reviews').': <code>schema_price</code>',
394
+		'label' => __('Price', 'site-reviews'),
395
+		'placeholder' => '50.00',
396
+		'type' => 'text',
397
+	],
398
+	'settings.schema.lowprice' => [
399
+		'default' => '',
400
+		'depends_on' => [
401
+			'settings.schema.type.default' => 'Product',
402
+			'settings.schema.offertype' => 'AggregateOffer',
403
+		],
404
+		'description' => __('Custom Field name', 'site-reviews').': <code>schema_lowprice</code>',
405
+		'label' => __('Low Price', 'site-reviews'),
406
+		'placeholder' => '10.00',
407
+		'type' => 'text',
408
+	],
409
+	'settings.schema.highprice' => [
410
+		'default' => '',
411
+		'depends_on' => [
412
+			'settings.schema.type.default' => 'Product',
413
+			'settings.schema.offertype' => 'AggregateOffer',
414
+		],
415
+		'description' => __('Custom Field name', 'site-reviews').': <code>schema_highprice</code>',
416
+		'label' => __('High Price', 'site-reviews'),
417
+		'placeholder' => '100.00',
418
+		'type' => 'text',
419
+	],
420
+	'settings.schema.pricecurrency' => [
421
+		'default' => '',
422
+		'depends_on' => [
423
+			'settings.schema.type.default' => 'Product',
424
+		],
425
+		'description' => __('Custom Field name', 'site-reviews').': <code>schema_pricecurrency</code>',
426
+		'label' => __('Price Currency', 'site-reviews'),
427
+		'placeholder' => 'USD',
428
+		'type' => 'text',
429
+	],
430
+	'settings.submissions.required' => [
431
+		'default' => ['content', 'email', 'name', 'rating', 'terms', 'title'],
432
+		'description' => __('Choose which fields should be required in the submission form.', 'site-reviews'),
433
+		'label' => __('Required Fields', 'site-reviews'),
434
+		'options' => [
435
+			'rating' => __('Rating', 'site-reviews'),
436
+			'title' => __('Title', 'site-reviews'),
437
+			'content' => __('Review', 'site-reviews'),
438
+			'name' => __('Name', 'site-reviews'),
439
+			'email' => __('Email', 'site-reviews'),
440
+			'terms' => __('Terms', 'site-reviews'),
441
+		],
442
+		'type' => 'checkbox',
443
+	],
444
+	'settings.submissions.limit' => [
445
+		'default' => '',
446
+		'description' => __('Limits the number of reviews that can be submitted to one-per-person. If you are assigning reviews, then the limit will be applied to the assigned page or category.', 'site-reviews'),
447
+		'label' => __('Limit Reviews', 'site-reviews'),
448
+		'options' => [
449
+			'' => __('No Limit', 'site-reviews'),
450
+			'email' => __('By Email Address', 'site-reviews'),
451
+			'ip_address' => __('By IP Address', 'site-reviews'),
452
+			'username' => __('By Username (will only work for registered users)', 'site-reviews'),
453
+		],
454
+		'type' => 'select',
455
+	],
456
+	'settings.submissions.limit_whitelist.email' => [
457
+		'default' => '',
458
+		'depends_on' => [
459
+			'settings.submissions.limit' => ['email'],
460
+		],
461
+		'description' => __('One Email per line. All emails in the whitelist will be excluded from the review submission limit.', 'site-reviews'),
462
+		'label' => __('Email Whitelist', 'site-reviews'),
463
+		'rows' => 5,
464
+		'type' => 'code',
465
+	],
466
+	'settings.submissions.limit_whitelist.ip_address' => [
467
+		'default' => '',
468
+		'depends_on' => [
469
+			'settings.submissions.limit' => ['ip_address'],
470
+		],
471
+		'description' => __('One IP Address per line. All IP Addresses in the whitelist will be excluded from the review submission limit..', 'site-reviews'),
472
+		'label' => __('IP Address Whitelist', 'site-reviews'),
473
+		'rows' => 5,
474
+		'type' => 'code',
475
+	],
476
+	'settings.submissions.limit_whitelist.username' => [
477
+		'default' => '',
478
+		'depends_on' => [
479
+			'settings.submissions.limit' => ['username'],
480
+		],
481
+		'description' => __('One Username per line. All registered users with a Username in the whitelist will be excluded from the review submission limit.', 'site-reviews'),
482
+		'label' => __('Username Whitelist', 'site-reviews'),
483
+		'rows' => 5,
484
+		'type' => 'code',
485
+	],
486
+	'settings.submissions.recaptcha.integration' => [
487
+		'default' => '',
488
+		'description' => __('Invisible reCAPTCHA is a free anti-spam service from Google. To use it, you will need to <a href="https://www.google.com/recaptcha/admin" target="_blank">sign up</a> for an API key pair for your site.', 'site-reviews'),
489
+		'label' => __('Invisible reCAPTCHA', 'site-reviews'),
490
+		'options' => [
491
+			'' => 'Do not use reCAPTCHA',
492
+			'all' => 'Use reCAPTCHA',
493
+			'guest' => 'Use reCAPTCHA only for guest users',
494
+		],
495
+		'type' => 'select',
496
+	],
497
+	'settings.submissions.recaptcha.key' => [
498
+		'default' => '',
499
+		'depends_on' => [
500
+			'settings.submissions.recaptcha.integration' => ['all', 'guest'],
501
+		],
502
+		'label' => __('Site Key', 'site-reviews'),
503
+		'type' => 'text',
504
+	],
505
+	'settings.submissions.recaptcha.secret' => [
506
+		'default' => '',
507
+		'depends_on' => [
508
+			'settings.submissions.recaptcha.integration' => ['all', 'guest'],
509
+		],
510
+		'label' => __('Site Secret', 'site-reviews'),
511
+		'type' => 'text',
512
+	],
513
+	'settings.submissions.recaptcha.position' => [
514
+		'default' => 'bottomleft',
515
+		'depends_on' => [
516
+			'settings.submissions.recaptcha.integration' => ['all', 'guest'],
517
+		],
518
+		'description' => __('This option may not work consistently if another plugin is loading reCAPTCHA on the same page as Site Reviews.', 'site-reviews'),
519
+		'label' => __('Badge Position', 'site-reviews'),
520
+		'options' => [
521
+			'bottomleft' => 'Bottom Left',
522
+			'bottomright' => 'Bottom Right',
523
+			'inline' => 'Inline',
524
+		],
525
+		'type' => 'select',
526
+	],
527
+	'settings.submissions.akismet' => [
528
+		'default' => 'no',
529
+		'description' => __('The <a href="https://akismet.com" target="_blank">Akismet plugin</a> integration provides spam-filtering for your reviews. In order for this setting to have any affect, you will need to first install and activate the Akismet plugin and set up a WordPress.com API key.', 'site-reviews'),
530
+		'label' => __('Enable Akismet Integration', 'site-reviews'),
531
+		'type' => 'yes_no',
532
+	],
533
+	'settings.submissions.blacklist.integration' => [
534
+		'default' => '',
535
+		'description' => sprintf(__('Choose which Blacklist you would prefer to use for reviews. The %s can be found in the WordPress Discussion Settings page.', 'site-reviews'),
536
+			'<a href="'.admin_url('options-discussion.php#users_can_register').'">'.__('Comment Blacklist', 'site-reviews').'</a>'
537
+		),
538
+		'label' => __('Blacklist', 'site-reviews'),
539
+		'options' => [
540
+			'' => 'Use the Site Reviews Blacklist',
541
+			'comments' => 'Use the WordPress Comment Blacklist',
542
+		],
543
+		'type' => 'select',
544
+	],
545
+	'settings.submissions.blacklist.entries' => [
546
+		'default' => '',
547
+		'depends_on' => [
548
+			'settings.submissions.blacklist.integration' => [''],
549
+		],
550
+		'description' => __('One entry or IP address per line. When a review contains any of these entries in its title, content, name, email, or IP address, it will be rejected. It is case-insensitive and will match partial words, so "press" will match "WordPress".', 'site-reviews'),
551
+		'label' => __('Review Blacklist', 'site-reviews'),
552
+		'rows' => 10,
553
+		'type' => 'code',
554
+	],
555
+	'settings.submissions.blacklist.action' => [
556
+		'default' => 'unapprove',
557
+		'description' => __('Choose the action that should be taken when a review is blacklisted.', 'site-reviews'),
558
+		'label' => __('Blacklist Action', 'site-reviews'),
559
+		'options' => [
560
+			'unapprove' => __('Require approval', 'site-reviews'),
561
+			'reject' => __('Reject submission', 'site-reviews'),
562
+		],
563
+		'type' => 'select',
564
+	],
565 565
 ];
Please login to merge, or discard this patch.
plugin/Modules/Html/Partials/Pagination.php 1 patch
Indentation   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -11,74 +11,74 @@
 block discarded – undo
11 11
 
12 12
 class Pagination implements PartialContract
13 13
 {
14
-    /**
15
-     * @var array
16
-     */
17
-    protected $args;
14
+	/**
15
+	 * @var array
16
+	 */
17
+	protected $args;
18 18
 
19
-    /**
20
-     * @return string
21
-     */
22
-    public function build(array $args = [])
23
-    {
24
-        $this->args = $this->normalize($args);
25
-        if ($this->args['total'] < 2) {
26
-            return '';
27
-        }
28
-        return glsr(Template::class)->build('templates/pagination', [
29
-            'context' => [
30
-                'links' => apply_filters('site-reviews/paginate_links', $this->buildLinks(), $this->args),
31
-                'loader' => '<div class="glsr-loader"></div>',
32
-                'screen_reader_text' => __('Site Reviews navigation', 'site-reviews'),
33
-            ],
34
-        ]);
35
-    }
19
+	/**
20
+	 * @return string
21
+	 */
22
+	public function build(array $args = [])
23
+	{
24
+		$this->args = $this->normalize($args);
25
+		if ($this->args['total'] < 2) {
26
+			return '';
27
+		}
28
+		return glsr(Template::class)->build('templates/pagination', [
29
+			'context' => [
30
+				'links' => apply_filters('site-reviews/paginate_links', $this->buildLinks(), $this->args),
31
+				'loader' => '<div class="glsr-loader"></div>',
32
+				'screen_reader_text' => __('Site Reviews navigation', 'site-reviews'),
33
+			],
34
+		]);
35
+	}
36 36
 
37
-    /**
38
-     * @return string
39
-     */
40
-    protected function buildFauxLinks()
41
-    {
42
-        $links = (array) paginate_links(wp_parse_args(['type' => 'array'], $this->args));
43
-        $pattern = '/(href=["\'])([^"\']*?)(["\'])/i';
44
-        foreach ($links as &$link) {
45
-            if (!preg_match($pattern, $link, $matches)) {
46
-                continue;
47
-            }
48
-            parse_str(parse_url(Arr::get($matches, 2), PHP_URL_QUERY), $urlQuery);
49
-            $page = (int) Arr::get($urlQuery, glsr()->constant('PAGED_QUERY_VAR'), 1);
50
-            $replacement = sprintf('data-page="%d" href="#"', $page);
51
-            $link = str_replace(Arr::get($matches, 0), $replacement, $link);
52
-        }
53
-        return implode("\n", $links);
54
-    }
37
+	/**
38
+	 * @return string
39
+	 */
40
+	protected function buildFauxLinks()
41
+	{
42
+		$links = (array) paginate_links(wp_parse_args(['type' => 'array'], $this->args));
43
+		$pattern = '/(href=["\'])([^"\']*?)(["\'])/i';
44
+		foreach ($links as &$link) {
45
+			if (!preg_match($pattern, $link, $matches)) {
46
+				continue;
47
+			}
48
+			parse_str(parse_url(Arr::get($matches, 2), PHP_URL_QUERY), $urlQuery);
49
+			$page = (int) Arr::get($urlQuery, glsr()->constant('PAGED_QUERY_VAR'), 1);
50
+			$replacement = sprintf('data-page="%d" href="#"', $page);
51
+			$link = str_replace(Arr::get($matches, 0), $replacement, $link);
52
+		}
53
+		return implode("\n", $links);
54
+	}
55 55
 
56
-    /**
57
-     * @return string
58
-     */
59
-    protected function buildLinks()
60
-    {
61
-        return glsr(OptionManager::class)->getBool('settings.reviews.pagination.url_parameter')
62
-            ? paginate_links($this->args)
63
-            : $this->buildFauxLinks();
64
-    }
56
+	/**
57
+	 * @return string
58
+	 */
59
+	protected function buildLinks()
60
+	{
61
+		return glsr(OptionManager::class)->getBool('settings.reviews.pagination.url_parameter')
62
+			? paginate_links($this->args)
63
+			: $this->buildFauxLinks();
64
+	}
65 65
 
66
-    /**
67
-     * @return array
68
-     */
69
-    protected function normalize(array $args)
70
-    {
71
-        if ($baseUrl = Arr::get($args, 'baseUrl')) {
72
-            $args['base'] = $baseUrl.'%_%';
73
-        }
74
-        $args = wp_parse_args(array_filter($args), [
75
-            'current' => glsr(QueryBuilder::class)->getPaged(),
76
-            'total' => 1,
77
-        ]);
78
-        $args = glsr(Style::class)->paginationArgs($args);
79
-        if ('array' == $args['type']) {
80
-            $args['type'] = 'plain';
81
-        }
82
-        return $args;
83
-    }
66
+	/**
67
+	 * @return array
68
+	 */
69
+	protected function normalize(array $args)
70
+	{
71
+		if ($baseUrl = Arr::get($args, 'baseUrl')) {
72
+			$args['base'] = $baseUrl.'%_%';
73
+		}
74
+		$args = wp_parse_args(array_filter($args), [
75
+			'current' => glsr(QueryBuilder::class)->getPaged(),
76
+			'total' => 1,
77
+		]);
78
+		$args = glsr(Style::class)->paginationArgs($args);
79
+		if ('array' == $args['type']) {
80
+			$args['type'] = 'plain';
81
+		}
82
+		return $args;
83
+	}
84 84
 }
Please login to merge, or discard this patch.