Description #
This filter returns the editor shortcodes.
apply_filters('fluentform/editor_shortcodes',$shortCodes);
Usage #
add_filter('fluentform/editor_shortcodes', function($shortCodes){
return $shortCodes;
}, 10, 1);
[
'title' => 'General SmartCodes',
'shortcodes' => [
'{wp.admin_email}' => __('Admin Email', 'fluentform'),
'{wp.site_url}' => __('Site URL', 'fluentform'),
'{wp.site_title}' => __('Site Title', 'fluentform'),
'{ip}' => __('IP Address', 'fluentform'),
'{date.m/d/Y}' => __('Date (mm/dd/yyyy)', 'fluentform'),
'{date.d/m/Y}' => __('Date (dd/mm/yyyy)', 'fluentform'),
'{embed_post.ID}' => __('Embedded Post/Page ID', 'fluentform'),
'{embed_post.post_title}' => __('Embedded Post/Page Title', 'fluentform'),
'{embed_post.permalink}' => __('Embedded URL', 'fluentform'),
'{http_referer}' => __('HTTP Referer URL', 'fluentform'),
'{user.ID}' => __('User ID', 'fluentform'),
'{user.display_name}' => __('User Display Name', 'fluentform'),
'{user.first_name}' => __('User First Name', 'fluentform'),
'{user.last_name}' => __('User Last Name', 'fluentform'),
'{user.user_email}' => __('User Email', 'fluentform'),
'{user.user_login}' => __('User Username', 'fluentform'),
'{browser.name}' => __('User Browser Client', 'fluentform'),
'{browser.platform}' => __('User Operating System', 'fluentform'),
'{random_string.your_prefix}' => __('Random String with Prefix', 'fluentform'),
],
];
Parameters #
- $shortCodes (array) Shortcodes
Placement #
This code should be placed in the functions.php file of your active theme.
Source Code #
This filter is located in FluentForm\boot\globals.php -> fluentFormEditorShortCodes()