# content-control/2.0.12/inc/deprecated/class.restrictions.php

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

- Page: https://pluginprobe.com/plugins/content-control/2.0.12/code/inc/deprecated/class.restrictions.php
- Raw: https://pluginprobe.com/plugins/content-control/2.0.12/raw/inc/deprecated/class.restrictions.php
- Modified: 2023-10-01T09:39:02+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.12/code/inc/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<int>
	 */
	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;
	}
}

```
