Title: General code / workflow questions
Last modified: August 19, 2016

---

# General code / workflow questions

 *  [davestewart](https://wordpress.org/support/users/davestewart/)
 * (@davestewart)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/general-code-workflow-questions/)
 * Hi,
    I’m new to WordPress, but not development, so I have a few questions regarding
   the processes and thoughts behind the WordPress API. If any questions come across
   as ill-informed – it may be because they are!! I’m still feeling my way around
   the API.
 * OK – here goes!
 * 1. The default return-type for a lot of functions seems to be HTML code (but 
   then, sometimes it isn’t!). And pre-marked up code at that! Perhaps I don’t want
   a styled [ul] list. Or perhaps *I* want specify the classes used.
 * Are the options really this “woolly”, or is this just me getting used to things?
 * 2. If this is so, why are there not 2 kinds of functions, for example:
 * get_blah()
    get_blah_html()
 * I’m finding the incestuous-mix of presentation and code a pain in the bum at 
   the moment! Have I just not found the correct functions?
 * 3. Why is the API not fully documented!!?? Only a few of the functions are complete!
 * [http://codex.wordpress.org/Function_Reference](http://codex.wordpress.org/Function_Reference)
 * The structure is absolute crap as well! Surely the MINIMUM is:
 * – function name
    – arguments – return type – an example (I can live without this
   one)
 * That’s all for now. Thanks for reading.
    Cheers, Dave

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Kalessin](https://wordpress.org/support/users/kalessin/)
 * (@kalessin)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/general-code-workflow-questions/#post-697054)
 * 1. You can write a quick and simple plugin to replace classnames with those you
   want to use, although I find it useful that every WordPress install I work on
   uses the same ones.
 * 2. If you’re retrieving, for example a *list* of categories, it makes sense that
   it comes in ul tags. This is not presentation, this is semantically-correct markup,
   a benefit for which WordPress is famous. You can use CSS to style the returned
   list in any way you want.
 * 3. These things take time; most of the developers are busy developing. “Crap,”
   eh? Way to show appreciation for the time and effort that other volunteers have
   put in. Think you can do better? [Prove it](http://codex.wordpress.org/Contributing_to_WordPress).
 *  Thread Starter [davestewart](https://wordpress.org/support/users/davestewart/)
 * (@davestewart)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/general-code-workflow-questions/#post-697059)
 * Kalessin,
    Thanks for the reply.
 * 1. Ok. So you’re saying it’s best to write my own custom functions? Using raw
   data where I can, and regexp-ing the rest? Sounds doable.
    And I get your point
   about the standard install.
 * 2. I’m all up on semantic markup. I’ll rephrase (and possibly edit the original
   post’s question) was why is *data* and *markup* mixed. (This is really a follow-
   on question from #1)
 * 3. Oh come on! The effort it takes to write a function definition is negligible!!
   Writing a function might take hours, days, or even weeks.
 * A definition that extracts the arguments, and specifies the return type, would
   take 5 minutes. A basic example perhaps another 10!
 * As I’ve said, with little consistency in function return-types, I’d waste more
   than 5 minutes trying to work out what’s going on. Multiply that by 1000s of 
   users and… well, you get the picture.
 * “Memo to all staff: please document your functions, then email the webmaster 
   who will publish them online.”
 * With regards to me putting in the effort, I understand where you’re coming from,
   but a misplaced work ethic I think:
 * “All of the documentation at the Codex has been produced by users like you and
   me!” reads to me as “We can’t be assed to finish the job! We’d rather get onto
   something more interesting!”
 * Let’s get everyone up to speed with the basics of documentation then let the 
   newly-informed give something back once they know what the hell is supposed to
   do what.
 * I’m ALL up for development time, but this is a job half-done, I’m afraid, and
   you’re not going to be changing my mind on this one.
 * In this age of web apps and free frameworks, documentation is a prerequisite.
 * [http://docs.jquery.com/Main_Page](http://docs.jquery.com/Main_Page)
    [http://www.prototypejs.org/api](http://www.prototypejs.org/api)
   [http://codeigniter.com/user_guide/toc.html](http://codeigniter.com/user_guide/toc.html)
 * Thanks for the input,
    Cheers, Dave
 *  [Kalessin](https://wordpress.org/support/users/kalessin/)
 * (@kalessin)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/general-code-workflow-questions/#post-697060)
 * To be fair, I kind of agree with you on point three. Proper documentation of 
   a function takes a fraction of the time of the original function development.
   However, there may be myriad reasons for not properly documenting, such as
    - a developer wrote the function(s) then lost interest in the project before
      writing the documentation
    - many functions were written before WordPress was big enough for documentation
      to be important
    - a non-programmer took on the task of documenting the functions and never bothered
      to complete
 * These are just guesses. My point is that for whatever reason, it hasn’t been 
   done and berating volunteers for this being “crap” when they’ve clearly worked
   hard in other areas seems a little… _ungrateful_, I guess. Just could have been
   put in a more diplomatic manner.
 *  Thread Starter [davestewart](https://wordpress.org/support/users/davestewart/)
 * (@davestewart)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/general-code-workflow-questions/#post-697061)
 * >> Just could have been put in a more diplomatic manner.
 * A fair point! I didn’t realise that it was all done by you and I.
 * To be clear, I wasn’t actually slagging the documentation that’s been done, I
   was slagging the fact it’s incomplete which is a higher-level (management) issue.
 * Thanks to everyone who’s contributed!
 * Cheers,
    Dave

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘General code / workflow questions’ is closed to new replies.

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)
 * [markup](https://wordpress.org/support/topic-tag/markup/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [davestewart](https://wordpress.org/support/users/davestewart/)
 * Last activity: [18 years, 3 months ago](https://wordpress.org/support/topic/general-code-workflow-questions/#post-697061)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
