# age-gate/3.7.3/src/Functions/Content.php

Age Gate, version 3.7.3. 57 lines.

- Page: https://pluginprobe.com/plugins/age-gate/3.7.3/code/src/Functions/Content.php
- Raw: https://pluginprobe.com/plugins/age-gate/3.7.3/raw/src/Functions/Content.php
- Modified: 2022-09-11T18:42:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/age-gate/3.7.3/code/src/Functions/Content.php#L10-L20`.

```php
<?php

use AgeGate\Common\Content;

if (!function_exists('age_gate_is_restricted')) {
    function age_gate_is_restricted($id = null, $type = 'post')
    {
        return (new Content($id, $type))->isRestricted();
    }
}

if (!function_exists('age_gate_has_restriction')) {
    function age_gate_has_restriction($id = null, $type = 'post')
    {

        return (new Content($id, $type))->getRestricted();
    }
}

if (!function_exists('age_gate_content')) {
    function age_gate_content($id = null, $type = 'post')
    {

        return new Content($id, $type);
    }
}

if (!function_exists('age_gate_error')) {
    /**
     * @deprecated 3.0.0
     */
    function age_gate_error($key)
    {
        return null;
    }
}

if (!function_exists('age_gate_set_value')) {
    /**
     * @deprecated 3.0.0
     */
    function age_gate_set_value($key)
    {
        return null;
    }
}

if (!function_exists('age_gate_status')) {
    /**
     * @deprecated 3.0.0
     */
    function age_gate_status()
    {
        return null;
    }
}

```
