1<?php
2
3/**
4 * Load all class via Plugin Utility
5 */
6require_once(__DIR__ . '/../vendor/autoload.php');
7
8use ComboStrap\Tag\AdTag;
9use ComboStrap\Api\QualityMessageHandler;
10use ComboStrap\BlockquoteTag;
11use ComboStrap\Bootstrap;
12use ComboStrap\BrandingColors;
13use ComboStrap\Breakpoint;
14use ComboStrap\Canonical;
15use ComboStrap\ColorRgb;
16use ComboStrap\ContainerTag;
17use ComboStrap\FetcherRailBar;
18use ComboStrap\FetcherSvg;
19use ComboStrap\FloatAttribute;
20use ComboStrap\IconDownloader;
21use ComboStrap\Identity;
22use ComboStrap\LazyLoad;
23use ComboStrap\LinkMarkup;
24use ComboStrap\LowQualityPage;
25use ComboStrap\MediaMarkup;
26use ComboStrap\Meta\Field\TwitterImage;
27use ComboStrap\MetadataFrontmatterStore;
28use ComboStrap\Outline;
29use ComboStrap\PageProtection;
30use ComboStrap\PagePublicationDate;
31use ComboStrap\Tag\RelatedTag;
32use ComboStrap\TemplateEngine;
33use ComboStrap\PageType;
34use ComboStrap\PageUrlType;
35use ComboStrap\Prism;
36use ComboStrap\PrismTags;
37use ComboStrap\RasterImageLink;
38use ComboStrap\Meta\Field\Region;
39use ComboStrap\RouterBestEndPage;
40use ComboStrap\TagAttribute\Shadow;
41use ComboStrap\SiteConfig;
42use ComboStrap\Snippet;
43use ComboStrap\SvgImageLink;
44use ComboStrap\TemplateSlot;
45
46
47require_once(__DIR__ . '/../syntax/related.php');
48
49
50// https://www.dokuwiki.org/devel:configuration
51$meta[RelatedTag::MAX_LINKS_CONF] = array('numeric');
52$meta[RelatedTag::EXTRA_PATTERN_CONF] = array('string');
53
54/**
55 * Disqus
56 */
57require_once(__DIR__ . '/../syntax/disqus.php');
58$meta[syntax_plugin_combo_disqus::CONF_DEFAULT_ATTRIBUTES] = array('string');
59
60
61/**
62 * Url Manager
63 */
64$meta[action_plugin_combo_router::ROUTER_ENABLE_CONF] = array('onoff');
65$meta[action_plugin_combo_routermessage::CONF_SHOW_PAGE_NAME_IS_NOT_UNIQUE] = array('onoff');
66$meta[action_plugin_combo_routermessage::CONF_SHOW_MESSAGE_CLASSIC] = array('onoff');
67
68$actionChoices = array('multichoice', '_choices' => array(
69    action_plugin_combo_router::NOTHING,
70    action_plugin_combo_router::GO_TO_BEST_END_PAGE_NAME,
71    action_plugin_combo_router::GO_TO_NS_START_PAGE,
72    action_plugin_combo_router::GO_TO_BEST_PAGE_NAME,
73    action_plugin_combo_router::GO_TO_BEST_NAMESPACE,
74    action_plugin_combo_router::GO_TO_SEARCH_ENGINE
75));
76$meta['GoToEditMode'] = array('onoff');
77$meta['ActionReaderFirst'] = $actionChoices;
78$meta['ActionReaderSecond'] = $actionChoices;
79$meta['ActionReaderThird'] = $actionChoices;
80$meta['WeightFactorForSamePageName'] = array('string');
81$meta['WeightFactorForStartPage'] = array('string');
82$meta['WeightFactorForSameNamespace'] = array('string');
83
84$meta[RouterBestEndPage::CONF_MINIMAL_SCORE_FOR_REDIRECT] = array('string');
85
86$meta[Canonical::CONF_CANONICAL_LAST_NAMES_COUNT] = array('string');
87$meta[action_plugin_combo_canonical::CONF_CANONICAL_FOR_GA_PAGE_VIEW] = array('onoff');
88
89/**
90 * Icon namespace where the downloaded icon are stored
91 */
92$meta[IconDownloader::CONF_ICONS_MEDIA_NAMESPACE] = array('string');
93$meta[IconDownloader::CONF_DEFAULT_ICON_LIBRARY] = array('multichoice', '_choices' => array_keys(IconDownloader::PUBLIC_LIBRARY_ACRONYM));
94
95
96/**
97 * Css optimization
98 */
99$meta[action_plugin_combo_css::CONF_ENABLE_MINIMAL_FRONTEND_STYLESHEET] = array('onoff');
100$meta[action_plugin_combo_css::CONF_DISABLE_DOKUWIKI_STYLESHEET] = array('onoff');
101
102/**
103 * Metadata Viewer
104 */
105$meta[syntax_plugin_combo_metadata::CONF_METADATA_DEFAULT_ATTRIBUTES] = array('string');
106
107/**
108 * Badge
109 */
110$meta[syntax_plugin_combo_badge::CONF_DEFAULT_ATTRIBUTES_KEY] = array('string');
111
112/**
113 * Ads
114 */
115$meta[AdTag::CONF_IN_ARTICLE_ENABLED] = array('onoff');
116$meta[AdTag::CONF_IN_ARTICLE_PLACEHOLDER] = array('onoff');
117
118/**
119 * Code / File / Console
120 */
121$meta[syntax_plugin_combo_code::CONF_CODE_ENABLE] = array('onoff');
122$meta[Prism::CONF_PRISM_THEME] = array('multichoice', '_choices' => array_keys(Prism::THEMES_INTEGRITY));
123$meta[Prism::CONF_BASH_PROMPT] = array('string');
124$meta[Prism::CONF_BATCH_PROMPT] = array('string');
125$meta[Prism::CONF_POWERSHELL_PROMPT] = array('string');
126$meta[PrismTags::CONF_FILE_ENABLE] = array('onoff');
127
128/**
129 * Quality (SEO)
130 */
131require_once(__DIR__ . '/../ComboStrap/LowQualityPage.php');
132$meta[LowQualityPage::CONF_LOW_QUALITY_PAGE_PROTECTION_ENABLE] = array('onoff');
133$meta[LowQualityPage::CONF_LOW_QUALITY_PAGE_PROTECTION_MODE] = array('multichoice', '_choices' => array(
134    PageProtection::CONF_VALUE_ROBOT,
135    PageProtection::CONF_VALUE_FEED,
136    PageProtection::CONF_VALUE_ACL,
137    PageProtection::CONF_VALUE_HIDDEN
138));
139$meta[LowQualityPage::CONF_LOW_QUALITY_PAGE_LINK_TYPE] = array('multichoice', '_choices' => array(
140    PageProtection::PAGE_PROTECTION_LINK_NORMAL,
141    PageProtection::PAGE_PROTECTION_LINK_WARNING,
142    PageProtection::PAGE_PROTECTION_LINK_LOGIN,
143));
144
145/**
146 * Preformatted mode enable
147 */
148$meta[syntax_plugin_combo_preformatted::CONF_PREFORMATTED_ENABLE] = array('onoff');
149$meta[syntax_plugin_combo_preformatted::CONF_PREFORMATTED_EMPTY_CONTENT_NOT_PRINTED_ENABLE] = array('onoff');
150
151/**
152 * The mandatory rules
153 */
154$meta[renderer_plugin_combo_analytics::CONF_MANDATORY_QUALITY_RULES] = array('multicheckbox', '_choices' => renderer_plugin_combo_analytics::QUALITY_RULES);
155
156/**
157 * The quality rules excluded from monitoring
158 */
159$meta[QualityMessageHandler::CONF_DISABLE_QUALITY_MONITORING] = array('onoff');
160$meta[QualityMessageHandler::CONF_EXCLUDED_QUALITY_RULES_FROM_DYNAMIC_MONITORING] = array('multicheckbox', '_choices' => renderer_plugin_combo_analytics::QUALITY_RULES);
161
162/**
163 * Link
164 */
165$meta[LinkMarkup::CONF_USE_DOKUWIKI_CLASS_NAME] = array('onoff');
166$meta[LinkMarkup::CONF_PREVIEW_LINK] = array('onoff');
167$meta[syntax_plugin_combo_link::CONF_DISABLE_LINK] = array('onoff');
168
169/**
170 * Twitter
171 */
172$meta[action_plugin_combo_metatwitter::CONF_TWITTER_SITE_HANDLE] = array('string');
173$meta[action_plugin_combo_metatwitter::CONF_TWITTER_SITE_ID] = array('string');
174$meta[action_plugin_combo_metatwitter::CONF_DONT_NOT_TRACK] = array('multichoice', '_choices' => array(
175    action_plugin_combo_metatwitter::CONF_ON,
176    action_plugin_combo_metatwitter::CONF_OFF
177));
178$meta[BlockquoteTag::CONF_TWEET_WIDGETS_THEME] = array('string');
179$meta[BlockquoteTag::CONF_TWEET_WIDGETS_BORDER] = array('string');
180
181
182/**
183 * Facebook
184 */
185$meta[action_plugin_combo_metafacebook::CONF_DEFAULT_FACEBOOK_IMAGE] = array('string');
186
187/**
188 * Language region
189 */
190$meta[Region::CONF_SITE_LANGUAGE_REGION] = array("string");
191
192/**
193 * Late publication protection
194 */
195$meta[PagePublicationDate::CONF_LATE_PUBLICATION_PROTECTION_ENABLE] = array('onoff');
196$meta[PagePublicationDate::CONF_LATE_PUBLICATION_PROTECTION_MODE] = array('multichoice', '_choices' => array(
197    PageProtection::CONF_VALUE_ROBOT,
198    PageProtection::CONF_VALUE_FEED,
199    PageProtection::CONF_VALUE_ACL,
200    PageProtection::CONF_VALUE_HIDDEN
201));
202
203/**
204 * Default Page Type
205 */
206$meta[PageType::CONF_DEFAULT_PAGE_TYPE] = array("string");
207
208/**
209 * Default Shadow level
210 */
211$meta[Shadow::CONF_DEFAULT_VALUE] = array('multichoice', '_choices' => array(
212    Shadow::CONF_SMALL_LEVEL_VALUE,
213    Shadow::CONF_MEDIUM_LEVEL_VALUE,
214    Shadow::CONF_LARGE_LEVEL_VALUE,
215    Shadow::CONF_EXTRA_LARGE_LEVEL_VALUE
216));
217
218
219/**
220 * Big Svg Lazy load
221 */
222require_once(__DIR__ . '/../ComboStrap/SvgImageLink.php');
223$meta[SvgImageLink::CONF_LAZY_LOAD_ENABLE] = array('onoff');
224
225/**
226 * Big Svg Injection
227 */
228$meta[SvgImageLink::CONF_SVG_INJECTION_ENABLE] = array('onoff');
229
230/**
231 * Svg Optimization
232 */
233$meta[FetcherSvg::CONF_SVG_OPTIMIZATION_ENABLE] = array('onoff');
234
235/**
236 * Inline Element (svg, javascript)
237 */
238$meta[SiteConfig::HTML_MAX_KB_SIZE_FOR_INLINE_ELEMENT] = array('numeric');
239
240/**
241 * Svg Upload Group Name
242 */
243$meta[Identity::CONF_DESIGNER_GROUP_NAME] = array('string');
244
245/**
246 * Svg The attribute that are deleted with the optimization
247 * {@link FetcherSvg::CONF_OPTIMIZATION_ATTRIBUTES_TO_DELETE}
248 */
249$meta[FetcherSvg::CONF_OPTIMIZATION_ATTRIBUTES_TO_DELETE] = array('string');
250$meta[FetcherSvg::CONF_OPTIMIZATION_ELEMENTS_TO_DELETE] = array('string');
251$meta[FetcherSvg::CONF_OPTIMIZATION_ELEMENTS_TO_DELETE_IF_EMPTY] = array('string');
252$meta[FetcherSvg::CONF_OPTIMIZATION_NAMESPACES_TO_KEEP] = array('string');
253$meta[FetcherSvg::CONF_PRESERVE_ASPECT_RATIO_DEFAULT] = array('string');
254
255/**
256 * Raster Lazy load image
257 */
258$meta[LazyLoad::CONF_RASTER_ENABLE] = array('onoff');
259$meta[RasterImageLink::CONF_RESPONSIVE_IMAGE_MARGIN] = array('string');
260$meta[RasterImageLink::CONF_RETINA_SUPPORT_ENABLED] = array('onoff');
261
262/**
263 * Lazy loading
264 */
265$meta[LazyLoad::CONF_LAZY_LOADING_PLACEHOLDER_COLOR] = array("string");
266
267/**
268 * Internal media
269 */
270$meta[syntax_plugin_combo_media::CONF_IMAGE_ENABLE] = array('onoff');
271
272/**
273 * Internal media default linking
274 */
275$meta[MediaMarkup::CONF_DEFAULT_LINKING] = array('multichoice', '_choices' => array(
276    MediaMarkup::LINKING_DIRECT_VALUE,
277    MediaMarkup::LINKING_DETAILS_VALUE,
278    MediaMarkup::LINKING_LINKONLY_VALUE,
279    MediaMarkup::LINKING_NOLINK_VALUE,
280));
281
282/**
283 * Default breakpoint
284 */
285$meta[FloatAttribute::CONF_FLOAT_DEFAULT_BREAKPOINT] = array('multichoice', '_choices' => array(
286    "xs",
287    "sm",
288    "md",
289    "lg",
290    "xl",
291    "xxl"
292));
293
294/**
295 * Outline Numbering
296 */
297$meta[Outline::CONF_OUTLINE_NUMBERING_ENABLE] = array("onoff");
298$meta[Outline::CONF_OUTLINE_NUMBERING_COUNTER_STYLE_LEVEL2] = array('multichoice', '_choices' => Outline::CONF_COUNTER_STYLES_CHOICES);
299$meta[Outline::CONF_OUTLINE_NUMBERING_COUNTER_STYLE_LEVEL3] = array('multichoice', '_choices' => Outline::CONF_COUNTER_STYLES_CHOICES);
300$meta[Outline::CONF_OUTLINE_NUMBERING_COUNTER_STYLE_LEVEL4] = array('multichoice', '_choices' => Outline::CONF_COUNTER_STYLES_CHOICES);
301$meta[Outline::CONF_OUTLINE_NUMBERING_COUNTER_STYLE_LEVEL5] = array('multichoice', '_choices' => Outline::CONF_COUNTER_STYLES_CHOICES);
302$meta[Outline::CONF_OUTLINE_NUMBERING_COUNTER_STYLE_LEVEL6] = array('multichoice', '_choices' => Outline::CONF_COUNTER_STYLES_CHOICES);
303$meta[Outline::CONF_OUTLINE_NUMBERING_COUNTER_SEPARATOR] = array("string");
304$meta[Outline::CONF_OUTLINE_NUMBERING_PREFIX] = array("string");
305$meta[Outline::CONF_OUTLINE_NUMBERING_SUFFIX] = array("string");
306
307/**
308 * Identity form
309 */
310$meta[Identity::CONF_ENABLE_LOGO_ON_IDENTITY_FORMS] = array("onoff");
311$meta[action_plugin_combo_registration::CONF_ENABLE_REGISTER_FORM] = array("onoff");
312$meta[action_plugin_combo_login::CONF_ENABLE_LOGIN_FORM] = array("onoff");
313$meta[action_plugin_combo_resend::CONF_ENABLE_RESEND_PWD_FORM] = array("onoff");
314$meta[action_plugin_combo_profile::CONF_ENABLE_PROFILE_UPDATE_FORM] = array("onoff");
315$meta[action_plugin_combo_profile::CONF_ENABLE_PROFILE_DELETE_FORM] = array("onoff");
316
317/**
318 * Comment
319 */
320$meta[syntax_plugin_combo_comment::CONF_OUTPUT_COMMENT] = array("onoff");
321
322/**
323 * Cache
324 */
325$meta[action_plugin_combo_staticresource::CONF_STATIC_CACHE_ENABLED] = array("onoff");
326
327/**
328 * Link Wizard
329 */
330$meta[action_plugin_combo_linkwizard::CONF_ENABLE_ENHANCED_LINK_WIZARD] = array("onoff");
331
332/**
333 * Canonical Url Type
334 */
335$meta[PageUrlType::CONF_CANONICAL_URL_TYPE] = array('multichoice', '_choices' => PageUrlType::CONF_VALUES);
336
337/**
338 * Frontmatter on sumbit
339 */
340$meta[MetadataFrontmatterStore::CONF_ENABLE_FRONT_MATTER_ON_SUBMIT] = array("onoff");
341
342/**
343 * Heading
344 */
345$meta[syntax_plugin_combo_headingwiki::CONF_WIKI_HEADING_ENABLE] = array("onoff");
346
347/**
348 * Branding Colors
349 */
350$meta[BrandingColors::PRIMARY_COLOR_CONF] = array("string");
351$meta[ColorRgb::SECONDARY_COLOR_CONF] = array("string");
352$meta[BrandingColors::BRANDING_COLOR_INHERITANCE_ENABLE_CONF] = array("onoff");
353
354/**
355 * Highlight
356 */
357$meta[syntax_plugin_combo_highlightwiki::CONF_HIGHLIGHT_WIKI_ENABLE] = array("onoff");
358
359/**
360 * Default page layout container
361 */
362$meta[ContainerTag::DEFAULT_LAYOUT_CONTAINER_CONF] = array('multichoice', '_choices' => ContainerTag::CONTAINER_VALUES);
363
364/**
365 * Take over the show
366 */
367$meta[SiteConfig::CONF_ENABLE_THEME_SYSTEM] = array("onoff");
368
369/**
370 * Railbar
371 */
372$meta[FetcherRailBar::CONF_PRIVATE_RAIL_BAR] = array('onoff');
373$meta[FetcherRailBar::CONF_BREAKPOINT_RAIL_BAR] = array('multichoice', '_choices' => array(
374    Breakpoint::EXTRA_SMALL_NAME,
375    Breakpoint::BREAKPOINT_SMALL_NAME,
376    Breakpoint::BREAKPOINT_MEDIUM_NAME,
377    Breakpoint::BREAKPOINT_LARGE_NAME,
378    Breakpoint::BREAKPOINT_EXTRA_LARGE_NAME,
379    Breakpoint::EXTRA_EXTRA_LARGE_NAME,
380    Breakpoint::NEVER_NAME
381));
382
383
384$meta[Snippet::CONF_USE_CDN] = array('onoff');
385
386/**
387 * Bootstrap
388 */
389$bootstrapStyleSheet = Bootstrap::getQualifiedVersions();
390$meta[Bootstrap::CONF_BOOTSTRAP_VERSION_STYLESHEET] = array('multichoice', '_choices' => $bootstrapStyleSheet);
391
392/**
393 * Preload css ?
394 */
395$meta[action_plugin_combo_snippetsbootstrap::CONF_PRELOAD_CSS] = array('onoff');
396
397/**
398 * Jquery doku vs Bootstrap
399 */
400$meta[action_plugin_combo_snippetsbootstrap::CONF_JQUERY_DOKU] = array('onoff');
401
402/**
403 * Disable
404 */
405$meta[action_plugin_combo_snippetsbootstrap::CONF_DISABLE_BACKEND_JAVASCRIPT] = array('onoff');
406
407/**
408 * Rem conf
409 */
410$meta[SiteConfig::REM_CONF] = array('numeric');
411
412/**
413 * Theme
414 */
415$themes = TemplateEngine::getThemes();
416$meta[TemplateEngine::CONF_THEME] = array('multichoice', '_choices' => $themes);
417
418/**
419 * Slot
420 */
421$meta[TemplateSlot::CONF_PAGE_HEADER_NAME] = array("string");
422$meta[TemplateSlot::CONF_PAGE_FOOTER_NAME] = array("string");
423