Compare commits
No commits in common. "fdd6a154ada017f7c8478f0f9b531eecb030a524" and "1973989d36504fafd0b021a5949d95b0e03d9728" have entirely different histories.
fdd6a154ad
...
1973989d36
|
@ -56,8 +56,7 @@ include( ARCHIVE_WPPLUGIN_PATH . 'includes/arcHIVE-init-textdomain.php');
|
||||||
|
|
||||||
include( ARCHIVE_WPPLUGIN_PATH . 'includes/arcHIVE-enable-svg.php');
|
include( ARCHIVE_WPPLUGIN_PATH . 'includes/arcHIVE-enable-svg.php');
|
||||||
|
|
||||||
// disabled for now
|
include_once( ARCHIVE_WPPLUGIN_PATH . 'includes/arcHIVE-add-roles.php');
|
||||||
// include_once( ARCHIVE_WPPLUGIN_PATH . 'includes/arcHIVE-add-roles.php');
|
|
||||||
|
|
||||||
if ( is_admin() ) {
|
if ( is_admin() ) {
|
||||||
//include_once( plugin_dir_path( __FILE__ ) . 'includes/arcHIVE-admin-stylesheet.php' );
|
//include_once( plugin_dir_path( __FILE__ ) . 'includes/arcHIVE-admin-stylesheet.php' );
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Delete capabilities created in development and in plugin removal.
|
|
||||||
*
|
|
||||||
* @link https://arc-hive.zone
|
|
||||||
* @since 1.1.0
|
|
||||||
*
|
|
||||||
* @package archive_wpplugin
|
|
||||||
* @subpackage archive_wpplugin/includes
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete capabilities created in development and in plugin removal.
|
|
||||||
*
|
|
||||||
* This class defines all code necessary to run during the plugin's activation.
|
|
||||||
*
|
|
||||||
* @since 1.1.0
|
|
||||||
* @package archive_wpplugin
|
|
||||||
* @subpackage archive_wpplugin/includes
|
|
||||||
* @author Jorge - vitrubio.net <jorge@vitrubio.net>
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Function to delete capabilities
|
|
||||||
// Based on http://chrisburbridge.com/delete-unwanted-wordpress-custom-capabilities/
|
|
||||||
function clean_unwanted_caps() {
|
|
||||||
global $wp_roles;
|
|
||||||
$delete_caps = array(
|
|
||||||
'read_archive_resource',
|
|
||||||
'publish_archive_resources',
|
|
||||||
'edit_archive_resources',
|
|
||||||
'edit_archive_published_resources',
|
|
||||||
'edit_other_archive_resources',
|
|
||||||
'delete_archive_resources',
|
|
||||||
'delete_archive_published_resources',
|
|
||||||
'delete_archive_others_resources',
|
|
||||||
'delete_archive_private_resources',
|
|
||||||
'upload_media_files',
|
|
||||||
'manage_archive_resources_types',
|
|
||||||
'archive_read_resource',
|
|
||||||
'archive_publish_resources',
|
|
||||||
'archive_edit_resources',
|
|
||||||
'archive_edit_published_resources',
|
|
||||||
'archive_edit_other_resources',
|
|
||||||
'archive_delete_resources',
|
|
||||||
'archive_delete_published_resources',
|
|
||||||
'archive_delete_others_resources',
|
|
||||||
'archive_delete_private_resources',
|
|
||||||
'archive_upload_media_files',
|
|
||||||
'archive_manage_resources_types',
|
|
||||||
'archive_manage_resources_types'
|
|
||||||
);
|
|
||||||
foreach ($delete_caps as $cap) {
|
|
||||||
foreach (array_keys($wp_roles->roles) as $role) {
|
|
||||||
$wp_roles->remove_cap($role, $cap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
add_action( 'admin_init', 'clean_unwanted_caps' );
|
|
||||||
// register_activation_hook( __FILE__, 'archive_wpplugin_add_roles_on_plugin_activation' );
|
|
Loading…
Reference in a new issue