Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am a programmer, and love jQuery. Visual jQuery and other resources is THE best place to get all the code/function et get your hand dirty...

But when it come to WordPress.. the code is too thin or too abstract... i nee more like a dictionary of term, function, and possibility

What i need is like the ULTIMATE cheat sheet, made in a bible.. i don't care if it 20 pages, i need an HOW TO book of the function possible... like :

  1. wp_list_categories.. where it is and what are the the return values

  2. this snippet i copy from the web : <?php foreach (get_the_category() as $cat){ echo "[" . $cat->cat_name . "] ";} ?> the method cat_name HOW SHOULD I KNOW THAT ???? where to find the reference ??

please enlight me !

share|improve this question
    
It all starts with what you want to accomplish. Please give us details of what you want to accomplish and then we can help. –  MikeSchinkel Apr 5 '11 at 21:31
    
let's try with what written in the question : $cat->cat_name. I can i know that cat_name is a method that return something from $cat from get_the_category() function ? –  menardmam Apr 6 '11 at 7:26
add comment

2 Answers 2

up vote 1 down vote accepted

Hi @menardmam:

Let's try with what I wrote in the question : $cat->cat_name. How can I know that cat_name is a method that return something from $cat from get_the_category() function?

Frankly the best way to know an answer like that is to use a debugging IDE and to trace through the WordPress core source code. Seriously; the source code is the only documentation that is sure to have been updated, and the results shown in the debugger are the only documentation that is sure to be exactly correct. I use PhpStorm+Zend Debugger but others use NetBeans, others Eclipse, and there are several other PHP IDEs with debuggers too.

Next, you can "google" for your specific questions by including site:codex.wordpress.org as part of your search term and/or search for it here on this site.

As a third and often best way, ask a specific question here on this site. This site works best when you ask specific "How-To" questions with a title that matches your question and with details about your question, and especially your use-case when applicable. Think about it this way:

If someone googles to find the answer you are after, would google ever match their search terms with the title of your question? And when they do find your question would it be very clear to them what question you were asking?

If you can answer "Yes" to both of those then chances are very good you'll get a great answer to your specific question here and you will be likely to get it quickly.

share|improve this answer
    
In addition to googling using site:codex.wordpress.org, a couple other places that always give quick answers are googling wordpress xref {function-name} (for function parameters and output) and site:adambrown.info {hook-name} for the context of hooks. I have custom searches set up for both of those in my search bar in Firefox. –  goldenapples Apr 6 '11 at 19:12
    
we learn new thing every day !.. thanks –  menardmam Apr 6 '11 at 23:29
    
@goldenapples - Good additions, thanks. One thing though, I never really get value about of Adam Brown's site or XRef; I think because with PhpStorm I can get to that information so much faster it's just easier to use my IDE. But yes, for people who have not yet tried PhpStorm, those are good! :) –  MikeSchinkel Apr 7 '11 at 9:33
    
@menardmam - Glad I could help! –  MikeSchinkel Apr 7 '11 at 9:34
add comment

Tell me (us) about that... :) Unfortunately WP is not exactly known for perfect documentation.

There are some basics in Codex, like Function Reference... But what you really need (and will end up using anyway) is either cross-reference of the code or good PHP-aware IDE.

Like it or not - reading WP source code is essential part of getting proficient with it.

$cat->cat_name. I can i know that cat_name is a method that return something from $cat from get_the_category() function ?

It is not a method, it is a field of category object. Many items in WordPress (posts, taxonomies, etc) are represented internally by object. For some it is straight conversion of how are they stored in database, for others its more abstract.

Codex has descriptions or examples for some objects like categories and posts.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.