PluginProbe
Content Blocks Builder – Create blocks, repeater blocks with carousel, grid, popup layouts / trunk
Content Blocks Builder – Create blocks, repeater blocks with carousel, grid, popup layouts vtrunk
2.8.14 2.8.13 2.8.12 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.10 2.8.11 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 trunk 1.0.1 1.0.2 1.1.0 1.1.1 All 147 releases
← All changes | includes/maintenance.php +18 -12 2.7.8trunk View file →
@@ -38,17 +38,19 @@
38 38 *
39 39 * @return void
40 40 */
41 41 public function register_settings() {
42 + // phpcs:disable PluginCheck.CodeAnalysis.SettingSanitization.register_settingDynamic
42 43 register_setting(
43 44 'cbb',
44 45 'cbb_is_maintenance',
45 46 [
46 - 'type' => 'boolean',
47 - 'show_in_rest' => [
47 + 'type' => 'boolean',
48 + 'sanitize_callback' => 'rest_sanitize_boolean',
49 + 'show_in_rest' => [
48 50 'name' => 'IsMaintenance',
49 51 ],
50 - 'default' => false,
52 + 'default' => false,
51 53 ]
52 54 );
53 55
54 56 register_setting(
@@ -54,13 +56,14 @@
54 56 register_setting(
55 57 'cbb',
56 58 'cbb_maintenance_ignore_slug',
57 59 [
58 - 'type' => 'string',
59 - 'show_in_rest' => [
60 + 'type' => 'string',
61 + 'sanitize_callback' => 'sanitize_text_field',
62 + 'show_in_rest' => [
60 63 'name' => 'MaintenanceSlug',
61 64 ],
62 - 'default' => 'wp-login.php',
65 + 'default' => 'wp-login.php',
63 66 ]
64 67 );
65 68
66 69 register_setting(
@@ -66,13 +69,14 @@
66 69 register_setting(
67 70 'cbb',
68 71 'cbb_maintenance_enable_custom_page',
69 72 [
70 - 'type' => 'boolean',
71 - 'show_in_rest' => [
73 + 'type' => 'boolean',
74 + 'sanitize_callback' => 'rest_sanitize_boolean',
75 + 'show_in_rest' => [
72 76 'name' => 'MaintananceEnableCustomPage',
73 77 ],
74 - 'default' => false,
78 + 'default' => false,
75 79 ]
76 80 );
77 81
78 82 register_setting(
@@ -78,15 +82,17 @@
78 82 register_setting(
79 83 'cbb',
80 84 'cbb_maintenance_page_id',
81 85 [
82 - 'type' => 'integer',
83 - 'show_in_rest' => [
86 + 'type' => 'integer',
87 + 'sanitize_callback' => 'absint',
88 + 'show_in_rest' => [
84 89 'name' => 'MaintanancePageId',
85 90 ],
86 - 'default' => 0,
91 + 'default' => 0,
87 92 ]
88 93 );
94 + // phpcs:enable PluginCheck.CodeAnalysis.SettingSanitization.register_settingDynamic
89 95 }
90 96
91 97 /**
92 98 * Starting point