| 130 | | * register_taxonomy() - Create or modify a taxonomy object. Do not use before init. |
|---|
| 131 | | * |
|---|
| 132 | | * A simple function for creating or modifying a taxonomy object based on the parameters given. |
|---|
| 133 | | * The function will accept an array (third optional parameter), along with strings for the |
|---|
| 134 | | * taxonomy name and another string for the object type. |
|---|
| 135 | | * |
|---|
| 136 | | * Nothing is returned, so expect error maybe or use is_taxonomy() to check whether taxonomy exists. |
|---|
| | 130 | * Create or modify a taxonomy object. Do not use before init. |
|---|
| | 131 | * |
|---|
| | 132 | * A simple function for creating or modifying a taxonomy object based on the |
|---|
| | 133 | * parameters given. The function will accept an array (third optional |
|---|
| | 134 | * parameter), along with strings for the taxonomy name and another string for |
|---|
| | 135 | * the object type. |
|---|
| | 136 | * |
|---|
| | 137 | * Nothing is returned, so expect error maybe or use is_taxonomy() to check |
|---|
| | 138 | * whether taxonomy exists. |
|---|
| 139 | | * hierarachical - has some defined purpose at other parts of the API and is a boolean value. |
|---|
| 140 | | * update_count_callback - works much like a hook, in that it will be called when the count is updated. |
|---|
| 141 | | * rewrite - false to prevent rewrite, or array('slug'=>$slug) to customize permastruct; default will use $taxonomy as slug |
|---|
| 142 | | * query_var - false to prevent queries, or string to customize query var (?$query_var=$term); default will use $taxonomy as query var |
|---|
| | 141 | * |
|---|
| | 142 | * hierarachical - has some defined purpose at other parts of the API and is a |
|---|
| | 143 | * boolean value. |
|---|
| | 144 | * |
|---|
| | 145 | * update_count_callback - works much like a hook, in that it will be called |
|---|
| | 146 | * when the count is updated. |
|---|
| | 147 | * |
|---|
| | 148 | * rewrite - false to prevent rewrite, or array('slug'=>$slug) to customize |
|---|
| | 149 | * permastruct; default will use $taxonomy as slug. |
|---|
| | 150 | * |
|---|
| | 151 | * query_var - false to prevent queries, or string to customize query var |
|---|
| | 152 | * (?$query_var=$term); default will use $taxonomy as query var. |
|---|
| 187 | | * get_objects_in_term() - Return object_ids of valid taxonomy and term |
|---|
| 188 | | * |
|---|
| 189 | | * The strings of $taxonomies must exist before this function will continue. On failure of finding |
|---|
| 190 | | * a valid taxonomy, it will return an WP_Error class, kind of like Exceptions in PHP 5, except you |
|---|
| 191 | | * can't catch them. Even so, you can still test for the WP_Error class and get the error message. |
|---|
| 192 | | * |
|---|
| 193 | | * The $terms aren't checked the same as $taxonomies, but still need to exist for $object_ids to |
|---|
| 194 | | * be returned. |
|---|
| 195 | | * |
|---|
| 196 | | * It is possible to change the order that object_ids is returned by either using PHP sort family |
|---|
| 197 | | * functions or using the database by using $args with either ASC or DESC array. The value should |
|---|
| 198 | | * be in the key named 'order'. |
|---|
| | 197 | * Retrieve object_ids of valid taxonomy and term. |
|---|
| | 198 | * |
|---|
| | 199 | * The strings of $taxonomies must exist before this function will continue. On |
|---|
| | 200 | * failure of finding a valid taxonomy, it will return an WP_Error class, kind |
|---|
| | 201 | * of like Exceptions in PHP 5, except you can't catch them. Even so, you can |
|---|
| | 202 | * still test for the WP_Error class and get the error message. |
|---|
| | 203 | * |
|---|
| | 204 | * The $terms aren't checked the same as $taxonomies, but still need to exist |
|---|
| | 205 | * for $object_ids to be returned. |
|---|
| | 206 | * |
|---|
| | 207 | * It is possible to change the order that object_ids is returned by either |
|---|
| | 208 | * using PHP sort family functions or using the database by using $args with |
|---|
| | 209 | * either ASC or DESC array. The value should be in the key named 'order'. |
|---|
| 253 | | * $term ID must be part of $taxonomy, to get from the database. Failure, might be |
|---|
| 254 | | * able to be captured by the hooks. Failure would be the same value as $wpdb returns for the |
|---|
| 255 | | * get_row method. |
|---|
| 256 | | * |
|---|
| 257 | | * There are two hooks, one is specifically for each term, named 'get_term', and the second is |
|---|
| 258 | | * for the taxonomy name, 'term_$taxonomy'. Both hooks gets the term object, and the taxonomy |
|---|
| 259 | | * name as parameters. Both hooks are expected to return a Term object. |
|---|
| 260 | | * |
|---|
| 261 | | * 'get_term' hook - Takes two parameters the term Object and the taxonomy name. Must return |
|---|
| 262 | | * term object. Used in get_term() as a catch-all filter for every $term. |
|---|
| 263 | | * |
|---|
| 264 | | * 'get_$taxonomy' hook - Takes two parameters the term Object and the taxonomy name. Must return |
|---|
| 265 | | * term object. $taxonomy will be the taxonomy name, so for example, if 'category', it would be |
|---|
| 266 | | * 'get_category' as the filter name. Useful for custom taxonomies or plugging into default taxonomies. |
|---|
| | 264 | * $term ID must be part of $taxonomy, to get from the database. Failure, might |
|---|
| | 265 | * be able to be captured by the hooks. Failure would be the same value as $wpdb |
|---|
| | 266 | * returns for the get_row method. |
|---|
| | 267 | * |
|---|
| | 268 | * There are two hooks, one is specifically for each term, named 'get_term', and |
|---|
| | 269 | * the second is for the taxonomy name, 'term_$taxonomy'. Both hooks gets the |
|---|
| | 270 | * term object, and the taxonomy name as parameters. Both hooks are expected to |
|---|
| | 271 | * return a Term object. |
|---|
| | 272 | * |
|---|
| | 273 | * 'get_term' hook - Takes two parameters the term Object and the taxonomy name. |
|---|
| | 274 | * Must return term object. Used in get_term() as a catch-all filter for every |
|---|
| | 275 | * $term. |
|---|
| | 276 | * |
|---|
| | 277 | * 'get_$taxonomy' hook - Takes two parameters the term Object and the taxonomy |
|---|
| | 278 | * name. Must return term object. $taxonomy will be the taxonomy name, so for |
|---|
| | 279 | * example, if 'category', it would be 'get_category' as the filter name. Useful |
|---|
| | 280 | * for custom taxonomies or plugging into default taxonomies. |
|---|
| 319 | | * get_term_by() - Get all Term data from database by Term field and data. |
|---|
| 320 | | * |
|---|
| 321 | | * Warning: $value is not escaped for 'name' $field. You must do it yourself, if required. |
|---|
| 322 | | * |
|---|
| 323 | | * The default $field is 'id', therefore it is possible to also use null for field, but not |
|---|
| 324 | | * recommended that you do so. |
|---|
| 325 | | * |
|---|
| 326 | | * If $value does not exist, the return value will be false. If $taxonomy exists and $field |
|---|
| 327 | | * and $value combinations exist, the Term will be returned. |
|---|
| | 333 | * Get all Term data from database by Term field and data. |
|---|
| | 334 | * |
|---|
| | 335 | * Warning: $value is not escaped for 'name' $field. You must do it yourself, if |
|---|
| | 336 | * required. |
|---|
| | 337 | * |
|---|
| | 338 | * The default $field is 'id', therefore it is possible to also use null for |
|---|
| | 339 | * field, but not recommended that you do so. |
|---|
| | 340 | * |
|---|
| | 341 | * If $value does not exist, the return value will be false. If $taxonomy exists |
|---|
| | 342 | * and $field and $value combinations exist, the Term will be returned. |
|---|
| 484 | | * get_terms() - Retrieve the terms in taxonomy or list of taxonomies. |
|---|
| 485 | | * |
|---|
| 486 | | * You can fully inject any customizations to the query before it is sent, as well as control |
|---|
| 487 | | * the output with a filter. |
|---|
| 488 | | * |
|---|
| 489 | | * The 'get_terms' filter will be called when the cache has the term and will pass the found |
|---|
| 490 | | * term along with the array of $taxonomies and array of $args. This filter is also called |
|---|
| 491 | | * before the array of terms is passed and will pass the array of terms, along with the $taxonomies |
|---|
| 492 | | * and $args. |
|---|
| 493 | | * |
|---|
| 494 | | * The 'list_terms_exclusions' filter passes the compiled exclusions along with the $args. |
|---|
| | 499 | * Retrieve the terms in taxonomy or list of taxonomies. |
|---|
| | 500 | * |
|---|
| | 501 | * You can fully inject any customizations to the query before it is sent, as |
|---|
| | 502 | * well as control the output with a filter. |
|---|
| | 503 | * |
|---|
| | 504 | * The 'get_terms' filter will be called when the cache has the term and will |
|---|
| | 505 | * pass the found term along with the array of $taxonomies and array of $args. |
|---|
| | 506 | * This filter is also called before the array of terms is passed and will pass |
|---|
| | 507 | * the array of terms, along with the $taxonomies and $args. |
|---|
| | 508 | * |
|---|
| | 509 | * The 'list_terms_exclusions' filter passes the compiled exclusions along with |
|---|
| | 510 | * the $args. |
|---|
| 505 | | * The argument 'pad_counts' will count all of the children along with the $terms. |
|---|
| 506 | | * |
|---|
| 507 | | * The 'get' argument allows for overwriting 'hide_empty' and 'child_of', which can be done by |
|---|
| 508 | | * setting the value to 'all', instead of its default empty string value. |
|---|
| 509 | | * |
|---|
| 510 | | * The 'child_of' argument will be used if you use multiple taxonomy or the first $taxonomy |
|---|
| 511 | | * isn't hierarchical or 'parent' isn't used. The default is 0, which will be translated to |
|---|
| 512 | | * a false value. If 'child_of' is set, then 'child_of' value will be tested against |
|---|
| 513 | | * $taxonomy to see if 'child_of' is contained within. Will return an empty array if test |
|---|
| 514 | | * fails. |
|---|
| 515 | | * |
|---|
| 516 | | * If 'parent' is set, then it will be used to test against the first taxonomy. Much like |
|---|
| 517 | | * 'child_of'. Will return an empty array if the test fails. |
|---|
| | 524 | * The argument 'pad_counts' will count all of the children along with the |
|---|
| | 525 | * $terms. |
|---|
| | 526 | * |
|---|
| | 527 | * The 'get' argument allows for overwriting 'hide_empty' and 'child_of', which |
|---|
| | 528 | * can be done by setting the value to 'all', instead of its default empty |
|---|
| | 529 | * string value. |
|---|
| | 530 | * |
|---|
| | 531 | * The 'child_of' argument will be used if you use multiple taxonomy or the |
|---|
| | 532 | * first $taxonomy isn't hierarchical or 'parent' isn't used. The default is 0, |
|---|
| | 533 | * which will be translated to a false value. If 'child_of' is set, then |
|---|
| | 534 | * 'child_of' value will be tested against $taxonomy to see if 'child_of' is |
|---|
| | 535 | * contained within. Will return an empty array if test fails. |
|---|
| | 536 | * |
|---|
| | 537 | * If 'parent' is set, then it will be used to test against the first taxonomy. |
|---|
| | 538 | * Much like 'child_of'. Will return an empty array if the test fails. |
|---|
| 760 | | * sanitize_term() - Sanitize Term all fields |
|---|
| 761 | | * |
|---|
| 762 | | * Relys on sanitize_term_field() to sanitize the term. The difference |
|---|
| 763 | | * is that this function will sanitize <strong>all</strong> fields. The context |
|---|
| 764 | | * is based on sanitize_term_field(). |
|---|
| | 780 | * Sanitize Term all fields. |
|---|
| | 781 | * |
|---|
| | 782 | * Relys on sanitize_term_field() to sanitize the term. The difference is that |
|---|
| | 783 | * this function will sanitize <strong>all</strong> fields. The context is based |
|---|
| | 784 | * on sanitize_term_field(). |
|---|
| 801 | | * sanitize_term_field() - Cleanse the field value in the term based on the context |
|---|
| 802 | | * |
|---|
| 803 | | * Passing a term field value through the function should be assumed to have cleansed |
|---|
| 804 | | * the value for whatever context the term field is going to be used. |
|---|
| 805 | | * |
|---|
| 806 | | * If no context or an unsupported context is given, then default filters will be applied. |
|---|
| 807 | | * |
|---|
| 808 | | * There are enough filters for each context to support a custom filtering without creating |
|---|
| 809 | | * your own filter function. Simply create a function that hooks into the filter you need. |
|---|
| | 821 | * Cleanse the field value in the term based on the context. |
|---|
| | 822 | * |
|---|
| | 823 | * Passing a term field value through the function should be assumed to have |
|---|
| | 824 | * cleansed the value for whatever context the term field is going to be used. |
|---|
| | 825 | * |
|---|
| | 826 | * If no context or an unsupported context is given, then default filters will |
|---|
| | 827 | * be applied. |
|---|
| | 828 | * |
|---|
| | 829 | * There are enough filters for each context to support a custom filtering |
|---|
| | 830 | * without creating your own filter function. Simply create a function that |
|---|
| | 831 | * hooks into the filter you need. |
|---|
| 897 | | * wp_delete_object_term_relationships() - Will unlink the term from the taxonomy |
|---|
| 898 | | * |
|---|
| 899 | | * Will remove the term's relationship to the taxonomy, not the term or taxonomy itself. |
|---|
| 900 | | * The term and taxonomy will still exist. Will require the term's object ID to perform |
|---|
| 901 | | * the operation. |
|---|
| | 919 | * Will unlink the term from the taxonomy. |
|---|
| | 920 | * |
|---|
| | 921 | * Will remove the term's relationship to the taxonomy, not the term or taxonomy |
|---|
| | 922 | * itself. The term and taxonomy will still exist. Will require the term's |
|---|
| | 923 | * object ID to perform the operation. |
|---|
| 1009 | | * wp_get_object_terms() - Retrieves the terms associated with the given object(s), in the supplied taxonomies. |
|---|
| 1010 | | * |
|---|
| 1011 | | * The following information has to do the $args parameter and for what can be contained in the string |
|---|
| 1012 | | * or array of that parameter, if it exists. |
|---|
| 1013 | | * |
|---|
| 1014 | | * The first argument is called, 'orderby' and has the default value of 'name'. The other value that is |
|---|
| 1015 | | * supported is 'count'. |
|---|
| 1016 | | * |
|---|
| 1017 | | * The second argument is called, 'order' and has the default value of 'ASC'. The only other value that |
|---|
| 1018 | | * will be acceptable is 'DESC'. |
|---|
| 1019 | | * |
|---|
| 1020 | | * The final argument supported is called, 'fields' and has the default value of 'all'. There are |
|---|
| 1021 | | * multiple other options that can be used instead. Supported values are as follows: 'all', 'ids', |
|---|
| 1022 | | * 'names', and finally 'all_with_object_id'. |
|---|
| 1023 | | * |
|---|
| 1024 | | * The fields argument also decides what will be returned. If 'all' or 'all_with_object_id' is choosen or |
|---|
| 1025 | | * the default kept intact, then all matching terms objects will be returned. If either 'ids' or 'names' |
|---|
| 1026 | | * is used, then an array of all matching term ids or term names will be returned respectively. |
|---|
| | 1031 | * Retrieves the terms associated with the given object(s), in the supplied taxonomies. |
|---|
| | 1032 | * |
|---|
| | 1033 | * The following information has to do the $args parameter and for what can be |
|---|
| | 1034 | * contained in the string or array of that parameter, if it exists. |
|---|
| | 1035 | * |
|---|
| | 1036 | * The first argument is called, 'orderby' and has the default value of 'name'. |
|---|
| | 1037 | * The other value that is supported is 'count'. |
|---|
| | 1038 | * |
|---|
| | 1039 | * The second argument is called, 'order' and has the default value of 'ASC'. |
|---|
| | 1040 | * The only other value that will be acceptable is 'DESC'. |
|---|
| | 1041 | * |
|---|
| | 1042 | * The final argument supported is called, 'fields' and has the default value of |
|---|
| | 1043 | * 'all'. There are multiple other options that can be used instead. Supported |
|---|
| | 1044 | * values are as follows: 'all', 'ids', 'names', and finally |
|---|
| | 1045 | * 'all_with_object_id'. |
|---|
| | 1046 | * |
|---|
| | 1047 | * The fields argument also decides what will be returned. If 'all' or |
|---|
| | 1048 | * 'all_with_object_id' is choosen or the default kept intact, then all matching |
|---|
| | 1049 | * terms objects will be returned. If either 'ids' or 'names' is used, then an |
|---|
| | 1050 | * array of all matching term ids or term names will be returned respectively. |
|---|
| 1117 | | * wp_insert_term() - Adds a new term to the database. Optionally marks it as an alias of an existing term. |
|---|
| 1118 | | * |
|---|
| 1119 | | * Error handling is assigned for the nonexistance of the $taxonomy and $term parameters before inserting. |
|---|
| 1120 | | * If both the term id and taxonomy exist previously, then an array will be returned that contains the term |
|---|
| 1121 | | * id and the contents of what is returned. The keys of the array are 'term_id' and 'term_taxonomy_id' containing |
|---|
| 1122 | | * numeric values. |
|---|
| 1123 | | * |
|---|
| 1124 | | * It is assumed that the term does not yet exist or the above will apply. The term will be first added to the term |
|---|
| 1125 | | * table and then related to the taxonomy if everything is well. If everything is correct, then several actions |
|---|
| 1126 | | * will be run prior to a filter and then several actions will be run after the filter is run. |
|---|
| 1127 | | * |
|---|
| 1128 | | * The arguments decide how the term is handled based on the $args parameter. The following |
|---|
| 1129 | | * is a list of the available overrides and the defaults. |
|---|
| 1130 | | * |
|---|
| 1131 | | * 'alias_of'. There is no default, but if added, expected is the slug that the term will be an alias of. |
|---|
| 1132 | | * Expected to be a string. |
|---|
| 1133 | | * |
|---|
| 1134 | | * 'description'. There is no default. If exists, will be added to the database along with the term. Expected |
|---|
| 1135 | | * to be a string. |
|---|
| 1136 | | * |
|---|
| 1137 | | * 'parent'. Expected to be numeric and default is 0 (zero). Will assign value of 'parent' to the term. |
|---|
| | 1141 | * Adds a new term to the database. Optionally marks it as an alias of an existing term. |
|---|
| | 1142 | * |
|---|
| | 1143 | * Error handling is assigned for the nonexistance of the $taxonomy and $term |
|---|
| | 1144 | * parameters before inserting. If both the term id and taxonomy exist |
|---|
| | 1145 | * previously, then an array will be returned that contains the term id and the |
|---|
| | 1146 | * contents of what is returned. The keys of the array are 'term_id' and |
|---|
| | 1147 | * 'term_taxonomy_id' containing numeric values. |
|---|
| | 1148 | * |
|---|
| | 1149 | * It is assumed that the term does not yet exist or the above will apply. The |
|---|
| | 1150 | * term will be first added to the term table and then related to the taxonomy |
|---|
| | 1151 | * if everything is well. If everything is correct, then several actions will be |
|---|
| | 1152 | * run prior to a filter and then several actions will be run after the filter |
|---|
| | 1153 | * is run. |
|---|
| | 1154 | * |
|---|
| | 1155 | * The arguments decide how the term is handled based on the $args parameter. |
|---|
| | 1156 | * The following is a list of the available overrides and the defaults. |
|---|
| | 1157 | * |
|---|
| | 1158 | * 'alias_of'. There is no default, but if added, expected is the slug that the |
|---|
| | 1159 | * term will be an alias of. Expected to be a string. |
|---|
| | 1160 | * |
|---|
| | 1161 | * 'description'. There is no default. If exists, will be added to the database |
|---|
| | 1162 | * along with the term. Expected to be a string. |
|---|
| | 1163 | * |
|---|
| | 1164 | * 'parent'. Expected to be numeric and default is 0 (zero). Will assign value |
|---|
| | 1165 | * of 'parent' to the term. |
|---|
| 1141 | | * If 'slug' argument exists then the slug will be checked to see if it is not a valid term. If that check |
|---|
| 1142 | | * succeeds (it is not a valid term), then it is added and the term id is given. If it fails, then a check |
|---|
| 1143 | | * is made to whether the taxonomy is hierarchical and the parent argument is not empty. If the second check |
|---|
| 1144 | | * succeeds, the term will be inserted and the term id will be given. |
|---|
| | 1169 | * If 'slug' argument exists then the slug will be checked to see if it is not |
|---|
| | 1170 | * a valid term. If that check succeeds (it is not a valid term), then it is |
|---|
| | 1171 | * added and the term id is given. If it fails, then a check is made to whether |
|---|
| | 1172 | * the taxonomy is hierarchical and the parent argument is not empty. If the |
|---|
| | 1173 | * second check succeeds, the term will be inserted and the term id will be |
|---|
| | 1174 | * given. |
|---|
| 1238 | | * wp_set_object_terms() - Create Term and Taxonomy Relationships |
|---|
| 1239 | | * |
|---|
| 1240 | | * Relates an object (post, link etc) to a term and taxonomy type. Creates the term and taxonomy |
|---|
| 1241 | | * relationship if it doesn't already exist. Creates a term if it doesn't exist (using the slug). |
|---|
| 1242 | | * |
|---|
| 1243 | | * A relationship means that the term is grouped in or belongs to the taxonomy. A term has no |
|---|
| 1244 | | * meaning until it is given context by defining which taxonomy it exists under. |
|---|
| | 1268 | * Create Term and Taxonomy Relationships. |
|---|
| | 1269 | * |
|---|
| | 1270 | * Relates an object (post, link etc) to a term and taxonomy type. Creates the |
|---|
| | 1271 | * term and taxonomy relationship if it doesn't already exist. Creates a term if |
|---|
| | 1272 | * it doesn't exist (using the slug). |
|---|
| | 1273 | * |
|---|
| | 1274 | * A relationship means that the term is grouped in or belongs to the taxonomy. |
|---|
| | 1275 | * A term has no meaning until it is given context by defining which taxonomy it |
|---|
| | 1276 | * exists under. |
|---|
| 1318 | | * wp_unique_term_slug() - Will make slug unique, if it isn't already |
|---|
| 1319 | | * |
|---|
| 1320 | | * The $slug has to be unique global to every taxonomy, meaning that one taxonomy |
|---|
| 1321 | | * term can't have a matching slug with another taxonomy term. Each slug has to be |
|---|
| 1322 | | * globally unique for every taxonomy. |
|---|
| 1323 | | * |
|---|
| 1324 | | * The way this works is that if the taxonomy that the term belongs to is heirarchical |
|---|
| 1325 | | * and has a parent, it will append that parent to the $slug. |
|---|
| 1326 | | * |
|---|
| 1327 | | * If that still doesn't return an unique slug, then it try to append a number until |
|---|
| 1328 | | * it finds a number that is truely unique. |
|---|
| | 1350 | * Will make slug unique, if it isn't already. |
|---|
| | 1351 | * |
|---|
| | 1352 | * The $slug has to be unique global to every taxonomy, meaning that one |
|---|
| | 1353 | * taxonomy term can't have a matching slug with another taxonomy term. Each |
|---|
| | 1354 | * slug has to be globally unique for every taxonomy. |
|---|
| | 1355 | * |
|---|
| | 1356 | * The way this works is that if the taxonomy that the term belongs to is |
|---|
| | 1357 | * heirarchical and has a parent, it will append that parent to the $slug. |
|---|
| | 1358 | * |
|---|
| | 1359 | * If that still doesn't return an unique slug, then it try to append a number |
|---|
| | 1360 | * until it finds a number that is truely unique. |
|---|
| 1379 | | * wp_update_term() - Update term based on arguments provided |
|---|
| 1380 | | * |
|---|
| 1381 | | * The $args will indiscriminately override all values with the same field name. Care |
|---|
| 1382 | | * must be taken to not override important information need to update or update will |
|---|
| 1383 | | * fail (or perhaps create a new term, neither would be acceptable). |
|---|
| 1384 | | * |
|---|
| 1385 | | * Defaults will set 'alias_of', 'description', 'parent', and 'slug' if not defined |
|---|
| 1386 | | * in $args already. |
|---|
| 1387 | | * |
|---|
| 1388 | | * 'alias_of' will create a term group, if it doesn't already exist, and update it for |
|---|
| 1389 | | * the $term. |
|---|
| 1390 | | * |
|---|
| 1391 | | * If the 'slug' argument in $args is missing, then the 'name' in $args will be used. |
|---|
| 1392 | | * It should also be noted that if you set 'slug' and it isn't unique then a WP_Error |
|---|
| 1393 | | * will be passed back. If you don't pass any slug, then a unique one will be created |
|---|
| 1394 | | * for you. |
|---|
| 1395 | | * |
|---|
| 1396 | | * For what can be overrode in $args, check the term scheme can contain and stay away |
|---|
| 1397 | | * from the term keys. |
|---|
| | 1411 | * Update term based on arguments provided. |
|---|
| | 1412 | * |
|---|
| | 1413 | * The $args will indiscriminately override all values with the same field name. |
|---|
| | 1414 | * Care must be taken to not override important information need to update or |
|---|
| | 1415 | * update will fail (or perhaps create a new term, neither would be acceptable). |
|---|
| | 1416 | * |
|---|
| | 1417 | * Defaults will set 'alias_of', 'description', 'parent', and 'slug' if not |
|---|
| | 1418 | * defined in $args already. |
|---|
| | 1419 | * |
|---|
| | 1420 | * 'alias_of' will create a term group, if it doesn't already exist, and update |
|---|
| | 1421 | * it for the $term. |
|---|
| | 1422 | * |
|---|
| | 1423 | * If the 'slug' argument in $args is missing, then the 'name' in $args will be |
|---|
| | 1424 | * used. It should also be noted that if you set 'slug' and it isn't unique then |
|---|
| | 1425 | * a WP_Error will be passed back. If you don't pass any slug, then a unique one |
|---|
| | 1426 | * will be created for you. |
|---|
| | 1427 | * |
|---|
| | 1428 | * For what can be overrode in $args, check the term scheme can contain and stay |
|---|
| | 1429 | * away from the term keys. |
|---|
| 1508 | | * wp_update_term_count() - Updates the amount of terms in taxonomy |
|---|
| 1509 | | * |
|---|
| 1510 | | * If there is a taxonomy callback applyed, then it will be called for updating the count. |
|---|
| 1511 | | * |
|---|
| 1512 | | * The default action is to count what the amount of terms have the relationship of term ID. |
|---|
| 1513 | | * Once that is done, then update the database. |
|---|
| | 1546 | * Updates the amount of terms in taxonomy. |
|---|
| | 1547 | * |
|---|
| | 1548 | * If there is a taxonomy callback applyed, then it will be called for updating |
|---|
| | 1549 | * the count. |
|---|
| | 1550 | * |
|---|
| | 1551 | * The default action is to count what the amount of terms have the relationship |
|---|
| | 1552 | * of term ID. Once that is done, then update the database. |
|---|
| 1672 | | * The $object_ids expects that the ids be separated by commas, if it is |
|---|
| 1673 | | * a string. |
|---|
| 1674 | | * |
|---|
| 1675 | | * It should be noted that update_object_term_cache() is very time extensive. |
|---|
| 1676 | | * It is advised that the function is not called very often or at least not |
|---|
| 1677 | | * for a lot of terms that exist in a lot of taxonomies. The amount of time |
|---|
| 1678 | | * increases for each term and it also increases for each taxonomy the term |
|---|
| 1679 | | * belongs to. |
|---|
| | 1725 | * The $object_ids expects that the ids be separated by commas, if it is a |
|---|
| | 1726 | * string. |
|---|
| | 1727 | * |
|---|
| | 1728 | * It should be noted that update_object_term_cache() is very time extensive. It |
|---|
| | 1729 | * is advised that the function is not called very often or at least not for a |
|---|
| | 1730 | * lot of terms that exist in a lot of taxonomies. The amount of time increases |
|---|
| | 1731 | * for each term and it also increases for each taxonomy the term belongs to. |
|---|
| | 2039 | /** |
|---|
| | 2040 | * Display the taxonomies of a post with available options. |
|---|
| | 2041 | * |
|---|
| | 2042 | * This function can be used within the loop to display the taxonomies for a |
|---|
| | 2043 | * post without specifying the Post ID. You can also use it outside the Loop to |
|---|
| | 2044 | * display the taxonomies for a specific post. |
|---|
| | 2045 | * |
|---|
| | 2046 | * The available defaults are: |
|---|
| | 2047 | * 'post' : default is 0. The post ID to get taxonomies of. |
|---|
| | 2048 | * 'before' : default is empty string. Display before taxonomies list. |
|---|
| | 2049 | * 'sep' : default is empty string. Separate every taxonomy with value in this. |
|---|
| | 2050 | * 'after' : default is empty string. Display this after the taxonomies list. |
|---|
| | 2051 | * |
|---|
| | 2052 | * @since 2.6 |
|---|
| | 2053 | * @uses get_the_taxonomies() |
|---|
| | 2054 | * |
|---|
| | 2055 | * @param array $args Override the defaults. |
|---|
| | 2056 | */ |
|---|