I wish to have the ability to comprehend the standard function description that's deliver to Wordpress functions. Particularly, could someone explain the next example from here:
<?php wp_list_categories( $args ); ?>
<?php $args = array( 'show_option_all' => , 'orderby' => 'name', 'order' => 'ASC', 'show_last_update' => 0, 'style' => 'list', 'show_count' => 0, 'hide_empty' => 1, 'use_desc_for_title' => 1, 'child_of' => 0, 'feed' => , 'feed_type' => , 'feed_image' => , 'exclude' => , 'exclude_tree' => , 'include' => , 'current_category' => 0, 'hierarchical' => true, 'title_li' => __( 'Categories' ), 'number' => NULL, 'echo' => 1, 'depth' => 0 ); ?>
I'm able to guess the majority of it, but particularly I can not guess:
- Exactly what does blank following the comma mean? Empty string?
- What's the __?
- How do you call the function? Keyword like python, positional arguments or must i pass an assortment?
- Can there be other things about Wordpress function explanations which is not covered within this example?
- that trailing comma will be a parse error - for the reason that documentation, I believe that it is just showing a choice value without any default.
- the __() function is really a language localization function, that takes an British language literal string, and returns the a converted string to have an application-defined locale.
- the function is known as by passing in a wide array like a parameter, understood to be detailed. Actually, internally this uses wp_parse_args which enables you to definitely pass an assortment, an item, or perhaps a urlencoded style string of options.
- please be aware case an idiom as opposed to the way all PHP functions are known as. Within this situation, possibly the designer from the function wanted an array of optional arguments, combined having the ability to add new arguments having to break older code.