99 * Text Domain: cliowp-settings-page
1010 * Domain Path: /languages
1111 * Requires PHP: 5.6.20
12- * Tested up to: 6.0.2
12+ * Tested up to: 6.1
1313 * License: GPLv2 or later
1414 *
1515 * @package ClioWP_Settings_Page
@@ -76,8 +76,8 @@ class ClioWP_Settings_Page {
7676 */
7777public function __construct () {
7878// parameters.
79- $ this ->page_title = __ ( 'Test Settings Page ' , 'cliowp-settings-page ' );
80- $ this ->menu_title = __ ( 'Test Settings ' , 'cliowp-settings-page ' );
79+ $ this ->page_title = esc_html__ ( 'Test Settings Page ' , 'cliowp-settings-page ' );
80+ $ this ->menu_title = esc_html__ ( 'Test Settings ' , 'cliowp-settings-page ' );
8181$ this ->capability = 'manage_options ' ;
8282$ this ->menu_slug = 'cliowp-settings-page-slug ' ;
8383
@@ -142,14 +142,14 @@ public function add_settings() {
142142 */
143143add_settings_section (
144144'cliowp_settings_page_section1 ' ,
145- __ ( 'Section A ' , 'cliowp-settings-page ' ),
145+ esc_html__ ( 'Section A ' , 'cliowp-settings-page ' ),
146146null ,
147147$ this ->menu_slug
148148);
149149
150150add_settings_section (
151151'cliowp_settings_page_section2 ' ,
152- __ ( 'Section B ' , 'cliowp-settings-page ' ),
152+ esc_html__ ( 'Section B ' , 'cliowp-settings-page ' ),
153153null ,
154154$ this ->menu_slug
155155);
@@ -188,7 +188,7 @@ public function add_settings() {
188188 */
189189add_settings_field (
190190'cliowp_sp_input1 ' ,
191- __ ( 'Input1 Label ' , 'cliowp-settings-page ' ),
191+ esc_html__ ( 'Input1 Label ' , 'cliowp-settings-page ' ),
192192array ( $ this , 'input1_html ' ),
193193$ this ->menu_slug ,
194194'cliowp_settings_page_section1 '
@@ -226,7 +226,7 @@ public function add_settings() {
226226// Date field ---------------------------------------------------------.
227227add_settings_field (
228228'cliowp_sp_date1 ' ,
229- __ ( 'Date1 Label ' , 'cliowp-settings-page ' ),
229+ esc_html__ ( 'Date1 Label ' , 'cliowp-settings-page ' ),
230230array ( $ this , 'date1_html ' ),
231231$ this ->menu_slug ,
232232'cliowp_settings_page_section1 '
@@ -243,7 +243,7 @@ public function add_settings() {
243243// DateTime field -----------------------------------------------------.
244244add_settings_field (
245245'cliowp_sp_datetime1 ' ,
246- __ ( 'Datetime1 Label ' , 'cliowp-settings-page ' ),
246+ esc_html__ ( 'Datetime1 Label ' , 'cliowp-settings-page ' ),
247247array ( $ this , 'datetime1_html ' ),
248248$ this ->menu_slug ,
249249'cliowp_settings_page_section1 '
@@ -260,7 +260,7 @@ public function add_settings() {
260260// Password field -----------------------------------------------------.
261261add_settings_field (
262262'cliowp_sp_password1 ' ,
263- __ ( 'Password1 Label ' , 'cliowp-settings-page ' ),
263+ esc_html__ ( 'Password1 Label ' , 'cliowp-settings-page ' ),
264264array ( $ this , 'password1_html ' ),
265265$ this ->menu_slug ,
266266'cliowp_settings_page_section1 '
@@ -277,7 +277,7 @@ public function add_settings() {
277277// Number field -------------------------------------------------------.
278278add_settings_field (
279279'cliowp_sp_number1 ' ,
280- __ ( 'Number1 Label ' , 'cliowp-settings-page ' ),
280+ esc_html__ ( 'Number1 Label ' , 'cliowp-settings-page ' ),
281281array ( $ this , 'number1_html ' ),
282282$ this ->menu_slug ,
283283'cliowp_settings_page_section1 ' ,
@@ -296,7 +296,7 @@ public function add_settings() {
296296// Select field -------------------------------------------------------.
297297add_settings_field (
298298'cliowp_sp_select1 ' ,
299- __ ( 'Select1 Label ' , 'cliowp-settings-page ' ),
299+ esc_html__ ( 'Select1 Label ' , 'cliowp-settings-page ' ),
300300array ( $ this , 'select1_html ' ),
301301$ this ->menu_slug ,
302302'cliowp_settings_page_section1 '
@@ -314,7 +314,7 @@ public function add_settings() {
314314// Checkbox field -----------------------------------------------------.
315315add_settings_field (
316316'cliowp_sp_checkbox1 ' ,
317- __ ( 'Checkbox1 Label ' , 'cliowp-settings-page ' ),
317+ esc_html__ ( 'Checkbox1 Label ' , 'cliowp-settings-page ' ),
318318array ( $ this , 'checkbox1_html ' ),
319319$ this ->menu_slug ,
320320'cliowp_settings_page_section1 '
@@ -332,7 +332,7 @@ public function add_settings() {
332332// MultiSelect field --------------------------------------------------.
333333add_settings_field (
334334'cliowp_sp_multiselect1 ' ,
335- __ ( 'MultiSelect1 Label ' , 'cliowp-settings-page ' ),
335+ esc_html__ ( 'MultiSelect1 Label ' , 'cliowp-settings-page ' ),
336336array ( $ this , 'multiselect1_html ' ),
337337$ this ->menu_slug ,
338338'cliowp_settings_page_section2 '
@@ -346,7 +346,7 @@ public function add_settings() {
346346// Textarea field -----------------------------------------------------.
347347add_settings_field (
348348'cliowp_sp_textarea1 ' ,
349- __ ( 'Textarea1 Label ' , 'cliowp-settings-page ' ),
349+ esc_html__ ( 'Textarea1 Label ' , 'cliowp-settings-page ' ),
350350array ( $ this , 'textarea1_html ' ),
351351$ this ->menu_slug ,
352352'cliowp_settings_page_section2 ' ,
@@ -367,7 +367,7 @@ public function add_settings() {
367367// Color field --------------------------------------------------------.
368368add_settings_field (
369369'cliowp_sp_color1 ' ,
370- __ ( 'Color1 Label ' , 'cliowp-settings-page ' ),
370+ esc_html__ ( 'Color1 Label ' , 'cliowp-settings-page ' ),
371371array ( $ this , 'color1_html ' ),
372372$ this ->menu_slug ,
373373'cliowp_settings_page_section2 '
@@ -381,7 +381,7 @@ public function add_settings() {
381381// WYSIWYG editor field -----------------------------------------------.
382382add_settings_field (
383383'cliowp_sp_editor1 ' ,
384- __ ( 'Editor1 Label ' , 'cliowp-settings-page ' ),
384+ esc_html__ ( 'Editor1 Label ' , 'cliowp-settings-page ' ),
385385array ( $ this , 'editor1_html ' ),
386386$ this ->menu_slug ,
387387'cliowp_settings_page_section2 ' ,
@@ -415,7 +415,7 @@ public function sanitize_input1( $input ) {
415415add_settings_error (
416416'cliowp_sp_input1 ' ,
417417'cliowp_sp_input1_error ' ,
418- __ ( 'Input1 cannot be empty ' , 'cliowp-settings-page ' ),
418+ esc_html__ ( 'Input1 cannot be empty ' , 'cliowp-settings-page ' ),
419419);
420420return get_option ( 'cliowp_sp_input1 ' );
421421}
@@ -503,7 +503,7 @@ public function sanitize_select1( $input ) {
503503add_settings_error (
504504'cliowp_sp_select1 ' ,
505505'cliowp_sp_select1_error ' ,
506- __ ( 'Invalid option for Select1 ' , 'cliowp-settings-page ' ),
506+ esc_html__ ( 'Invalid option for Select1 ' , 'cliowp-settings-page ' ),
507507);
508508return get_option ( 'cliowp_sp_select1 ' );
509509}
0 commit comments