Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Allow editors to edit snippets. #12

artstorm opened this Issue Feb 23, 2013 · 4 comments


2 participants

artstorm commented Feb 23, 2013

In the current versions, editors gets a non editable view of the snippets.
I just realized that allowing editors to edit snippets, will allow them to enter and execute PHP code. That would probably not be desired.

Will have to think about this feature a bit more before giving editors access.


I haven't used php in post snippets at all, so haven't thought of this either(;

I'd say the best solution here is to delegate the decision to site admins and do one of these:

  • add 1 setting in, let's say, Writing Settings with generic enable php option
  • add a separate settings page with permissions per role.

What do you think?


artstorm commented Mar 25, 2013

I've been thinking about adding an options tab for the plugin. Currently the plugin doesn't have any admin options for tweaking it. But on the other hand, there hasn't really been any needs for overall admin options either so far and by that kept it quite straightforward.

What could be an option is to add that as a command option. So you can enable snippet editing by adding a line to your functions.php for instance. If the number of options to tweak the plugin grows beyond this one, they can be moved to a an admin tab. But starting with keeping it simple by allowing a hook in to the plugin to change it.

Sounds fair to me(:

In fact I was thinking about another safety feature protecting admins from evil, err... editors.
Feel free to disagree, but what if there was an option to allow editors to change only values of the existing snippets, rather then titles? I fear that they will start changing both and my code will go to hell(; I'd still keep all fields visible, for their reference, if needed, just set disabled attribute on them.

@artstorm artstorm closed this in 933180a May 1, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment