PluginProbe
Blocks – Reusable Content, Shortcodes & Site Variables / trunk
Blocks – Reusable Content, Shortcodes & Site Variables vtrunk
26.09.03.15 26.08.31.21 26.08.22.20 26.08.22.22 26.08.22.17 26.08.22.13 26.08.21.19 26.08.07.23 26.07.19.14 26.07.13.21 26.07.13.17 26.07.12.13 026.07.07.21 026.07.05.18 026.06.26.20 026.06.26.21 026.06.08.20 026.05.13.14 026.04.29.10 trunk 026.02.22.22 026.03.16.23 026.04.23.13
blocks / src / Settings / Tabs / AppearanceTab.php

AppearanceTab.php in Blocks – Reusable Content, Shortcodes & Site Variables trunk, at src/Settings/Tabs/AppearanceTab.php

125 lines 5.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace RenzoJohnson\Blocks\Settings\Tabs;
6
7 use RenzoJohnson\Blocks\Settings\FieldDefinition;
8 use RenzoJohnson\Blocks\Settings\FieldType;
9 use RenzoJohnson\Blocks\Settings\Requirement;
10 use RenzoJohnson\Blocks\Settings\SanitizerType;
11 use RenzoJohnson\Blocks\Settings\SectionDefinition;
12 use RenzoJohnson\Blocks\Settings\SettingDefinition;
13 use RenzoJohnson\Blocks\Settings\TabDefinition;
14 use RenzoJohnson\Blocks\Settings\TabProvider;
15
16 \defined( 'ABSPATH' ) || exit;
17
18 final class AppearanceTab implements TabProvider {
19
20 public function definition(): TabDefinition {
21 return new TabDefinition(
22 'appearance',
23 \__( 'Appearance', 'blocks' ),
24 array(
25 new SectionDefinition(
26 'blocks_custom_login_section',
27 \__( 'Custom Login Page', 'blocks' ),
28 array(
29 \__( 'Customize the WordPress login page appearance.', 'blocks' ),
30 ),
31 array(
32 new FieldDefinition(
33 'blocks_custom_login',
34 \__( 'Custom Login Page', 'blocks' ),
35 \__( 'Replace the default WordPress login page with a custom branded design.', 'blocks' ),
36 FieldType::Checkbox,
37 array(
38 new SettingDefinition( 'blocks_custom_login', 'boolean', false, SanitizerType::Boolean, sensitive: false, exportable: true, public_token: null ),
39 ),
40 array(),
41 Requirement::Always,
42 ),
43 ),
44 false,
45 ),
46 new SectionDefinition(
47 'blocks_admin_footer_section',
48 \__( 'Admin Footer', 'blocks' ),
49 array(
50 \__( 'Replace the WordPress admin footer line with a Blocks-branded "Developed for {site}…" message. Filterable via blocks_admin_footer_developer / blocks_admin_footer_developer_url.', 'blocks' ),
51 ),
52 array(
53 new FieldDefinition(
54 'blocks_admin_footer_enabled',
55 \__( 'Custom Admin Footer', 'blocks' ),
56 \__( 'Replace the default WordPress admin footer with a Blocks-branded message.', 'blocks' ),
57 FieldType::Checkbox,
58 array(
59 new SettingDefinition( 'blocks_admin_footer_enabled', 'boolean', false, SanitizerType::Boolean, sensitive: false, exportable: true, public_token: null ),
60 ),
61 array(),
62 Requirement::Always,
63 ),
64 ),
65 false,
66 ),
67 new SectionDefinition(
68 'blocks_yoast_integration_section',
69 \__( 'Yoast SEO Integration', 'blocks' ),
70 array(
71 \__( 'Admin-chrome cleanups for sites running Yoast SEO. Toggles below silence Yoast\'s admin UI noise without affecting its SEO output (meta tags, schema, sitemaps, indexables all continue to work). Both toggles auto-detect Yoast — no effect when Yoast is inactive.', 'blocks' ),
72 ),
73 array(
74 new FieldDefinition(
75 'blocks_yoast_hide_admin_bar',
76 \__( 'Hide Yoast Admin Bar Item', 'blocks' ),
77 \__( 'Does: Removes Yoast SEO\'s wpseo-menu node from the WP admin bar. Fires on: wp_before_admin_bar_render (priority 999). Side effects: The "SEO" dropdown disappears from the top admin bar for all users; Yoast\'s in-page UI (sidebar metabox on posts, settings pages under Yoast SEO menu) is unaffected. Requires: Yoast SEO (free or Premium) active. Default: OFF.', 'blocks' ),
78 FieldType::Checkbox,
79 array(
80 new SettingDefinition( 'blocks_yoast_hide_admin_bar', 'boolean', false, SanitizerType::Boolean, sensitive: false, exportable: true, public_token: null ),
81 ),
82 array(),
83 Requirement::Always,
84 ),
85 new FieldDefinition(
86 'blocks_yoast_disable_notifications',
87 \__( 'Silence Yoast Notifications', 'blocks' ),
88 \__( 'Does: Silences four Yoast notification types (post trashed, term deleted, term slug changed, indexables page settings). Fires on: wpseo_enable_notification_post_trash, _term_delete, _term_slug_change, _indexables_page_type filters (all return false). Side effects: Yoast still tracks the underlying events for SEO indexing — only the admin notification UI is hidden. Requires: Yoast SEO active. Default: OFF.', 'blocks' ),
89 FieldType::Checkbox,
90 array(
91 new SettingDefinition( 'blocks_yoast_disable_notifications', 'boolean', false, SanitizerType::Boolean, sensitive: false, exportable: true, public_token: null ),
92 ),
93 array(),
94 Requirement::Always,
95 ),
96 ),
97 false,
98 ),
99 new SectionDefinition(
100 'blocks_svg_upload_section',
101 \__( 'SVG Uploads', 'blocks' ),
102 array(
103 \__( 'SVG files can carry XSS payloads. Blocks does NOT add a raw MIME bypass — it requires the Safe SVG plugin to be active and own the upload sanitization pipeline. If Safe SVG is missing while this is enabled, an admin notice will warn you.', 'blocks' ),
104 ),
105 array(
106 new FieldDefinition(
107 'blocks_svg_upload_enabled',
108 \__( 'Enable SVG Uploads', 'blocks' ),
109 \__( 'Allow SVG files in the Media Library — requires the Safe SVG plugin to be active.', 'blocks' ),
110 FieldType::Checkbox,
111 array(
112 new SettingDefinition( 'blocks_svg_upload_enabled', 'boolean', false, SanitizerType::Boolean, sensitive: false, exportable: true, public_token: null ),
113 ),
114 array(),
115 Requirement::Always,
116 ),
117 ),
118 false,
119 ),
120 ),
121 Requirement::Always,
122 );
123 }
124 }
125