Support » Plugin: Widget Shortcode » Two Suggestions

  • This is a brilliant plugin I’m adding as an official recommended plugin to use with my theme, Weaver Xtreme.

    So far, I have two suggestions, one which sort of needs an Admin interface.

    1. Your answer to add some code to hide the insertion button for different user permission levels is too hard, but really essential for many sites. You can’t just have contributors or even editors with the ability to insert a widget, and adding code is asking a bit much, I think.

    2. This one is easy, and shouldn’t confuse your existing users. Why call your Widget Area widget pool “Arbitrary?”. That is meaningless. Why not “Widget Shortcode Widgets”? Much more meaningful. It also might be nice to have more than one widget pool to help with organization. That would go with the need for an admin area.

    But otherwise, what a brilliant plugin. How could I have missed its existence for so long?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author shazdeh


    Thank you for your kind words! Really glad you like the plugin, the old Weaver was one of the first themes I studied to learn how to code, so that means a lot to me.
    About #1, makes sense, although I’d really rather prefer not to make changes to the plugin’s behaviors, per WP stats it’s installed on 40k websites and changes would likely upset other people. Think a backwards compatible idea might be so that the plugin would add two widget areas: one that the widgets inside it would show up in the shortcode generator, and one that they would not. What do you think? 🙂
    About #2, indeed, will change this for the next update.
    Highly appreciate your input.

    Not sure how the not show up would work. But on further evaluation, I’m not all that sure it is a real issue anyway. If a user has permission to add widgets, then they do, and it shouldn’t matter where they come from. I don’t remember off hand if Editors can do that, but certainly Contributors or Authors can’t.

    Strongly agree with the suggestion to rename the Widget Area, and wpweaver’s suggestion of “Widget Shortcode Widgets” is perfect. When you make that update, I might also modify the descriptive text “This widget area can be used for [widget] shortcode.]” to be a little more descriptive:

    “Widgets in this area are not shown on your website by default, but can be inserted using the [widget] shortcode displayed at the bottom of each widget.”

    As for your proposed solution to wpweaver’s issue about who can add widgets:

    I think it adds too much clutter/confusion for most users. Now there are TWO extra sidebar areas? I think that the situation where the Admin wants to control which widgets can be added by contributors/editors is a very rare edge case. I wouldn’t suggest cluttering up the widgets screen for most people just to account for this case.

    Instead, I’d look at making it a little easier for people to control which users can add widgets to posts.

    A few ideas that come to mind:

    1) Let people define something in wp-config.php such as:
    define(‘WIDGETS_SHORTCODE_CAPABILITY’, ‘manage_options’);
    Then code it such that only users who can manage_options can see the button.

    2) Filter the capability, so that people could add much less code to functions.php and just do something like:
    add_filter( ‘widgets_shortcode_capability’, function() return ‘manage_options’; );

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Two Suggestions’ is closed to new replies.