WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #18438, comment 8


Ignore:
Timestamp:
02/12/12 05:05:16 (2 years ago)
Author:
nprasath002
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18438, comment 8

    v1 v2  
    77>  - Why is there the following line: $taxonomy = (array) taxonomy? 
    88get_taxonomy() returns a taxonomy object. 
    9 We use $object->key to get the value from the object. 
    10 To use $object['key'] you must cast the object to an array. 
    11 Of course we can use $object->key through out. 
    12 But all of the other functions are coded in $object['key'] style. 
     9We use  
     10{{{ 
     11$object->key 
     12}}} 
     13 to get the value from the object. 
     14To use  
     15{{{ 
     16$object['key'] 
     17}}} 
     18 you must cast the object to an array. 
     19Of course we can use  
     20{{{ 
     21$object->key 
     22}}} 
     23 through out. 
     24But all of the other functions are coded in  
     25{{{ 
     26$object['key'] 
     27}}} 
     28 style. 
    1329For consistency i casted it to an array. 
    1430>  - return term_id should have strval()