# content-control/2.0.4/inc/functions/deprecated/class.restrictions.php

Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks &amp; More, version 2.0.4. 37 lines.

- Page: https://pluginprobe.com/plugins/content-control/2.0.4/code/inc/functions/deprecated/class.restrictions.php
- Raw: https://pluginprobe.com/plugins/content-control/2.0.4/raw/inc/functions/deprecated/class.restrictions.php
- Modified: 2023-09-18T01:47:10+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/content-control/2.0.4/code/inc/functions/deprecated/class.restrictions.php#L10-L20`.

```php
<?php
/**
 * Deprecated restrictions class.
 *
 * @copyright (c) 2023, Code Atlantic LLC.
 * @package ContentControl
 */

namespace JP\CC\Site;

use function ContentControl\plugin;

defined( 'ABSPATH' ) || exit;

/**
 * Frontend restriction controller.
 */
class Restrictions {

	/**
	 * Protected posts.
	 *
	 * @var array
	 */
	public static $protected_posts = [];

	/**
	 * Method to get the protected post content.
	 *
	 * @return string
	 */
	public static function restricted_content() {
		$restriction = plugin( 'restrictions' )->get_applicable_restriction();
		return false !== $restriction ? $restriction->to_v1_array() : false;
	}
}

```
