PluginProbe
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More / trunk
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More vtrunk
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.10 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 47 releases
content-control / inc / deprecated / class.restrictions.php

class.restrictions.php in Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More trunk, at inc/deprecated/class.restrictions.php

37 lines 642 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Deprecated restrictions class.
4 *
5 * @copyright (c) 2023, Code Atlantic LLC.
6 * @package ContentControl
7 */
8
9 namespace JP\CC\Site;
10
11 use function ContentControl\get_applicable_restriction;
12
13 defined( 'ABSPATH' ) || exit;
14
15 /**
16 * Frontend restriction controller.
17 */
18 class Restrictions {
19
20 /**
21 * Protected posts.
22 *
23 * @var array<int>
24 */
25 public static $protected_posts = [];
26
27 /**
28 * Method to get the protected post content.
29 *
30 * @return string
31 */
32 public static function restricted_content() {
33 $restriction = get_applicable_restriction();
34 return false !== $restriction ? $restriction->get_message() : false;
35 }
36 }
37