Documentation

wph/core/set_server_type

Posted in: Getting Started (3) Plugin Options Explained (32) Actions / Filters (25) How To (11)      Code Example (10)  

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