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