Example #1
0
/**
 * Check if we're
 * viewing from
 * local machine
 *
 * @deprecated 1.6.0
 *
 * @since 1.0.0
 */
function is_localhost()
{
    __deprecated(__FUNCTION__, 'This function will be removed as of 2.0.0');
    $hosts = array('127.0.0.1', '::1', 'localhost');
    $hosts = BP\Filters::apply('is_localhost', $hosts);
    return in_array($_SERVER['REMOTE_ADDR'], $hosts);
}
Example #2
0
/**
 * Apply Filters
 *
 * @since 1.0.0
 * @updated 1.5.4
 *
 * $hook: (string) name of the filter hook
 * $input: (mixed) value to filter
 */
function apply_filters($hook, $input)
{
    return BP\Filters::apply($hook, $input);
}