Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Add settings or content on the Global settings page. The name of the tab will be the name of the hook. A few examples include:
- frm_general_settings_form
- frm_messages_settings_form
- frm_permissions_settings_form
- frm_misc_settings_form
Usage
add_action( 'frm_messages_settings_form', 'add_custom_global_messages' ); function add_custom_global_messages( $settings )
Parameters
- $settings (object) - The saved global settings.
Examples
Add custom settings in Misc tab of Global settings
Use this code example to display the input without saving the setting.
add_action( 'frm_misc_settings_form', 'custom_misc_settings' );
function custom_misc_settings( $settings ) {
$value = isset( $settings->custom_setting ) ? $settings->custom_setting : '';
?>
<p>
<label for="your-custom-setting">
<?php esc_html_e( 'Your custom setting', 'text-domain' ); ?>
</label>
<input type="text" id="your-custom-setting" name="custom_setting" value="<?php echo esc_attr( $value ); ?>" />
</p>
<?php
}