PHP code example of xwp / scheduled-redirects

1. Go to this page and download the library: Download xwp/scheduled-redirects library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

xwp / scheduled-redirects example snippets


// Actions
do_action( 'scheduled_redirects_enabled', $redirect_id, $redirect );
do_action( 'scheduled_redirects_disabled', $redirect_id, $redirect );
do_action( 'scheduled_redirects_cache_purged', $redirect_id, $redirect, $action, $urls_to_purge );

// Filters
add_filter( 'scheduled_redirects_per_page', fn( $per_page ) => 50 );
add_filter( 'scheduled_redirects_purge_urls', fn( $urls, $redirect_id, $redirect ) => $urls, 10, 3 );