PluginProbe ʕ •ᴥ•ʔ
PublishPress Capabilities – User Role Editor, Access Permissions, User Capabilities, Admin Menus / 1.6
PublishPress Capabilities – User Role Editor, Access Permissions, User Capabilities, Admin Menus v1.6
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 / pp-handler.php
capability-manager-enhanced / includes Last commit date
admin.php 7 years ago backup-handler.php 7 years ago backup.php 7 years ago filters-woocommerce.php 7 years ago filters.php 7 years ago handler.php 7 years ago manager.php 7 years ago network.php 7 years ago pp-handler.php 11 years ago pp-ui.php 7 years ago
pp-handler.php
65 lines
1 <?php
2
3 function _cme_update_pp_usage() {
4 static $updated;
5 if ( ! empty($updated) ) { return true; }
6
7 if ( ! current_user_can( 'pp_manage_settings' ) )
8 return false;
9
10 if ( ! empty( $_REQUEST['update_filtered_types']) ) {
11 // update Press Permit "Filtered Post Types". This determines whether type-specific capability definitions are forced
12 $options = array( 'enabled_post_types', 'enabled_taxonomies' );
13
14 foreach( $options as $option_basename ) {
15 if ( ! isset( $_POST["{$option_basename}-options"] ) )
16 continue;
17
18 $unselected = array();
19 $value = array();
20
21 foreach( $_POST["{$option_basename}-options"] as $key ) {
22 if ( empty( $_POST["{$option_basename}-$key"] ) )
23 $unselected[$key] = true;
24 else
25 $value[$key] = true;
26 }
27
28 if ( $current = pp_get_option( $option_basename ) ) {
29 if ( $current = array_diff_key( $current, $unselected ) )
30 $value = array_merge( $current, $value ); // retain setting for any types which were previously enabled for filtering but are currently not registered
31 }
32
33 $value = stripslashes_deep($value);
34 pp_update_option( $option_basename, $value );
35
36 $updated = true;
37 }
38
39 if ( pp_wp_ver( '3.5' ) ) {
40 pp_update_option( 'define_create_posts_cap', ! empty($_REQUEST['pp_define_create_posts_cap']) );
41 }
42 }
43
44 if ( ! empty( $_REQUEST['SaveRole']) ) {
45 if ( ! empty( $_REQUEST['role'] ) ) {
46 $pp_only = (array) pp_get_option( 'supplemental_role_defs' );
47
48 if ( empty($_REQUEST['pp_only_role']) )
49 $pp_only = array_diff( $pp_only, array($_REQUEST['role']) );
50 else
51 $pp_only[]= $_REQUEST['role'];
52
53 pp_update_option( 'supplemental_role_defs', array_unique($pp_only) );
54 _cme_pp_default_pattern_role( $_REQUEST['role'] );
55 }
56 }
57
58 if ( $updated ) {
59 pp_refresh_options();
60 }
61
62 return $updated;
63 }
64
65