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 / ContentTypesTab.php

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

84 lines 3.0 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 ContentTypesTab implements TabProvider {
19
20 public function definition(): TabDefinition {
21 return new TabDefinition(
22 'content-types',
23 \__( 'Content Types', 'blocks' ),
24 array(
25 new SectionDefinition(
26 'blocks_content_types_section',
27 \__( 'Custom Post Types', 'blocks' ),
28 array(
29 \__( 'Toggling each content type ON registers the post type, taxonomy (where applicable), and shortcodes; toggling OFF stops registration but does not delete data — the underlying wp_posts rows are preserved.', 'blocks' ),
30 ),
31 array(
32 new FieldDefinition(
33 'blocks_faq_enabled',
34 \__( 'FAQ', 'blocks' ),
35 \__( 'Register the FAQ post type and the [blocks-faqs] shortcode.', 'blocks' ),
36 FieldType::Checkbox,
37 array(
38 new SettingDefinition( 'blocks_faq_enabled', 'boolean', false, SanitizerType::Boolean, sensitive: false, exportable: true, public_token: null ),
39 ),
40 array(),
41 Requirement::Always,
42 ),
43 new FieldDefinition(
44 'blocks_feature_enabled',
45 \__( 'Feature', 'blocks' ),
46 \__( 'Register the Feature post type, feature_category taxonomy, and [blocks-features] / [blocks-compare] shortcodes.', 'blocks' ),
47 FieldType::Checkbox,
48 array(
49 new SettingDefinition( 'blocks_feature_enabled', 'boolean', false, SanitizerType::Boolean, sensitive: false, exportable: true, public_token: null ),
50 ),
51 array(),
52 Requirement::Always,
53 ),
54 new FieldDefinition(
55 'blocks_glossary_enabled',
56 \__( 'Glossary', 'blocks' ),
57 \__( 'Register the Glossary and Glossary Term public post types (creates /glossary/{slug} URLs).', 'blocks' ),
58 FieldType::Checkbox,
59 array(
60 new SettingDefinition( 'blocks_glossary_enabled', 'boolean', false, SanitizerType::Boolean, sensitive: false, exportable: true, public_token: null ),
61 ),
62 array(),
63 Requirement::Always,
64 ),
65 new FieldDefinition(
66 'blocks_release_enabled',
67 \__( 'Release / Changelog', 'blocks' ),
68 \__( 'Register the Release post type, structured-fields metabox, changelog_plugin taxonomy, and the [changelog] shortcode.', 'blocks' ),
69 FieldType::Checkbox,
70 array(
71 new SettingDefinition( 'blocks_release_enabled', 'boolean', false, SanitizerType::Boolean, sensitive: false, exportable: true, public_token: null ),
72 ),
73 array(),
74 Requirement::Always,
75 ),
76 ),
77 false,
78 ),
79 ),
80 Requirement::Always,
81 );
82 }
83 }
84