PHP code example of wvnderlab-agency / wp-disable-search
1. Go to this page and download the library: Download wvnderlab-agency/wp-disable-search 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/ */
wvnderlab-agency / wp-disable-search example snippets
// disable the plugin functionality
add_filter( 'wvnderlab/disable-search/enabled', '__return_false' );
// set the status code to 301 - Moved Permanently
add_filter( 'wvnderlab/disable-search/status-code', fn() => 301 );
// set the status code to 302 - Found
add_filter( 'wvnderlab/disable-search/status-code', fn() => 302 );
// set the status code to 307 - Temporary Redirect
add_filter( 'wvnderlab/disable-search/status-code', fn() => 307 );
// set the status code to 308 - Permanent Redirect
add_filter( 'wvnderlab/disable-search/status-code', fn() => 308 );
// set the status code to 410 - Gone
add_filter( 'wvnderlab/disable-search/status-code', fn() => 410 );
// override the redirect URL
add_filter( 'wvnderlab/disable-search/redirect_url', 'YOUR_REDIRECT_URL' );
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.