PluginProbe
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More / 2.0.4
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More v2.0.4
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 / functions / deprecated / class.is.php

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

50 lines 981 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Deprecated Is class.
4 *
5 * @copyright (c) 2023, Code Atlantic LLC.
6 * @package ContentControl
7 */
8
9 namespace JP\CC;
10
11 defined( 'ABSPATH' ) || exit;
12
13 /**
14 * Conditional helper utilities.
15 *
16 * @package ContentControl
17 *
18 * @deprecated 2.0.0
19 */
20 class Is {
21
22 /**
23 * Check if a content is accessible to current user.
24 *
25 * @param string $who logged_in or logged_out.
26 * @param array $roles array of roles to check.
27 *
28 * @return bool
29 *
30 * @deprecated 2.0.0
31 */
32 public static function accessible( $who = '', $roles = [] ) {
33 return \ContentControl\user_meets_requirements( $who, $roles, 'match' );
34 }
35
36 /**
37 * Check if a content is blocked to current user.
38 *
39 * @param string $who logged_in or logged_out.
40 * @param array $roles array of roles to check.
41 *
42 * @return boolean
43 *
44 * @deprecated 2.0.0
45 */
46 public static function restricted( $who = '', $roles = [] ) {
47 return ! \ContentControl\user_meets_requirements( $who, $roles, 'match' );
48 }
49 }
50