Restrict Content Pro
rcp_email_settings
Coming soon: Restrict Content Pro is becoming Kadence Memberships. You may see both names used while we update the product, documentation, and customer experience.
Note: This is part of the developer docs and is considered custom code. Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code.
If you need assistance with this, please reach out to our list of consultants for further assistance:
https://codeable.io/developers/restrict-content-pro/
Used to add extra fields on Restrict → Settings → Email.
Parameters
$rcp_options – Array of Restrict Content Pro settings.
Example
/**
* Add a custom field to Restrict → Settings → Email.
*
* @param array $rcp_options Restrict Content Pro settings.
*/
function ag_rcp_email_settings( $rcp_options ) {
$value = isset( $rcp_options['custom_email_note'] ) ? $rcp_options['custom_email_note'] : '';
?>
<tr valign="top">
<th>
<label for="rcp_settings[custom_email_note]"><?php esc_html_e( 'Custom email note', 'rcp' ); ?></label>
</th>
<td>
<input
class="regular-text"
id="rcp_settings[custom_email_note]"
name="rcp_settings[custom_email_note]"
type="text"
value="<?php echo esc_attr( $value ); ?>"
/>
<p class="description"><?php esc_html_e( 'This setting is added with the rcp_email_settings action.', 'rcp' ); ?></p>
</td>
</tr>
<?php
}
add_action( 'rcp_email_settings', 'ag_rcp_email_settings' );
The input name must stay rcp_settings[your_key] so Restrict Content Pro saves it with the other email settings.