This is usually just a personal preference. As Bainternet states, it is always a good practice to prefix function names in WordPress. And while it's not required on this site, consider the sheer number of people who just copy and paste code into their projects.
Using a wpse_XXX
prefix does a couple of things:
- It prevents sites that contain copy-pasted code from breaking with duplicate function names
- It helps identify which copy-pasted code came from this site.
Number 2 is merely a fun, unintended result of the practice. But the number of client sites I've seen with wpse_XXX
littered around their themes and plugins is entertaining and, to me at least, proves just how much the code snippets we post are used.
So to answer your specific questions:
Is this a widely accepted standard on WP SE, or simply a commonly used practice?
Just a commonly used practice based on a widely accepted best practice.
In an answer, is the number the question ID or the actual post (answer) ID?
Usually the question ID since, typically, you don't know your answer's ID until after you've posted it.
wpa_XXXX
...wherewpa
stands for WordPress Answers