I just had my first rejected edit and would like to understand what constitutes acceptable and not acceptable editing so in the future I don't waste my time making such edits nor waste someone else's time having to go through the Pending Edit's queue just to reject it.

Regarding answer at "Redirect Main Site to Subsite in Multisite Wordpress", I pasted the code as it was into a new PHP file and uploaded it into the plugins folder on my web server.

As is, when activated the page returns the following message:

The plugin generated 241 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

As a complete PHP newbie, it took me some time to realize that the message error was due to the lack of the "<?php" tag. Searching on the web I wasn't able find an answer to the problem, so I compared the code against the code of other working plug-ins. The only difference was that the sample code I used was missing the opening PHP tag.

So I edited the answer to include the opening and closing PHP tags, but the edit was rejected.

This edit does not make the post even a little bit easier to read, easier to find, more accurate or more accessible. Changes are either completely superfluous or actively harm readability.

It's my understanding that the edit makes the answer more accurate so what am I missing here?

  • 3
    I personally wouldn't think an edit should be rejected in this case if all it added was a <?php at the start, but a 5 character edit is quite small, and you're not the only person to come across that issue with the missing tag in that question – Tom J Nowell Mod Jun 1 '15 at 13:18
  • 4
    The closing tag is not needed at all, and generally, we expect people to know the difference between HTML and PHP, so the opening tag isn't really needed for that answer. This is too minor. See also When and how should I edit questions and answers? – fuxia Mod Jun 1 '15 at 13:26
  • I know what is HTML and there's no HTML in that answer at all. I also have a background on a handful of programming languages, but no experience with PHP. The absence of the opening tag made me waste several minutes - maybe an hour before I figured out what was happening. When searching for the error message resultant from the lack of the opening tag, I found several other occurrences of people having the same problem, yet there were no answers on how to fix it. So why not provide a complete answer? – Alfred Myers Jun 1 '15 at 13:43
  • To complement this particular case,in the answer it is said: "Place the following code in a .php file and upload it to your plugins directory." If you put the code as is without the opening PHP tag, the code doesn't work which makes the answer incomplete. – Alfred Myers Jun 1 '15 at 13:50
  • 3
    It is an example of the ongoing contradiction between being developer centric and at the same time being open to the masses. But this issue needs only very basic PHP prerequisite, only a little less and you really don't know anything about PHP, so I would tend to saying, this much knowledge should be present. No insult intended. – Nicolai Jun 1 '15 at 13:55

This is start of text written in English.

Imagine every paragraph on the site looked like this.

This is end of text written in English.

Just like it wasn't immediately obvious for you that code was written in PHP and required respective tags, someone out there would have problem distinguishing English from say German.

But the expectation of Stack Exchange network is that communication happens in English. The English proficiency, sufficient to communicate, is expected.

Just like that in context of our stack the PHP proficiency, sufficient to read and edit code, is expected. Personally I consider the practical minimum to be having read main part of PHP manual.

PHP tags are so basic, that explicitly adding them is irrelevant to anyone but the very beginner. It doesn't make answer more technically accurate, just more verbose.

  • 1. The fact is that if one follows the instructions given on the answer as is, it will not work. Simple as that. Why not fix it and make the life of everyone easier? 2. As per wordpress.stackexchange.com/tour , "WordPress Development is a question and answer site for WordPress developers and administrators." So I guess an administrator has to have PHP proficiency. – Alfred Myers Jun 1 '15 at 21:15
  • 5
    What about a standalone functions like this? If you went through and put PHP tags around every answer that was a stand alone function, we would get many more complaints about it not working in functions.php because of duplicate PHP tags at the start of the file. People literally copy and paste this code in which is not what you should do on any online forum, you should understand what you're putting in. As a developers exchange, you're expected to know the basics at the very least IMO. – Howdy_McGee Mod Jun 2 '15 at 2:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .