Docs: Document the optional `$args` parameter in `wp_delete_term()` in the hash notation style.
Props slushman, swissspidy. Fixes #34862. Built from https://develop.svn.wordpress.org/trunk@35889 git-svn-id: http://core.svn.wordpress.org/trunk@35853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3f61b6bafa
commit
c06143270e
|
@ -2056,22 +2056,24 @@ function wp_delete_object_term_relationships( $object_id, $taxonomies ) {
|
|||
*
|
||||
* Metadata associated with the term will be deleted.
|
||||
*
|
||||
* The `$args` 'default' will only override the terms found, if there is only one
|
||||
* term found. Any other and the found terms are used.
|
||||
*
|
||||
* The $args 'force_default' will force the term supplied as default to be
|
||||
* assigned even if the object was not going to be termless
|
||||
*
|
||||
* @todo Document $args as a hash notation.
|
||||
*
|
||||
* @since 2.3.0
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @param int $term Term ID.
|
||||
* @param string $taxonomy Taxonomy Name.
|
||||
* @param array|string $args Optional. Change 'default' term id and override found term ids.
|
||||
* @return bool|int|WP_Error Returns false if not term; true if completes delete action.
|
||||
* @param array|string $args {
|
||||
* Optional. Array of arguments to override the default term ID. Default empty array.
|
||||
*
|
||||
* @type int $default The term ID to make the default term. This will only override
|
||||
* the terms found if there is only one term found. Any other and
|
||||
* the found terms are used.
|
||||
* @type bool $force_default Optional. Whether to force the supplied term as default to be
|
||||
* assigned even if the object was not going to be term-less.
|
||||
* Default false.
|
||||
* }
|
||||
* @return bool|int|WP_Error True on success, false if term does not exist. Zero on attempted
|
||||
* deletion of default Category. WP_Error if the taxonomy does not exist.
|
||||
*/
|
||||
function wp_delete_term( $term, $taxonomy, $args = array() ) {
|
||||
global $wpdb;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-35888';
|
||||
$wp_version = '4.5-alpha-35889';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue