Posted in: Getting Started (4) Plugin Options Explained (35) Actions / Filters (30) How To (14)      Code Example (15)  

This filter has deprecated and replaced with a constant: WPH_SERVER_TYPE. This can be apache, nginx and is. The constant should be place on wp-config.php before the wp-hide default lines.

    define('WPH_SERVER_TYPE',          'apache');




This functionality is available for PRO version.

Name: wph/core/set_server_type
Type: Filter
Arguments: none

This filter can be used to set the server type which will be used internally by the plugin.

    add_filter( 'wph/core/set_server_type', '__set_server_type' );
    function __set_server_type( $server_type )
            global $wph;

            $wph->server_htaccess_config  =   TRUE;

            return TRUE;

To set the server type as IIS, the following variable should be used instead:

$wph->server_web_config  =   TRUE;

For Nginx use the following:

$wph->server_nginx_config  =   TRUE;

The above code should be placed within wp-content/mu-plugins/ directory, the file should include a underline ( _ ) char as first letter, to ensure is being loaded before WP Hide Loader module.

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
Scroll to top