constant SCALD_SAS_MATCH_PATTERN in Scald: Media Management made easy 7
Same name and namespace in other branches
- 6 scald.constants.inc \SCALD_SAS_MATCH_PATTERN
Defines the regexp pattern for SAS format.
The full SAS format is literally:
[scald=ATOM_ID:context options]
where 'context' is the context name and 'options' is JSON representation of options used to render the atom.
Examples of SAS formats:
[scald=23] atom with ID=23 in the 'title' (default) context [scald=23:full] atom with ID=23 in the 'full' context [scald=23:full {"link":"http://www.google.com"}]
2 uses of SCALD_SAS_MATCH_PATTERN
- scald_included in ./
scald.module - Determine atoms (expressed as SAS) embedded in a string.
- scald_sas_to_rendered in ./
scald.module - Process a text string and replace shorthands with rendered Scald Atoms.
File
- includes/
scald.constants.inc, line 48 - Scald Constants
Code
define('SCALD_SAS_MATCH_PATTERN', '/\\[\\s*scald=(\\d+)(?(?=:):([\\w-]+))(?(?=\\s+)\\s+([^\\]]*))\\s*\\]/');