Awesome Support Developer Documentation

wpas_allow_soft_loading


Signature

$load_allowed = apply_filters( 'wpas_allow_soft_loading', true )

Typical Usage

You can use this filter to completely prevent Awesome Support from loading. This would be useful when the traffic is coming from bot sources such as pingdom or uptimerobot.  This filter is very similar to the wpas_allow_loading filter except when it fails, it uses a RETURN statement instead of a DIE statement. This allows other scripts to run instead of killing everything, which might not be what you want to do.

This filter needs to be defined VERY EARLY in the loading process so best to define it in a MU plugin.

Example Usage

add_filter('wpas_allow_soft_loading', 'wpas_allow_load', 10, 2);

function wpas_allow_load($result) { 

    // manipulate the $result variable here to set it to true or false.

    return $result;

}

First Available

Version 4.3.3


More Topics In Filter Hooks

Share: