PluginProbe ʕ •ᴥ•ʔ
PublishPress Capabilities – User Role Editor, Access Permissions, User Capabilities, Admin Menus / 1.9
PublishPress Capabilities – User Role Editor, Access Permissions, User Capabilities, Admin Menus v1.9
2.45.0 2.44.0 trunk 1.10 1.10.1 1.4.1 1.4.10 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5 1.5.1 1.5.10 1.5.11 1.5.2 1.5.3 1.5.4 1.5.5 1.5.7 1.5.8 1.5.9 1.6 1.6.1 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.8.1 1.9 1.9.10 1.9.12 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.9 2.0 2.0.2 2.0.3 2.1 2.1.1 2.10.0 2.10.1 2.10.2 2.10.3 2.11.1 2.12.1 2.12.2 2.13.0 2.14.0 2.15.0 2.16.0 2.17.0 2.18.0 2.18.2 2.19.0 2.19.1 2.19.2 2.2 2.2.1 2.20.0 2.21.0 2.22.0 2.23.0 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.30.0 2.31.0 2.32.0 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.40.0 2.41.0 2.42.0 2.43.0 2.5.0 2.5.1 2.5.2 2.6.0 2.6.1 2.7.0 2.7.1 2.8.0 2.8.1 2.9.0 2.9.1
capability-manager-enhanced / includes / functions.php
capability-manager-enhanced / includes Last commit date
admin.php 6 years ago backup-handler.php 7 years ago backup.php 6 years ago cap-helper.php 6 years ago filters-admin.php 6 years ago filters-woocommerce.php 7 years ago filters-wp_rest_workarounds.php 6 years ago filters.php 6 years ago functions-admin.php 6 years ago functions.php 6 years ago handler.php 6 years ago inflect-cme.php 7 years ago manager.php 6 years ago network.php 6 years ago pp-handler.php 6 years ago pp-ui.php 6 years ago publishpress-roles.php 6 years ago
functions.php
79 lines
1 <?php
2 function _cme_act_pp_active() {
3 if ( defined('PRESSPERMIT_VERSION') || ( defined('PPC_VERSION') && function_exists( 'pp_init_cap_caster' ) ) ) {
4 define( 'PRESSPERMIT_ACTIVE', true );
5 } else {
6 if ( defined('SCOPER_VERSION') || ( defined('PP_VERSION') && function_exists('pp_init_users_interceptor') ) ) {
7 define( 'OLD_PRESSPERMIT_ACTIVE', true );
8 }
9 }
10 }
11
12 function _cme_cap_helper() {
13 global $cme_cap_helper;
14
15 require_once ( dirname(__FILE__) . '/cap-helper.php' );
16 $cme_cap_helper = new CME_Cap_Helper();
17
18 add_action( 'registered_post_type', '_cme_post_type_late_reg', 5, 2 );
19 add_action( 'registered_taxonomy', '_cme_taxonomy_late_reg', 5, 2 );
20 }
21
22 function _cme_post_type_late_reg( $post_type, $type_obj ) {
23 global $cme_cap_helper;
24
25 if ( ! empty( $type_obj->public ) || ! empty( $type_obj->show_ui ) ) {
26 $cme_cap_helper->refresh();
27 }
28 }
29
30 function _cme_taxonomy_late_reg( $taxonomy, $tx_obj ) {
31 global $cme_cap_helper;
32
33 if ( ! empty( $tx_obj->public ) ) {
34 $cme_cap_helper->refresh();
35 }
36 }
37
38 function _cme_init() {
39 require_once ( dirname(__FILE__) . '/filters.php' );
40
41 load_plugin_textdomain('capsman-enhanced', false, dirname(__FILE__) . '/lang');
42 }
43
44 function cme_is_plugin_active($check_plugin_file) {
45 if ( ! $check_plugin_file )
46 return false;
47
48 $plugins = get_option('active_plugins');
49
50 foreach ( $plugins as $plugin_file ) {
51 if ( false !== strpos($plugin_file, $check_plugin_file) )
52 return $plugin_file;
53 }
54 }
55
56 // if a role is marked as hidden, also default it for use by Press Permit as a Pattern Role (when PP Collaborative Editing is activated and Advanced Settings enabled)
57 function _cme_pp_default_pattern_role( $role ) {
58 if ( ! $pp_role_usage = get_option( 'pp_role_usage' ) )
59 $pp_role_usage = array();
60
61 if ( empty( $pp_role_usage[$role] ) ) {
62 $pp_role_usage[$role] = 'pattern';
63 update_option( 'pp_role_usage', $pp_role_usage );
64 }
65 }
66
67 // deprecated
68 function capsman_get_pp_option( $option_basename ) {
69 return pp_capabilities_get_permissions_option($option_basename);
70 }
71
72 function pp_capabilities_get_permissions_option($option_basename) {
73 return (function_exists('presspermit')) ? presspermit()->getOption($option_basename) : pp_get_option($option_basename);
74 }
75
76 function pp_capabilities_update_permissions_option($option_basename, $option_val) {
77 function_exists('presspermit') ? presspermit()->updateOption($option_basename, $option_val) : pp_update_option($option_basename, $option_val);
78 }
79