Git Product home page Git Product logo

adminimize's Introduction

Adminimize

Adminimize that lets you hide 'unnecessary' items from the WordPress backend

Description

If you manage a multi-author WordPress blog or WordPress sites for clients, then you may have wondered if it was possible to clean up the WordPress admin area for your users? There are lots of things in the WordPress admin area that your users don’t need to see or use. This plugin help you to hide unnecessary items from WordPress admin area.

Adminimize makes it easy to remove items from view based on a user’s role.

Other Notes

How to, FAQ

Please visit the Wiki on the development repository for known problems and his solutions. Also we list helpful issues, how tos.

Help with "Your own options"

See this entry on the WP community forum for help with great functions.

Post about the plugin with helpful hints

I love this plugin! How can I show the developer how much I appreciate his work?

Please send a review and let him know your care or see the wishlist of the author. Also you can send a donation.

Licence

Good news, this plugin is free for everyone! Since it's released under the GPL, you can use it free of charge on your personal or commercial blog. But if you enjoy this plugin, you can thank me and leave a small donation for the time I've spent writing and supporting this plugin. And I really don't want to know how many hours of my life this plugin has already eaten ;)

Changelog

Changelog

adminimize's People

Contributors

accudio avatar borsodigerii avatar bueltge avatar chrico avatar dependabot-preview[bot] avatar dependabot[bot] avatar devops-at-alinea avatar filipecsweb avatar g-kanoufi avatar julietnoth avatar marcochiesi avatar pedro-mendonca avatar rafaelfunchal avatar ralfalbert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adminimize's Issues

Maybe JSON Ex-/Import

/**
 * Process a settings export that generates a .json file of the shop settings
 */
function pwsix_process_settings_export() {

        if( empty( $_POST['pwsix_action'] ) || 'export_settings' != $_POST['pwsix_action'] )
                return;

        if( ! wp_verify_nonce( $_POST['pwsix_export_nonce'], 'pwsix_export_nonce' ) )
                return;

        if( ! current_user_can( 'manage_options' ) )
                return;

        $settings = get_option( 'pwsix_settings' );

        ignore_user_abort( true );

        nocache_headers();
        header( 'Content-Type: application/json; charset=utf-8' );
        header( 'Content-Disposition: attachment; filename=pwsix-settings-export-' . date( 'm-d-Y' ) . '.json' );
        header( "Expires: 0" );

        echo json_encode( $settings );
        exit;
}
add_action( 'admin_init', 'pwsix_process_settings_export' );

/**
 * Process a settings import from a json file
 */
function pwsix_process_settings_import() {

        if( empty( $_POST['pwsix_action'] ) || 'import_settings' != $_POST['pwsix_action'] )
                return;

        if( ! wp_verify_nonce( $_POST['pwsix_import_nonce'], 'pwsix_import_nonce' ) )
                return;

        if( ! current_user_can( 'manage_options' ) )
                return;

        $extension = end( explode( '.', $_FILES['import_file']['name'] ) );

        if( $extension != 'json' ) {
                wp_die( __( 'Please upload a valid .json file' ) );
        }

        $import_file = $_FILES['import_file']['tmp_name'];

        if( empty( $import_file ) ) {
                wp_die( __( 'Please upload a file to import' ) );
        }

        // Retrieve the settings from the file and convert the json object to an array.
        $settings = (array) json_decode( file_get_contents( $import_file ) );

        update_option( 'pwsix_settings', $settings );

        wp_safe_redirect( admin_url( 'options-general.php?page=pwsix_settings' ) ); exit;

}
add_action( 'admin_init', 'pwsix_process_settings_import' );

Example plugin: https://github.com/pippinsplugins/Settings-Import-and-Export-Example-Plugin/blob/master/settings-import-export-example.php

js errors when disabling admin bar front end features

Version Information

  • WordPress: 4.6.1
  • Multisite: false
  • Adminimize: 1.10.6

Steps to Reproduce

  1. Install WP 4.6.1
  2. Install Aminimize 1.10.6
  3. Disable Admin Front end feature "Howdy, mmoargames admin"

What I Expected

No errors in console.

What Happened Instead

admin-bar.min.js?ver=4.6.1:1 Uncaught TypeError: Cannot read property 'addEventListener' of null
d   @   admin-bar.min.js?ver=4.6.1:1
(anonymous function)    @   admin-bar.min.js?ver=4.6.1:1

Seems to happen for a few others as well.

Unable to revert back to original

Dear developer,

I am unable to remove the settings that I have set for adminiszer. For instance, I use adminimizer to deactive "appearance " and "post" for my authors and now I am not able to let these items appear on their menu. Please help!

Version Information

  • WordPress:
  • Multisite: true/false
  • Adminimize:

Steps to Reproduce

What I Expected

What Happened Instead

Screenshot or Video

media access

I am trying to limit authors to uploading media only so they cannot see or interfere with existing media. I have tried various obvious selections in the user fields of adminimize but they keep being able to see delete etc the existing library.

Adminimize not showing menu at mobiles

Hi, we are using this plugin and it´s just great!

BUT, today at last we finished our website and went to check everthing thru mobile and ... after login into user account, the top user menu that we configured at Adminimize and that works great thru PCs, doesn´t show at mobiles, it only shows the black background of the menu and nothing else.

I´m attaching both screenshots, from a PC navigating the website (shows perfect the user menu configurated with adminimiza) and the MOBILE image, where you can see that the menu it´s not showing at all and that it´s breaking too the HEADER image.

We haven´t got any other admin reorder menus plugin or so, only Adminimize https://wordpress.org/support/plugin/adminimize and AdminTweaks: https://wordpress.org/plugins/many-tips-together

Does anyone know how to solve this problem?

Thanks for your time and any gelp ;)

mobiles
website

Slow Performance

As soon as I activate Adminimize I get very bad performance. The page loads 3, or four Items in the left navigation an then just loads for about 3 to 10 seconds. Disabling the Plugin solve the issue.
I'm on the latest 1.10.0 on an Ubuntu 14.04.4 with PHP 5.5.9.

It's a very long first GET Response. As far as I can tell, the Server (with Apache2) is working fine.

Prevent access to profile.php, tools.php directly (via url)

Version Information

  • WordPress: 4.6.1
  • Multisite: false
  • Adminimize: 1.10.6

Hello,

Can I use this plugin to prevent ordinary users from accessing for example wp-admin/profile.php and tools.php

I can disable the menu, but they can still type the URL directly.

I am currently using this workaround:

function disable_page() {

    if ( ! current_user_can('administrator') ) 
    {
        wp_die( 'Access denied.' ); 
    }

}
add_action( 'load-profile.php', 'disable_page' );
add_action( 'load-tools.php', 'disable_page' );
add_action( 'load-user-edit.php', 'disable_page' );

Thanks for this great plugin!

Admin Bar items from Front End

Allow to remove Admin Bar items, there will only view on frontend.

Currently we parse the items, but this only items from back end. The Admin Bar is different on back- and front-end.

User specific rules

Is it possible to have a master user that will always show everything and all others (admin included) have the filters enabled?

In other words: Have a master user (administrator role) that is IGNORED by Adminimize?

The reason I'm asking is because Editors can't access widgets and other content related stuff (and plugins like page builders too) and then I have to give my client an Admin role.

I could tweak it and make a PR, just want to know if it is already planned or what

Edit: maybe as a palliative sollution, where could I insert a hardcode global ignoring user id?

"Dashboard deactivate, redirect to" Other: relative

Support relative goal.

I’d like the have the feature for my clients to be brought to a specific tab in the admin and not use absolute paths. You have the option for “other page” under Dashboard deactivate, redirect to . I push and pull from local to live often and I forget to change the url, which often times breaks the admin login for some users because they are brought to a URL that doesn’t exist. Reason to have relative paths. =)

Doesn't work after editing user roles

Adminimize was working great untill I installed User Role Editor to add the file upload capability to the contributor user role.

After that no Adminimize settings for the contributor and authore roles work. I edited the contributor role using the User Role Editor, but not the author role. So it doesn't appear to be settings stuck in the databse. I even reset the User Role Editor settings, uninstalled it, plus reset adminimize and uninstalled + reinstall this (without reinstalling User Role Editor). It still doesn't work.

Any ideas?

Check prio 1 Activation of visual mode

adminimize.php

            // set default editor tinymce
            if ( _mw_adminimize_recursive_in_array( 
                    '#editor-toolbar #edButtonHTML, #quicktags, #content-html', 
                    $disabled_metaboxes_page_all
                )
                || _mw_adminimize_recursive_in_array(
                    '#editor-toolbar #edButtonHTML, #quicktags, #content-html', 
                    $disabled_metaboxes_post_all
                ) )
                add_filter( 'wp_default_editor', create_function( '', 'return "tinymce";' ) );

check it, works this correctly?
Different between post, page, cpt ...
Is html deactivated?

Menu item customize under appereance is not deactivated

When the option customize (under the apprereance menu is deactivated, this option is not removed from the menu. I have tested in Wordpress 4.2 and 4.3 on 2 different sites.

link for the item is:
customize.php?return=%2Fwp-admin%2Foptions-general.php%3Fpage%3Dadminimize%2Fadminimize.php

$mw_adminimize_menu is not array every time

Hi,

I've checked my debug.log and found some spam from Adminize plugin:

[19-Oct-2015 06:18:03 UTC] PHP Warning: in_array() expects parameter 2 to be array, string given in /home/zschocianow/ftp/wordpress/wp-content/plugins/adminimize/adminimize.php on line 901

I can't give you more details, as in my Activity Log there are no actions for 2 hours forward and backward.

Seems like you should just replace $mw_adminimize_menu = ''; to array instead of empty string or add is_array( $mw_adminimize_menu ) in conditional in that 901 line.

Greetings

It does not work anynore.

Dear Frank, first of all sorry for my bad english, I am italian.
This is the scenario.

I installed the puglin 2 month ago and it works perfectly!
Then, after some time I modified some options but I have seen that nothing "change" anymore... I could not hide new unnecessary items under authors and so on.
Ok, so I deleted the db (with uninstall Options button).... but surprise... nothing change... I could see always the same few items (under authors) so the old hide items ramain hidden and those visible remain visible.

So I removed the plugin, but no difference. No new links, no new items.... my author backend is always the same, like the firt time I setup and saved (2 month ago) the options under the plugin.
Then I have tried to install the beta, the 1.9.0-RC2 version.... but no way, under author I see always the same items.

In a few words, I can clean the db, I can select everything or not (and save, of course), I can remove the pluging but nothig change.
If you need I can send you the admin details, thank you!

Augusto

Fatal error (is_plugin_active_for_network()) on multisite installs

Hi,

there is an fatale error on multisite installs:

Call to undefined function is_plugin_active_for_network()

Please add before line 1272: if ( is_multisite() && is_plugin_active_for_network( MW_ADMIN_FILE ) ) {

    if ( ! function_exists( 'is_plugin_active_for_network' ) )
        require_once( ABSPATH . '/wp-admin/includes/plugin.php' );

Unable to revert back to original setting and layout.....

Version Information

  • WordPress: Version 4.5.3
  • Multisite: false
  • Adminimize:

Steps to Reproduce

  1. Install Adminimize
  2. Set the settings to turn off elements for Write options - Products
  3. Elements turned off, and it works OK for woo commerce products
  4. Turn Elements back on, and it won't revert to original setting and layout
  5. Have used the delete options button to try and revert and removed plugin, same issue

What I Expected

What Happened Instead

Screenshot or Video

https://youtu.be/9sv7IlthD4E

C F 7 doesn't hide

Hi all,
I've an issue to hide the CF7 menu item on the admin section.
If I select the flag the menu doesn't disappear.

Vasco

0 byte exsport file

hi,
wen exsport option the plugin save a file of 0byte and not option.
I dismis all plugin on the site except adminimize, but the problem dont'change . the problem persist from version 1.8.4

Now i need work on the my site test and trasferm the date on stable site.
I have very problem to report al silge option (10 personal secion ....)

The last save corect is on date: adminimize_export-2015-02-24_22-03-21.
i thins that the problem is with new version of WP.. I use on stable site the WordPress 4.1.1 and on the test site WordPress 4.2.2

you can control the bug.... plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
thanks

Bug: 'Page -- HTML Editor Button' options hide 'Post -- HTML Editor Button options'

Version Information

  • WordPress: 4.6
  • Multisite: false
  • Adminimize: 1.10.6

Steps to Reproduce

  1. Select an option from Page -- HTML Editor Button for a user role
  2. Navigate to create a new post
  3. User role will be unable to see content area (textarea is hidden). This makes it appear as if the post is gone when editing an existing post, or that edits are not being made if creating a new post.

What I Expected

I updated Wordpress and the plugin, expecting no setting changes.

What Happened Instead

After updating, page selections for HTML Editor Button caused the text area of the Posts (New Posts, Edit Posts) to be hidden. This may be related to the divs used, as well as new changes to the plugin. A temporary fix is available by removing the option setting.

Screenshot or Video

Unable to save setting for CTPs

Version Information

  • WordPress: 4.6.1
  • Multisite: false
  • Adminimize: 1.10.6

Steps to Reproduce

  1. Create CTP
  2. Open Adminimize
  3. Try to save changes

What I Expected

I expected to be able to save the settings as I did for the built in post types and other settings.

What Happened Instead

I am unable to save the settings. After saving, all the checkboxes were unchecked again.

What I Tried

I tried with a self coded CPT and with one made with the Custom Post Type UI from WebDevStudios. It doesn't work for neither of them.

screen option item AKA meta_box

A lot of new themes give to the users a lot of screen options when you write an article.

Ony for an example, my contributor have slug, revolution slider options, qode general, qode header, qode title, qode scoll title animations.. and so on.

Yes i can disable this unwanted box by screen settings, but it' only for the user whit who i logged in.

If i am an administrator and i need to manage a lot of contributors, i think that if you support that possible on your plugin, it would be nice.

This post it's an hint: http://wordpress.stackexchange.com/questions/56606/how-to-remove-certain-screen-options-and-meta-boxes-from-add-edit-post-type

Saving does not apply for custom role

Version Information

  • WordPress: 4.5.2
  • Multisite: false
  • Adminimize: 1.10.4

Steps to Reproduce

  1. Create new role - 'Site Owner' was used in this case. Creation was doing using AAM
  2. Custom role shows in Adminimize and some options save while others do not. Specifically the dashboard.
  3. Disabled AAM and the issue is still present

What I Expected

Hiding dashboard and menu items

What Happened Instead

Settings do not save

Screenshot or Video

global_options undefined variable notices

( ! ) Notice: Undefined variable: global_options in /home/thanh/dev/site/local_dev_wp/wp-content/plugins/adminimize/adminimize.php on line 797

( ! ) Notice: Undefined variable: global_options in /home/thanh/dev/site/local_dev_wp/wp-content/plugins/adminimize/adminimize.php on line 800

( ! ) Notice: Undefined variable: global_options in /home/thanh/dev/site/local_dev_wp/wp-content/plugins/adminimize/adminimize.php on line 803

Locked Out of Adminimize Settings (Super Admin) - Unable to Reset

Hi Frank (@bueltge) - Thanks for creating such an effective plug-in. Well done.

Upon editing Adminimize settings, I have locked myself (Super Admin / Administrator) out of the settings page, preventing me from reverting or fully uninstalling.

I have deactivated/deleted the plugin, but the setting are retained upon re-install.

Are the setting saved somewhere in phpMyAdmin, where I can delete them and do a fresh install of the plug-in?

Thanks in advance - Simon (Sydney, Australia)

Version Information

  • WordPress: 4.6.1
  • Multisite: true
  • Adminimize:

Steps to Reproduce

  1. Incorrectly hide Adminimize Settings from Role = Administrator

Issue with Gravity Forms

Using Adminimize and Gravity Forms, I have chosen to modify the 'Editor' group to show Gravity Forms along with Posts, Media, Pages and Soliloquy all the others work fine but gravity forms remains hidden, any work arounds? I have everything unchecked for anything Forms related

Tab for each settings area?

One thing that IMHO is a bit problematic it the length of settings page. Maybe it would be a good idea to use separate tab for each section?

Hide some Pages for some Roles

Pages are something that dont change for years. Problem is some change, some not. Some are build by different shortcodes for design/layut and content, and is not good to give other than Admins access to them.

Can you make a new option in Adminimize to hide (specific, not all) Pages (not Posts) from some roles ?

If it can help you this snippet hide them from view (they are still editable if accessed, could not find any way to disable them totally from Editors, etc)

add_action( 'pre_get_posts' ,'exclude_this_page' );
function exclude_this_page( $query ) {
        if( !is_admin() )
                return $query;
        global $pagenow;
        if( 'edit.php' == $pagenow && ( get_query_var('post_type') && 'page' == get_query_var('post_type') ) )
                $query->set( 'post__not_in', array(23,28,30) ); // page id
        return $query;
}

source: https://wordpress.org/support/topic/feature-request-hide-some-pages-for-some-roles

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.