xref: /plugin/combo/conf/metadata.php (revision a6bf47aa01c4ea7d24944b0e48eb1943151e3c25)
1<?php
2
3use ComboStrap\AdsUtility;
4use ComboStrap\FloatAttribute;
5use ComboStrap\Icon;
6use ComboStrap\Identity;
7use ComboStrap\MediaLink;
8use ComboStrap\LazyLoad;
9use ComboStrap\RasterImageLink;
10use ComboStrap\LinkUtility;
11use ComboStrap\MetadataUtility;
12use ComboStrap\Page;
13use ComboStrap\PageProtection;
14use ComboStrap\Prism;
15use ComboStrap\LowQualityPage;
16use ComboStrap\Publication;
17use ComboStrap\Shadow;
18use ComboStrap\Site;
19use ComboStrap\SvgDocument;
20use ComboStrap\SvgImageLink;
21use ComboStrap\UrlManagerBestEndPage;
22
23require_once(__DIR__ . '/../syntax/related.php');
24
25
26// https://www.dokuwiki.org/devel:configuration
27$meta[syntax_plugin_combo_related::MAX_LINKS_CONF] = array('numeric');
28$meta[syntax_plugin_combo_related::EXTRA_PATTERN_CONF] = array('string');
29
30/**
31 * Disqus
32 */
33require_once(__DIR__ . '/../syntax/disqus.php');
34$meta[syntax_plugin_combo_disqus::CONF_DEFAULT_ATTRIBUTES] = array('string');
35
36
37/**
38 * Url Manager
39 */
40$meta['ShowPageNameIsNotUnique'] = array('onoff');
41$meta['ShowMessageClassic'] = array('onoff');
42
43require_once(__DIR__ . '/../action/urlmanager.php');
44$actionChoices = array('multichoice', '_choices' => array(
45    action_plugin_combo_urlmanager::NOTHING,
46    action_plugin_combo_urlmanager::GO_TO_BEST_END_PAGE_NAME,
47    action_plugin_combo_urlmanager::GO_TO_NS_START_PAGE,
48    action_plugin_combo_urlmanager::GO_TO_BEST_PAGE_NAME,
49    action_plugin_combo_urlmanager::GO_TO_BEST_NAMESPACE,
50    action_plugin_combo_urlmanager::GO_TO_SEARCH_ENGINE
51));
52$meta['GoToEditMode'] = array('onoff');
53$meta['ActionReaderFirst'] = $actionChoices;
54$meta['ActionReaderSecond'] = $actionChoices;
55$meta['ActionReaderThird'] = $actionChoices;
56$meta['WeightFactorForSamePageName'] = array('string');
57$meta['WeightFactorForStartPage'] = array('string');
58$meta['WeightFactorForSameNamespace'] = array('string');
59require_once(__DIR__ . '/../class/UrlManagerBestEndPage.php');
60$meta[UrlManagerBestEndPage::CONF_MINIMAL_SCORE_FOR_REDIRECT] = array('string');
61
62$meta[action_plugin_combo_metacanonical::CANONICAL_LAST_NAMES_COUNT_CONF] = array('string');
63
64/**
65 * Icon namespace where the downloaded icon are stored
66 */
67require_once(__DIR__ . '/../syntax/icon.php');
68$meta[Icon::CONF_ICONS_MEDIA_NAMESPACE] = array('string');
69$meta[Icon::CONF_DEFAULT_ICON_LIBRARY] = array('multichoice', '_choices' => array_keys(Icon::LIBRARY_ACRONYM));
70
71
72/**
73 * Css optimization
74 */
75$meta[action_plugin_combo_css::CONF_ENABLE_MINIMAL_FRONTEND_STYLESHEET] = array('onoff');
76$meta[action_plugin_combo_css::CONF_DISABLE_DOKUWIKI_STYLESHEET] = array('onoff');
77
78/**
79 * Metadata Viewer
80 */
81$meta[MetadataUtility::CONF_METADATA_DEFAULT_ATTRIBUTES] = array('string');
82$meta[MetadataUtility::CONF_ENABLE_WHEN_EDITING] = array('onoff');
83
84/**
85 * Badge
86 */
87$meta[syntax_plugin_combo_badge::CONF_DEFAULT_ATTRIBUTES_KEY] = array('string');
88
89/**
90 * Ads
91 */
92require_once(__DIR__ . '/../class/AdsUtility.php');
93$meta[AdsUtility::CONF_IN_ARTICLE_PLACEHOLDER] = array('onoff');
94
95/**
96 * Code / File / Console
97 */
98$meta[syntax_plugin_combo_code::CONF_CODE_ENABLE] = array('onoff');
99$meta[Prism::CONF_PRISM_THEME] = array('multichoice', '_choices' => array_keys(Prism::THEMES_INTEGRITY));
100$meta[Prism::CONF_BASH_PROMPT] = array('string');
101$meta[Prism::CONF_BATCH_PROMPT] = array('string');
102$meta[Prism::CONF_POWERSHELL_PROMPT] = array('string');
103$meta[syntax_plugin_combo_file::CONF_FILE_ENABLE] = array('onoff');
104
105/**
106 * Quality (SEO)
107 */
108require_once(__DIR__ . '/../class/LowQualityPage.php');
109$meta[LowQualityPage::CONF_LOW_QUALITY_PAGE_PROTECTION_ENABLE] = array('onoff');
110$meta[PageProtection::CONF_PAGE_PROTECTION_MODE] = array('multichoice', '_choices' => array(
111    PageProtection::CONF_VALUE_ACL,
112    PageProtection::CONF_VALUE_HIDDEN
113));
114
115/**
116 * Preformatted mode enable
117 */
118$meta[syntax_plugin_combo_preformatted::CONF_PREFORMATTED_ENABLE] = array('onoff');
119$meta[syntax_plugin_combo_preformatted::CONF_PREFORMATTED_EMPTY_CONTENT_NOT_PRINTED_ENABLE] = array('onoff');
120
121/**
122 * The mandatory rules
123 */
124$meta[renderer_plugin_combo_analytics::CONF_MANDATORY_QUALITY_RULES] = array('multicheckbox', '_choices' => renderer_plugin_combo_analytics::QUALITY_RULES);
125
126/**
127 * Autofrontmatter mode enable
128 */
129$meta[action_plugin_combo_autofrontmatter::CONF_AUTOFRONTMATTER_ENABLE] = array('onoff');
130
131/**
132 * The quality rules excluded from monitoring
133 */
134$meta[action_plugin_combo_qualitymessage::CONF_DISABLE_QUALITY_MONITORING] = array('onoff');
135$meta[action_plugin_combo_qualitymessage::CONF_EXCLUDED_QUALITY_RULES_FROM_DYNAMIC_MONITORING] = array('multicheckbox', '_choices' => renderer_plugin_combo_analytics::QUALITY_RULES);
136
137/**
138 * Link
139 */
140$meta[LinkUtility::CONF_USE_DOKUWIKI_CLASS_NAME] = array('onoff');
141$meta[syntax_plugin_combo_link::CONF_DISABLE_LINK] = array('onoff');
142
143/**
144 * Twitter
145 */
146$meta[action_plugin_combo_metatwitter::CONF_TWITTER_SITE_HANDLE] = array('string');
147$meta[action_plugin_combo_metatwitter::CONF_TWITTER_SITE_ID] = array('string');
148$meta[action_plugin_combo_metatwitter::CONF_DEFAULT_TWITTER_IMAGE] = array('string');
149$meta[action_plugin_combo_metatwitter::CONF_DONT_NOT_TRACK] = array('multichoice', '_choices' => array(
150    action_plugin_combo_metatwitter::CONF_ON,
151    action_plugin_combo_metatwitter::CONF_OFF
152));
153$meta[syntax_plugin_combo_blockquote::CONF_TWEET_WIDGETS_THEME] = array('string');
154$meta[syntax_plugin_combo_blockquote::CONF_TWEET_WIDGETS_BORDER] = array('string');
155
156/**
157 * Page Image
158 */
159$meta[Page::CONF_DISABLE_FIRST_IMAGE_AS_PAGE_IMAGE] = array('onoff');
160
161/**
162 * Facebook
163 */
164$meta[action_plugin_combo_metafacebook::CONF_DEFAULT_FACEBOOK_IMAGE] = array('string');
165
166/**
167 * Site country
168 */
169$meta[Site::CONF_SITE_ISO_COUNTRY] = array("string");
170
171/**
172 * Late publication protection
173 */
174$meta[Publication::CONF_LATE_PUBLICATION_PROTECTION_ENABLE] = array('onoff');
175
176/**
177 * Default Page Type
178 */
179$meta[Page::CONF_DEFAULT_PAGE_TYPE] = array("string");
180
181/**
182 * Default Shadow level
183 */
184$meta[Shadow::CONF_DEFAULT_VALUE] = array('multichoice', '_choices' => array(
185    Shadow::CONF_SMALL_LEVEL_VALUE,
186    Shadow::CONF_MEDIUM_LEVEL_VALUE,
187    Shadow::CONF_LARGE_LEVEL_VALUE,
188    Shadow::CONF_EXTRA_LARGE_LEVEL_VALUE
189));
190
191
192/**
193 * Big Svg Lazy load
194 */
195require_once(__DIR__ . '/../class/SvgImageLink.php');
196$meta[SvgImageLink::CONF_LAZY_LOAD_ENABLE] = array('onoff');
197
198/**
199 * Big Svg Injection
200 */
201$meta[SvgImageLink::CONF_SVG_INJECTION_ENABLE] = array('onoff');
202
203/**
204 * Svg Optimization
205 */
206$meta[SvgDocument::CONF_SVG_OPTIMIZATION_ENABLE] = array('onoff');
207
208/**
209 * Svg Optimization Inline
210 */
211$meta[SvgImageLink::CONF_MAX_KB_SIZE_FOR_INLINE_SVG] = array('string');
212
213/**
214 * Svg Upload Group Name
215 */
216$meta[action_plugin_combo_svg::CONF_SVG_UPLOAD_GROUP_NAME] = array('string');
217
218/**
219 * Svg The attribute that are deleted with the optimization
220 * {@link SvgDocument::CONF_OPTIMIZATION_ATTRIBUTES_TO_DELETE}
221 */
222$meta[SvgDocument::CONF_OPTIMIZATION_ATTRIBUTES_TO_DELETE] = array('string');
223$meta[SvgDocument::CONF_OPTIMIZATION_ELEMENTS_TO_DELETE] = array('string');
224$meta[SvgDocument::CONF_OPTIMIZATION_ELEMENTS_TO_DELETE_IF_EMPTY] = array('string');
225$meta[SvgDocument::CONF_OPTIMIZATION_NAMESPACES_TO_KEEP] = array('string');
226$meta[SvgDocument::CONF_PRESERVE_ASPECT_RATIO_DEFAULT] = array('string');
227
228/**
229 * Raster Lazy load image
230 */
231$meta[RasterImageLink::CONF_LAZY_LOADING_ENABLE] = array('onoff');
232$meta[RasterImageLink::CONF_RESPONSIVE_IMAGE_MARGIN] = array('string');
233$meta[RasterImageLink::CONF_RETINA_SUPPORT_ENABLED] = array('onoff');
234
235/**
236 * Lazy loading
237 */
238$meta[LazyLoad::CONF_LAZY_LOADING_PLACEHOLDER_COLOR] = array("string");
239
240/**
241 * Internal media
242 */
243$meta[syntax_plugin_combo_media::CONF_IMAGE_ENABLE] = array('onoff');
244
245/**
246 * Internal media default linking
247 */
248$meta[MediaLink::CONF_DEFAULT_LINKING] = array('multichoice', '_choices' => array(
249    MediaLink::LINKING_DIRECT_VALUE,
250    MediaLink::LINKING_DETAILS_VALUE,
251    MediaLink::LINKING_LINKONLY_VALUE,
252    MediaLink::LINKING_NOLINK_VALUE,
253));
254
255/**
256 * Default breakpoint
257 */
258$meta[FloatAttribute::CONF_FLOAT_DEFAULT_BREAKPOINT] = array('multichoice', '_choices' => array(
259    "xs",
260    "sm",
261    "md",
262    "lg",
263    "xl",
264    "xxl"
265));
266
267/**
268 * Outline Numbering
269 */
270$meta[action_plugin_combo_outlinenumbering::CONF_OUTLINE_NUMBERING_ENABLE] = array("onoff");
271$meta[action_plugin_combo_outlinenumbering::CONF_OUTLINE_NUMBERING_COUNTER_STYLE_LEVEL2] = array('multichoice', '_choices' => action_plugin_combo_outlinenumbering::CONF_COUNTER_STYLES_CHOICES);
272$meta[action_plugin_combo_outlinenumbering::CONF_OUTLINE_NUMBERING_COUNTER_STYLE_LEVEL3] = array('multichoice', '_choices' => action_plugin_combo_outlinenumbering::CONF_COUNTER_STYLES_CHOICES);
273$meta[action_plugin_combo_outlinenumbering::CONF_OUTLINE_NUMBERING_COUNTER_STYLE_LEVEL4] = array('multichoice', '_choices' => action_plugin_combo_outlinenumbering::CONF_COUNTER_STYLES_CHOICES);
274$meta[action_plugin_combo_outlinenumbering::CONF_OUTLINE_NUMBERING_COUNTER_STYLE_LEVEL5] = array('multichoice', '_choices' => action_plugin_combo_outlinenumbering::CONF_COUNTER_STYLES_CHOICES);
275$meta[action_plugin_combo_outlinenumbering::CONF_OUTLINE_NUMBERING_COUNTER_STYLE_LEVEL6] = array('multichoice', '_choices' => action_plugin_combo_outlinenumbering::CONF_COUNTER_STYLES_CHOICES);
276$meta[action_plugin_combo_outlinenumbering::CONF_OUTLINE_NUMBERING_COUNTER_SEPARATOR] = array("string");
277$meta[action_plugin_combo_outlinenumbering::CONF_OUTLINE_NUMBERING_PREFIX] = array("string");
278$meta[action_plugin_combo_outlinenumbering::CONF_OUTLINE_NUMBERING_SUFFIX] = array("string");
279
280/**
281 * Identity form
282 */
283$meta[Identity::CONF_ENABLE_LOGO_ON_IDENTITY_FORMS] = array("onoff");
284$meta[action_plugin_combo_registration::CONF_ENABLE_REGISTER_FORM] = array("onoff");
285$meta[action_plugin_combo_login::CONF_ENABLE_LOGIN_FORM] = array("onoff");
286$meta[action_plugin_combo_resend::CONF_ENABLE_RESEND_PWD_FORM] = array("onoff");
287
288
289