I’m building a site with a lot of widgets. They have been highly customized.
Several admins/editors will have to edit these widgets when the site is live.
Right now I’m scared to see a widget (and its configuration) can be fully erased in a single mouse move (dropping it off the side bar).
Is there any way to prevent widgets removal while keeping the ability to edit its content ?
Additionally, the widget management page in the Administration gives in my opinion too much space to the “add widget” module and not enough to the “activated widget” module. This is helpful while building a site but useless when the site is done. Is there any way to switch the size of these modules ?
Thanks a lot
The solution I can think of is removing the panels Available and Inactive Widgets so there’s simply nowhere to drag (and delete) the widgets used in the sidebar.
You can inject something else to fill the gap.
In this example, only one user is able to add/delete widgets.
Important: the
HTML;
closing line cannot have any whitespace characters before or afterPS: this Heredoc syntax
<<<HTML code HTML;
is preventing the code to display the PHP properly formatted here in WPSE. But the code is tested and working.The probem of deleting widgets is more general, it is caused by the developer and the editor using the same backend interface. Similar problems like deleting widgets are
– inserting images in the wrong size
– adding fonts that were not intended by the designer
– creating more menu items than allowed
.. and many more
The solution is simple, give editors their own interface. And probably the best way to do this is: let this interface look like the website itself. This approach is what I call “frontend CMS”
The frontend editor plugin is a free plugin that can be used for this. I myself wrote a plugin that takes this philosophy a bit further, frontendcms.com. It is not free however.