WordPress filter hook

red_default_options

Fired by 3 WordPress plugins, running on 2M+ sites between them.

How to use red_default_options

It's a filter: your callback receives the value, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'red_default_options', function( $defaults ) {
	// Change $defaults here.
	return $defaults;
}, 10, 1 );

Argument names come from Redirection's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

3 plugins that fire red_default_options

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Redirection icon Redirection2+ million installs apply_filters( 'red_default_options', $defaults ) includes/settings/class-settings.php:307
  2. Xtoool Redirecter icon Xtoool RedirecterFewer than 10 installs apply_filters( 'red_default_options', $defaults ) redirection-settings.php:77
  3. JonnyAD SEO icon JonnyAD SEOFewer than 10 installs apply_filters( 'red_default_options', array( 'support' => false, 'token' => md5(uniqid()), 'monitor_post' => 0, 'monitor_types' => array(), 'associated_redirect' => '', 'auto_target' => '', 'expire_redirect' => 7, 'expire_404' => 7, 'log_external' => false, 'log_header' => false, 'track_hits' => true, 'modules' => array(), 'redirect_cache' => 1, 'ip_logging' => 0, 'ip_headers' => array(), 'ip_proxy' => array(), 'last_group_id' => 0... ) includes/redirects-import-redirection.php:181

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.