开发者 | GravityWP |
---|---|
更新时间 | 2023年12月12日 17:17 |
PHP版本: | 3.0.1 及以上 |
WordPress版本: | 6.4 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
/wp-content/plugins/gravitywp-merge-tags
directory, or install the plugin through the WordPress plugins screen directly.You can click on 'Merge Tags' in the Toolbar above the Gravity Form you're working on. Or you can click on 'Merge Tags' in the Forms submenu.
The plugin provides you with several tabs with information about a specific Gravity Form.
By using the 'gwp_merge_tags_meta_merge_tags' filter, for example:
add_filter( 'gwp_merge_tags_meta_merge_tags', 'my_plugin', 10, 1 ); function my_plugin( $gwp_merge_tags ) { $gwp_merge_tags['my_plugin']['name'] = 'My custom table'; $gwp_merge_tags['my_plugin']['url'] = 'https://gravitywp.com'; $gwp_merge_tags['my_plugin']['values'] = array( 'merge_tag_1', 'merge_tag_2', ); return $gwp_merge_tags; }
The $gwp_merge_tags variable is an associative array, which you can add your own merge tags to.
$gwp_merge_tags['key']
a unique key for your plugin.
$gwp_merge_tags['key']['name']
contains the title for the table header.
$gwp_merge_tags['key']['url']
URL for the plugin website.
$gwp_merge_tags['key']['values']
an array with merge tags.