get_tags_to_edit

Get comma-separated list of tags available to edit.

Description

(string|bool|WP_Error) get_tags_to_edit( (int) $post_id, (string) $taxonomy = 'post_tag' ); 

Returns (string|bool|WP_Error)

Parameters (2)

0. $post_id (int)
The post id.
1. $taxonomy — Optional. (string) => 'post_tag'
The taxonomy for which to retrieve terms. Default post_tag..

Usage

  1. if ( !function_exists( 'get_tags_to_edit' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/taxonomy.php'; 
  3.  
  4. // The post id. 
  5. $post_id = -1; 
  6.  
  7. // Optional. The taxonomy for which to retrieve terms. Default 'post_tag'. 
  8. $taxonomy = 'post_tag'; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = get_tags_to_edit($post_id, $taxonomy); 
  12.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/taxonomy.php  
  1. function get_tags_to_edit( $post_id, $taxonomy = 'post_tag' ) { 
  2. return get_terms_to_edit( $post_id, $taxonomy);