mbr_include_once
Usage
This shortcode includes the content of the file specified but the file can only be included once.
It provides the same functionality as the regular PHP include_once
functionality but as a shortcode.
Parameters
Parameters | Description |
---|---|
file | The file name with it's file system path. The file system path can be specified as either the full path from the system root or the relative path from the document root. Default: none. Required: yes. |
Validity
This shortcode is evaluated for any type of visitor.
Conditional Branching
This shortcode does NOT support conditional branching with [ELSE_include_once].
Nesting
Shortcode nesting within is NOT supported.
Examples
- Example 1
- Example 2
Includes the content of the file /full/path/to/my/file.php if it has not already been included elsewhere.
[mbr_include_once file='/full/path/to/my/file.php']
Includes the content of the file relative/path/to/my/file.php if it has not already been included elsewhere.
[mbr_include_once file='relative/path/to/my/file.php']
API
Note
There is no ActiveMember360 API function equivalent for this shortcode. Please use the PHP function include_once.