$slug ) { $sfml_slugs[ $key ] = $slug . '?'; } return array_merge( $urls, $sfml_slugs ); } /** * Add SFML custom urls to caching exclusion when activating the plugin * * @since 2.9.3 */ function rocket_activate_sfml() { if ( defined( 'SFML_VERSION' ) ) { add_filter( 'rocket_cache_reject_uri', 'rocket_add_sfml_exclude_pages' ); // Update the WP Rocket rules on the .htaccess. flush_rocket_htaccess(); // Regenerate the config file. rocket_generate_config_file(); } } add_action( 'activate_sf-move-login/sf-move-login.php', 'rocket_activate_sfml', 11 ); /** * Remove SFML custom urls from caching exclusion when deactivating the plugin * * @since 2.9.3 */ function rocket_deactivate_sfml() { if ( defined( 'SFML_VERSION' ) ) { remove_filter( 'rocket_cache_reject_uri', 'rocket_add_sfml_exclude_pages' ); // Update the WP Rocket rules on the .htaccess. flush_rocket_htaccess(); // Regenerate the config file. rocket_generate_config_file(); } } add_action( 'deactivate_sf-move-login/sf-move-login.php', 'rocket_deactivate_sfml', 11 );