Posted in: Getting Started (3) Plugin Options Explained (23) Actions / Filters (24) How To (6)      Code Example (7)  

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', 'custom_wph_core_set_server_type' ); 
    function custom_wph_core_set_server_type( )
            global $wph;
            //Set the server as being Nginx
            $wph->server_nginx_config  =   TRUE;
            //Return a bolean True to let the code know this has been set throught he filter
            return 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