PluginProbe
Membership Plugin – Kadence Memberships / 2.1
Membership Plugin – Kadence Memberships v2.1
4.0.3 4.0.2 4.0.1 trunk 1.1 1.2 1.2.1 1.2.2 2.0 2.0.2 2.0.3 2.0.4 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.2.10 2.2.2 2.2.3 2.2.4 2.2.5 2.2.7 2.2.8 All 72 releases
restrict-content / includes / user-checks.php

user-checks.php in Membership Plugin – Kadence Memberships 2.1, at includes/user-checks.php

48 lines 904 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*******************************************
4 * Restrict Content User Checks
5 *******************************************/
6
7 function rcCheckUser()
8 {
9 if (current_user_can('read'))
10 {
11 if (current_user_can('edit_posts'))
12 {
13 if (current_user_can('upload_files'))
14 {
15 if (current_user_can('moderate_comments'))
16 {
17 if (current_user_can('switch_themes'))
18 {
19 //do nothing here for admin
20 }
21 else
22 {
23 add_filter('the_content', 'rcMetaDisplayEditor');
24 }
25 }
26 else
27 {
28 add_filter('the_content', 'rcMetaDisplayAuthor');
29 }
30 }
31 else
32 {
33 add_filter('the_content', 'rcMetaDisplayContributor');
34 }
35 }
36 else
37 {
38 add_filter('the_content', 'rcMetaDisplaySubscriber');
39 }
40 }
41 else
42 {
43 add_filter('the_content', 'rcMetaDisplayNone');
44 }
45
46 }
47 add_action('loop_start', 'rcCheckUser');
48