Documentation

wph/core/set_server_type

Posted in: Getting Started (4) How To (15) Plugin Options Explained (37) Actions / Filters (31)      Code Example (16)  

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;

Important!
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