Skip to content
Docs
Get RestroPress

Filter

rpress_settings_sms_notification

Updated
On this page

Filters the settings registered for the SMS notification tab.

Runs while RestroPress builds its registered settings. The default is an empty array, so the tab has no fields unless an extension fills it. The format matches the other tabs: section ID => setting ID => field definition.

Parameters#

ParameterTypeDescription
$settingsarrayArray of section ID => array of setting ID => field definition. Empty by default.

Return value#

array. The section => settings array.

Example#

function my_sms_settings( $settings ) {
	$settings['main']['my_sms_sender'] = array(
		'id'   => 'my_sms_sender',
		'name' => esc_html__( 'Sender name', 'my-plugin' ),
		'type' => 'text',
	);
	return $settings;
}
add_filter( 'rpress_settings_sms_notification', 'my_sms_settings', 10, 1 );

Source#

Applied in:

  • includes/admin/settings/register-settings.php (line 1574), in rpress_get_registered_settings()

See also#

Was this page helpful?