• Resolved Matt Keys

    (@mattkeys)


    Hey John, thanks for the great plugin, I use it with all of my clients WP sites.

    I am working on a blog post pruning tool for one client, and I need to redirect their posts after deletion. I’d like to put these redirects into your plugin for easy management.

    It would be really great if there was an action hook I could send an array to which would create the redirect. I imagine it would work like:

    $redirection_item = array(
    	'url'		=> 'https://example.com/redirectme',
    	'group_id'	=> 1,
    	'position'	=> 0,
    	'match_type'	=> 'url',
    	'action_type'	=> 'url',
    	'action_code'	=> '301'
    	'action_data'	=> array(
    		'url'	=> 'https://example.com/yayimherenow'
    	)
    );
    do_action( 'add_redirection_item', $redirection_item );
    • This topic was modified 6 years, 7 months ago by Matt Keys.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add Redirection Item action’ is closed to new replies.