• Can you please add a general option to disable/hide all shariff_metabox functionality in admin sidebar on the post screens?

    Thanks for the great plugin.

Viewing 14 replies - 1 through 14 (of 14 total)
  • I just wanted to ask the same question. My CMS users should not have access to Shariff setting.

    I tried the following but it did not work:

    remove_meta_box(‘shariff_metabox’, ‘post’);

    Plugin Author Jan-Peter

    (@starguide)

    Hi there,

    I will incorporate an option for this in the next release. Just to clarify it a bit: The meta box does not allow anything the user is not already allowed to do prior to the last update. The meta box is only shown to users that have the right to publish posts and is basically just a nicer way instead of using the shorttag [shariff]. So just disabling the meta box will not prevent these users from altering shariff via the shorttag or hiding it completely via hideshariff.

    So basically, as I understand it, you do not need an option to disable the meta box, instead you need an option to disable shariff for users other than admins. Correct?

    Cheers
    JP

    Thread Starter Ov3rfly

    (@ov3rfly)

    @jp: No need to disable shariff, no role-check required, just a general setting which hides (= don’t add) shariff_metabox in admin sidebar on all the post screens.

    Plugin Author Jan-Peter

    (@starguide)

    Ok, I think we are talking about two different things here.

    Christoph does not want his Editors to be able to add, change or remove Shariff. A simple “hide meta box” won’t be sufficient to achieve that, since it only hides the meta box, but does not prevent anyone to still change the settings via the shorttag.

    For your case: If you just want to hide the meta box for yourself, you can simply click on the “Screen Options” button in the top right corner of any edit screen and deselect “Shariff Settings”. The box will then not appear anymore on any edit screen for this post type.

    Cheers
    JP

    Thread Starter Ov3rfly

    (@ov3rfly)

    @jp: Would need a general switch, can’t use “Screen Options” for the many different editors and authors in various sites where WordPress is used as CMS and users are only distracted by (for them) unnecessary metaboxes. The backend for them is pretty clean so they can’t break anything by accident but still could use the shortcode (if instructed to do so).

    Our current “solution”, comment out relevant actions in file admin/admin_metabox.php

    // call setup function on the post editor screen
    /*
    add_action( 'load-post.php', 'shariff3UU_metabox_setup' );
    add_action( 'load-post-new.php', 'shariff3UU_metabox_setup' );
    */
    Plugin Author Jan-Peter

    (@starguide)

    Ok, got ya. I’ll add an option to the next version. Thanks for the clarification.

    Cheers
    JP

    Actually, I was talking about the meta box. I don’t want my users to see any Shariff related settings there. Using shortcodes is completely fine. So an option to hide the meta box is sufficient for me.

    Thanks,
    Christoph

    Plugin Author Jan-Peter

    (@starguide)

    Alright, thanks for the clarification. Then we are all on the same page. I’ll add an option in the next release. In the meantime you can use the solution from Ov3rfly to disable it for the moment.

    Cheers,
    JP

    This setting is urgently needed for custom post types! Thank you for incorporating that.

    Thread Starter Ov3rfly

    (@ov3rfly)

    Please add this setting soon, don’t want to “hack” plugin-files after each update ??

    Hi, is there a setting to disable the “new” meta box on posts and pages?

    4.3.0 – new meta box allows for individual settings per post or page

    @ov3rfly

    I had the same problem and as they didn’t do anything about in nearly 6 month now, I don’t think, that they’ll ever add it. But just so you know, you don’t need to edit the plugins core files. Just add this to your functions.php, which is way easier to maintain:

    function remove_sharriff() {
        remove_action( 'load-post.php', 'shariff3UU_metabox_setup' );
        remove_action( 'load-post-new.php', 'shariff3UU_metabox_setup' );
    }
    add_action( 'init', 'remove_sharriff' );

    Hope this helps. Other than that, this is a great plugin and I am very thankful for all the work they put in it!

    @lumartist

    You are amazing, thank you for this great snippet.

    Plugin Author Jan-Peter

    (@starguide)

    Thank you for the snippet Lumartist. It sure will be helpful!

    And don’t worry, the option is already done and will be part of the next release. I just don’t have the time currently to test it thoroughly enough to push it live yet.

    Cheers
    JP

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Option to disable shariff_metabox’ is closed to new replies.