Class MLA (Media Library Assistant) Custom Style/Markup Template Support provides functions that define, import and export custom style and markup templates for MLA shortcodes.
| package |
Media Library Assistant |
|---|---|
| since | 2.30 |
mla_fetch_custom_template(string $key, string $shortcode = 'gallery', string $type = 'style', string $section = '[not supplied]') : string
| since | 2.30 |
|---|
stringTemplate name.
stringOptional. Shortcode slug; 'gallery', 'tag-cloud' or 'term-list'. Default 'gallery'.
stringOptional. Template type; 'style' or 'markup'. Default 'style'.
stringOptional. Template section. Default '[not supplied]'.
stringRequested template section, if it exists.
mla_get_markup_templates(string $shortcode = '') : array|null
| since | 2.30 |
|---|
stringOptional. Shortcode to which the template(s) apply. Default 'gallery'.
array|nullArray ( name => value ) for all markup templates or null if no templates.
mla_get_style_templates(string $shortcode = '') : array|null
| since | 2.30 |
|---|
stringOptional. Shortcode to which the template(s) apply. Default ''.
array|nullArray ( name => value ) for all style templates or null if no templates.
mla_load_custom_templates() : null
| since | 2.30 |
|---|---|
null
mla_localize_template_definitions() : null
Localization must be done at runtime; these calls cannot be placed in the "public static" array definition itself. Called from MLATest::initialize.
| since | 2.30 |
|---|---|
null
mla_put_markup_templates(array $templates) : boolean
| since | 2.30 |
|---|
arrayArray ( name => value ) for all user-defined markup templates.
booleantrue if success, false if failure.
mla_put_style_templates(array $templates) : boolean
| since | 2.30 |
|---|
arrayArray ( name => value ) for all user-defined style templates.
booleantrue if success, false if failure.
mla_template_definitions : array
The array must be populated at runtime in MLATemplate_Support::mla_localize_template_definitions(); localization calls cannot be placed in the "public static" array definition itself.
| since | |
|---|---|
| access |
public |
| var |
{ Definitions by type. Key $$type is 'markup' or 'style'.
} } |
array
mla_custom_templates : array
| since | |
|---|---|
| access |
private |
| var |
{ Templates by type. Key $$type is 'markup' or 'style'.
} } |
array