[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-admin/includes/ -> class-wp-terms-list-table.php (source)

   1  <?php
   2  /**
   3   * List Table API: WP_Terms_List_Table class
   4   *
   5   * @package WordPress
   6   * @subpackage Administration
   7   * @since 3.1.0
   8   */
   9  
  10  /**
  11   * Core class used to implement displaying terms in a list table.
  12   *
  13   * @since 3.1.0
  14   * @access private
  15   *
  16   * @see WP_List_Table
  17   */
  18  class WP_Terms_List_Table extends WP_List_Table {
  19  
  20      public $callback_args;
  21  
  22      private $level;
  23  
  24      /**
  25       * Constructor.
  26       *
  27       * @since 3.1.0
  28       *
  29       * @see WP_List_Table::__construct() for more information on default arguments.
  30       *
  31       * @global string $post_type
  32       * @global string $taxonomy
  33       * @global string $action
  34       * @global object $tax
  35       *
  36       * @param array $args An associative array of arguments.
  37       */
  38  	public function __construct( $args = array() ) {
  39          global $post_type, $taxonomy, $action, $tax;
  40  
  41          parent::__construct(
  42              array(
  43                  'plural'   => 'tags',
  44                  'singular' => 'tag',
  45                  'screen'   => isset( $args['screen'] ) ? $args['screen'] : null,
  46              )
  47          );
  48  
  49          $action    = $this->screen->action;
  50          $post_type = $this->screen->post_type;
  51          $taxonomy  = $this->screen->taxonomy;
  52  
  53          if ( empty( $taxonomy ) ) {
  54              $taxonomy = 'post_tag';
  55          }
  56  
  57          if ( ! taxonomy_exists( $taxonomy ) ) {
  58              wp_die( __( 'Invalid taxonomy.' ) );
  59          }
  60  
  61          $tax = get_taxonomy( $taxonomy );
  62  
  63          // @todo Still needed? Maybe just the show_ui part.
  64          if ( empty( $post_type ) || ! in_array( $post_type, get_post_types( array( 'show_ui' => true ) ), true ) ) {
  65              $post_type = 'post';
  66          }
  67  
  68      }
  69  
  70      /**
  71       * @return bool
  72       */
  73  	public function ajax_user_can() {
  74          return current_user_can( get_taxonomy( $this->screen->taxonomy )->cap->manage_terms );
  75      }
  76  
  77      /**
  78       */
  79  	public function prepare_items() {
  80          $tags_per_page = $this->get_items_per_page( 'edit_' . $this->screen->taxonomy . '_per_page' );
  81  
  82          if ( 'post_tag' === $this->screen->taxonomy ) {
  83              /**
  84               * Filters the number of terms displayed per page for the Tags list table.
  85               *
  86               * @since 2.8.0
  87               *
  88               * @param int $tags_per_page Number of tags to be displayed. Default 20.
  89               */
  90              $tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page );
  91  
  92              /**
  93               * Filters the number of terms displayed per page for the Tags list table.
  94               *
  95               * @since 2.7.0
  96               * @deprecated 2.8.0 Use {@see 'edit_tags_per_page'} instead.
  97               *
  98               * @param int $tags_per_page Number of tags to be displayed. Default 20.
  99               */
 100              $tags_per_page = apply_filters_deprecated( 'tagsperpage', array( $tags_per_page ), '2.8.0', 'edit_tags_per_page' );
 101          } elseif ( 'category' === $this->screen->taxonomy ) {
 102              /**
 103               * Filters the number of terms displayed per page for the Categories list table.
 104               *
 105               * @since 2.8.0
 106               *
 107               * @param int $tags_per_page Number of categories to be displayed. Default 20.
 108               */
 109              $tags_per_page = apply_filters( 'edit_categories_per_page', $tags_per_page );
 110          }
 111  
 112          $search = ! empty( $_REQUEST['s'] ) ? trim( wp_unslash( $_REQUEST['s'] ) ) : '';
 113  
 114          $args = array(
 115              'search' => $search,
 116              'page'   => $this->get_pagenum(),
 117              'number' => $tags_per_page,
 118          );
 119  
 120          if ( ! empty( $_REQUEST['orderby'] ) ) {
 121              $args['orderby'] = trim( wp_unslash( $_REQUEST['orderby'] ) );
 122          }
 123  
 124          if ( ! empty( $_REQUEST['order'] ) ) {
 125              $args['order'] = trim( wp_unslash( $_REQUEST['order'] ) );
 126          }
 127  
 128          $this->callback_args = $args;
 129  
 130          $this->set_pagination_args(
 131              array(
 132                  'total_items' => wp_count_terms(
 133                      array(
 134                          'taxonomy' => $this->screen->taxonomy,
 135                          'search'   => $search,
 136                      )
 137                  ),
 138                  'per_page'    => $tags_per_page,
 139              )
 140          );
 141      }
 142  
 143      /**
 144       * @return bool
 145       */
 146  	public function has_items() {
 147          // @todo Populate $this->items in prepare_items().
 148          return true;
 149      }
 150  
 151      /**
 152       */
 153  	public function no_items() {
 154          echo get_taxonomy( $this->screen->taxonomy )->labels->not_found;
 155      }
 156  
 157      /**
 158       * @return array
 159       */
 160  	protected function get_bulk_actions() {
 161          $actions = array();
 162  
 163          if ( current_user_can( get_taxonomy( $this->screen->taxonomy )->cap->delete_terms ) ) {
 164              $actions['delete'] = __( 'Delete' );
 165          }
 166  
 167          return $actions;
 168      }
 169  
 170      /**
 171       * @return string
 172       */
 173  	public function current_action() {
 174          if ( isset( $_REQUEST['action'] ) && isset( $_REQUEST['delete_tags'] ) && 'delete' === $_REQUEST['action'] ) {
 175              return 'bulk-delete';
 176          }
 177  
 178          return parent::current_action();
 179      }
 180  
 181      /**
 182       * @return array
 183       */
 184  	public function get_columns() {
 185          $columns = array(
 186              'cb'          => '<input type="checkbox" />',
 187              'name'        => _x( 'Name', 'term name' ),
 188              'description' => __( 'Description' ),
 189              'slug'        => __( 'Slug' ),
 190          );
 191  
 192          if ( 'link_category' === $this->screen->taxonomy ) {
 193              $columns['links'] = __( 'Links' );
 194          } else {
 195              $columns['posts'] = _x( 'Count', 'Number/count of items' );
 196          }
 197  
 198          return $columns;
 199      }
 200  
 201      /**
 202       * @return array
 203       */
 204  	protected function get_sortable_columns() {
 205          return array(
 206              'name'        => 'name',
 207              'description' => 'description',
 208              'slug'        => 'slug',
 209              'posts'       => 'count',
 210              'links'       => 'count',
 211          );
 212      }
 213  
 214      /**
 215       */
 216  	public function display_rows_or_placeholder() {
 217          $taxonomy = $this->screen->taxonomy;
 218  
 219          $args = wp_parse_args(
 220              $this->callback_args,
 221              array(
 222                  'taxonomy'   => $taxonomy,
 223                  'page'       => 1,
 224                  'number'     => 20,
 225                  'search'     => '',
 226                  'hide_empty' => 0,
 227              )
 228          );
 229  
 230          $page = $args['page'];
 231  
 232          // Set variable because $args['number'] can be subsequently overridden.
 233          $number = $args['number'];
 234  
 235          $offset         = ( $page - 1 ) * $number;
 236          $args['offset'] = $offset;
 237  
 238          // Convert it to table rows.
 239          $count = 0;
 240  
 241          if ( is_taxonomy_hierarchical( $taxonomy ) && ! isset( $args['orderby'] ) ) {
 242              // We'll need the full set of terms then.
 243              $args['number'] = 0;
 244              $args['offset'] = $args['number'];
 245          }
 246  
 247          $terms = get_terms( $args );
 248  
 249          if ( empty( $terms ) || ! is_array( $terms ) ) {
 250              echo '<tr class="no-items"><td class="colspanchange" colspan="' . $this->get_column_count() . '">';
 251              $this->no_items();
 252              echo '</td></tr>';
 253              return;
 254          }
 255  
 256          if ( is_taxonomy_hierarchical( $taxonomy ) && ! isset( $args['orderby'] ) ) {
 257              if ( ! empty( $args['search'] ) ) {// Ignore children on searches.
 258                  $children = array();
 259              } else {
 260                  $children = _get_term_hierarchy( $taxonomy );
 261              }
 262  
 263              /*
 264               * Some funky recursion to get the job done (paging & parents mainly) is contained within.
 265               * Skip it for non-hierarchical taxonomies for performance sake.
 266               */
 267              $this->_rows( $taxonomy, $terms, $children, $offset, $number, $count );
 268          } else {
 269              foreach ( $terms as $term ) {
 270                  $this->single_row( $term );
 271              }
 272          }
 273      }
 274  
 275      /**
 276       * @param string $taxonomy
 277       * @param array  $terms
 278       * @param array  $children
 279       * @param int    $start
 280       * @param int    $per_page
 281       * @param int    $count
 282       * @param int    $parent
 283       * @param int    $level
 284       */
 285  	private function _rows( $taxonomy, $terms, &$children, $start, $per_page, &$count, $parent = 0, $level = 0 ) {
 286  
 287          $end = $start + $per_page;
 288  
 289          foreach ( $terms as $key => $term ) {
 290  
 291              if ( $count >= $end ) {
 292                  break;
 293              }
 294  
 295              if ( $term->parent !== $parent && empty( $_REQUEST['s'] ) ) {
 296                  continue;
 297              }
 298  
 299              // If the page starts in a subtree, print the parents.
 300              if ( $count === $start && $term->parent > 0 && empty( $_REQUEST['s'] ) ) {
 301                  $my_parents = array();
 302                  $parent_ids = array();
 303                  $p          = $term->parent;
 304  
 305                  while ( $p ) {
 306                      $my_parent    = get_term( $p, $taxonomy );
 307                      $my_parents[] = $my_parent;
 308                      $p            = $my_parent->parent;
 309  
 310                      if ( in_array( $p, $parent_ids, true ) ) { // Prevent parent loops.
 311                          break;
 312                      }
 313  
 314                      $parent_ids[] = $p;
 315                  }
 316  
 317                  unset( $parent_ids );
 318  
 319                  $num_parents = count( $my_parents );
 320  
 321                  while ( $my_parent = array_pop( $my_parents ) ) {
 322                      echo "\t";
 323                      $this->single_row( $my_parent, $level - $num_parents );
 324                      $num_parents--;
 325                  }
 326              }
 327  
 328              if ( $count >= $start ) {
 329                  echo "\t";
 330                  $this->single_row( $term, $level );
 331              }
 332  
 333              ++$count;
 334  
 335              unset( $terms[ $key ] );
 336  
 337              if ( isset( $children[ $term->term_id ] ) && empty( $_REQUEST['s'] ) ) {
 338                  $this->_rows( $taxonomy, $terms, $children, $start, $per_page, $count, $term->term_id, $level + 1 );
 339              }
 340          }
 341      }
 342  
 343      /**
 344       * @global string $taxonomy
 345       * @param WP_Term $tag   Term object.
 346       * @param int     $level
 347       */
 348  	public function single_row( $tag, $level = 0 ) {
 349          global $taxonomy;
 350          $tag = sanitize_term( $tag, $taxonomy );
 351  
 352          $this->level = $level;
 353  
 354          if ( $tag->parent ) {
 355              $count = count( get_ancestors( $tag->term_id, $taxonomy, 'taxonomy' ) );
 356              $level = 'level-' . $count;
 357          } else {
 358              $level = 'level-0';
 359          }
 360  
 361          echo '<tr id="tag-' . $tag->term_id . '" class="' . $level . '">';
 362          $this->single_row_columns( $tag );
 363          echo '</tr>';
 364      }
 365  
 366      /**
 367       * @since 5.9.0 Renamed `$tag` to `$item` to match parent class for PHP 8 named parameter support.
 368       *
 369       * @param WP_Term $item Term object.
 370       * @return string
 371       */
 372  	public function column_cb( $item ) {
 373          // Restores the more descriptive, specific name for use within this method.
 374          $tag = $item;
 375  
 376          if ( current_user_can( 'delete_term', $tag->term_id ) ) {
 377              return sprintf(
 378                  '<label class="screen-reader-text" for="cb-select-%1$s">%2$s</label>' .
 379                  '<input type="checkbox" name="delete_tags[]" value="%1$s" id="cb-select-%1$s" />',
 380                  $tag->term_id,
 381                  /* translators: %s: Taxonomy term name. */
 382                  sprintf( __( 'Select %s' ), $tag->name )
 383              );
 384          }
 385  
 386          return '&nbsp;';
 387      }
 388  
 389      /**
 390       * @param WP_Term $tag Term object.
 391       * @return string
 392       */
 393  	public function column_name( $tag ) {
 394          $taxonomy = $this->screen->taxonomy;
 395  
 396          $pad = str_repeat( '&#8212; ', max( 0, $this->level ) );
 397  
 398          /**
 399           * Filters display of the term name in the terms list table.
 400           *
 401           * The default output may include padding due to the term's
 402           * current level in the term hierarchy.
 403           *
 404           * @since 2.5.0
 405           *
 406           * @see WP_Terms_List_Table::column_name()
 407           *
 408           * @param string $pad_tag_name The term name, padded if not top-level.
 409           * @param WP_Term $tag         Term object.
 410           */
 411          $name = apply_filters( 'term_name', $pad . ' ' . $tag->name, $tag );
 412  
 413          $qe_data = get_term( $tag->term_id, $taxonomy, OBJECT, 'edit' );
 414  
 415          $uri = wp_doing_ajax() ? wp_get_referer() : $_SERVER['REQUEST_URI'];
 416  
 417          $edit_link = get_edit_term_link( $tag->term_id, $taxonomy, $this->screen->post_type );
 418  
 419          if ( $edit_link ) {
 420              $edit_link = add_query_arg(
 421                  'wp_http_referer',
 422                  urlencode( wp_unslash( $uri ) ),
 423                  $edit_link
 424              );
 425              $name      = sprintf(
 426                  '<a class="row-title" href="%s" aria-label="%s">%s</a>',
 427                  esc_url( $edit_link ),
 428                  /* translators: %s: Taxonomy term name. */
 429                  esc_attr( sprintf( __( '&#8220;%s&#8221; (Edit)' ), $tag->name ) ),
 430                  $name
 431              );
 432          }
 433  
 434          $out = sprintf(
 435              '<strong>%s</strong><br />',
 436              $name
 437          );
 438  
 439          $out .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">';
 440          $out .= '<div class="name">' . $qe_data->name . '</div>';
 441  
 442          /** This filter is documented in wp-admin/edit-tag-form.php */
 443          $out .= '<div class="slug">' . apply_filters( 'editable_slug', $qe_data->slug, $qe_data ) . '</div>';
 444          $out .= '<div class="parent">' . $qe_data->parent . '</div></div>';
 445  
 446          return $out;
 447      }
 448  
 449      /**
 450       * Gets the name of the default primary column.
 451       *
 452       * @since 4.3.0
 453       *
 454       * @return string Name of the default primary column, in this case, 'name'.
 455       */
 456  	protected function get_default_primary_column_name() {
 457          return 'name';
 458      }
 459  
 460      /**
 461       * Generates and displays row action links.
 462       *
 463       * @since 4.3.0
 464       * @since 5.9.0 Renamed `$tag` to `$item` to match parent class for PHP 8 named parameter support.
 465       *
 466       * @param WP_Term $item        Tag being acted upon.
 467       * @param string  $column_name Current column name.
 468       * @param string  $primary     Primary column name.
 469       * @return string Row actions output for terms, or an empty string
 470       *                if the current column is not the primary column.
 471       */
 472  	protected function handle_row_actions( $item, $column_name, $primary ) {
 473          if ( $primary !== $column_name ) {
 474              return '';
 475          }
 476  
 477          // Restores the more descriptive, specific name for use within this method.
 478          $tag      = $item;
 479          $taxonomy = $this->screen->taxonomy;
 480          $tax      = get_taxonomy( $taxonomy );
 481          $uri      = wp_doing_ajax() ? wp_get_referer() : $_SERVER['REQUEST_URI'];
 482  
 483          $edit_link = add_query_arg(
 484              'wp_http_referer',
 485              urlencode( wp_unslash( $uri ) ),
 486              get_edit_term_link( $tag->term_id, $taxonomy, $this->screen->post_type )
 487          );
 488  
 489          $actions = array();
 490  
 491          if ( current_user_can( 'edit_term', $tag->term_id ) ) {
 492              $actions['edit'] = sprintf(
 493                  '<a href="%s" aria-label="%s">%s</a>',
 494                  esc_url( $edit_link ),
 495                  /* translators: %s: Taxonomy term name. */
 496                  esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $tag->name ) ),
 497                  __( 'Edit' )
 498              );
 499              $actions['inline hide-if-no-js'] = sprintf(
 500                  '<button type="button" class="button-link editinline" aria-label="%s" aria-expanded="false">%s</button>',
 501                  /* translators: %s: Taxonomy term name. */
 502                  esc_attr( sprintf( __( 'Quick edit &#8220;%s&#8221; inline' ), $tag->name ) ),
 503                  __( 'Quick&nbsp;Edit' )
 504              );
 505          }
 506  
 507          if ( current_user_can( 'delete_term', $tag->term_id ) ) {
 508              $actions['delete'] = sprintf(
 509                  '<a href="%s" class="delete-tag aria-button-if-js" aria-label="%s">%s</a>',
 510                  wp_nonce_url( "edit-tags.php?action=delete&amp;taxonomy=$taxonomy&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id ),
 511                  /* translators: %s: Taxonomy term name. */
 512                  esc_attr( sprintf( __( 'Delete &#8220;%s&#8221;' ), $tag->name ) ),
 513                  __( 'Delete' )
 514              );
 515          }
 516  
 517          if ( is_taxonomy_viewable( $tax ) ) {
 518              $actions['view'] = sprintf(
 519                  '<a href="%s" aria-label="%s">%s</a>',
 520                  get_term_link( $tag ),
 521                  /* translators: %s: Taxonomy term name. */
 522                  esc_attr( sprintf( __( 'View &#8220;%s&#8221; archive' ), $tag->name ) ),
 523                  __( 'View' )
 524              );
 525          }
 526  
 527          /**
 528           * Filters the action links displayed for each term in the Tags list table.
 529           *
 530           * @since 2.8.0
 531           * @since 3.0.0 Deprecated in favor of {@see '{$taxonomy}_row_actions'} filter.
 532           * @since 5.4.2 Restored (un-deprecated).
 533           *
 534           * @param string[] $actions An array of action links to be displayed. Default
 535           *                          'Edit', 'Quick Edit', 'Delete', and 'View'.
 536           * @param WP_Term  $tag     Term object.
 537           */
 538          $actions = apply_filters( 'tag_row_actions', $actions, $tag );
 539  
 540          /**
 541           * Filters the action links displayed for each term in the terms list table.
 542           *
 543           * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
 544           *
 545           * Possible hook names include:
 546           *
 547           *  - `category_row_actions`
 548           *  - `post_tag_row_actions`
 549           *
 550           * @since 3.0.0
 551           *
 552           * @param string[] $actions An array of action links to be displayed. Default
 553           *                          'Edit', 'Quick Edit', 'Delete', and 'View'.
 554           * @param WP_Term  $tag     Term object.
 555           */
 556          $actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag );
 557  
 558          return $this->row_actions( $actions );
 559      }
 560  
 561      /**
 562       * @param WP_Term $tag Term object.
 563       * @return string
 564       */
 565  	public function column_description( $tag ) {
 566          if ( $tag->description ) {
 567              return $tag->description;
 568          } else {
 569              return '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . __( 'No description' ) . '</span>';
 570          }
 571      }
 572  
 573      /**
 574       * @param WP_Term $tag Term object.
 575       * @return string
 576       */
 577  	public function column_slug( $tag ) {
 578          /** This filter is documented in wp-admin/edit-tag-form.php */
 579          return apply_filters( 'editable_slug', $tag->slug, $tag );
 580      }
 581  
 582      /**
 583       * @param WP_Term $tag Term object.
 584       * @return string
 585       */
 586  	public function column_posts( $tag ) {
 587          $count = number_format_i18n( $tag->count );
 588  
 589          $tax = get_taxonomy( $this->screen->taxonomy );
 590  
 591          $ptype_object = get_post_type_object( $this->screen->post_type );
 592          if ( ! $ptype_object->show_ui ) {
 593              return $count;
 594          }
 595  
 596          if ( $tax->query_var ) {
 597              $args = array( $tax->query_var => $tag->slug );
 598          } else {
 599              $args = array(
 600                  'taxonomy' => $tax->name,
 601                  'term'     => $tag->slug,
 602              );
 603          }
 604  
 605          if ( 'post' !== $this->screen->post_type ) {
 606              $args['post_type'] = $this->screen->post_type;
 607          }
 608  
 609          if ( 'attachment' === $this->screen->post_type ) {
 610              return "<a href='" . esc_url( add_query_arg( $args, 'upload.php' ) ) . "'>$count</a>";
 611          }
 612  
 613          return "<a href='" . esc_url( add_query_arg( $args, 'edit.php' ) ) . "'>$count</a>";
 614      }
 615  
 616      /**
 617       * @param WP_Term $tag Term object.
 618       * @return string
 619       */
 620  	public function column_links( $tag ) {
 621          $count = number_format_i18n( $tag->count );
 622  
 623          if ( $count ) {
 624              $count = "<a href='link-manager.php?cat_id=$tag->term_id'>$count</a>";
 625          }
 626  
 627          return $count;
 628      }
 629  
 630      /**
 631       * @since 5.9.0 Renamed `$tag` to `$item` to match parent class for PHP 8 named parameter support.
 632       *
 633       * @param WP_Term $item        Term object.
 634       * @param string  $column_name Name of the column.
 635       * @return string
 636       */
 637  	public function column_default( $item, $column_name ) {
 638          /**
 639           * Filters the displayed columns in the terms list table.
 640           *
 641           * The dynamic portion of the hook name, `$this->screen->taxonomy`,
 642           * refers to the slug of the current taxonomy.
 643           *
 644           * Possible hook names include:
 645           *
 646           *  - `manage_category_custom_column`
 647           *  - `manage_post_tag_custom_column`
 648           *
 649           * @since 2.8.0
 650           *
 651           * @param string $string      Custom column output. Default empty.
 652           * @param string $column_name Name of the column.
 653           * @param int    $term_id     Term ID.
 654           */
 655          return apply_filters( "manage_{$this->screen->taxonomy}_custom_column", '', $column_name, $item->term_id );
 656      }
 657  
 658      /**
 659       * Outputs the hidden row displayed when inline editing
 660       *
 661       * @since 3.1.0
 662       */
 663  	public function inline_edit() {
 664          $tax = get_taxonomy( $this->screen->taxonomy );
 665  
 666          if ( ! current_user_can( $tax->cap->edit_terms ) ) {
 667              return;
 668          }
 669          ?>
 670  
 671          <form method="get">
 672          <table style="display: none"><tbody id="inlineedit">
 673  
 674              <tr id="inline-edit" class="inline-edit-row" style="display: none">
 675              <td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
 676  
 677              <fieldset>
 678                  <legend class="inline-edit-legend"><?php _e( 'Quick Edit' ); ?></legend>
 679                  <div class="inline-edit-col">
 680                  <label>
 681                      <span class="title"><?php _ex( 'Name', 'term name' ); ?></span>
 682                      <span class="input-text-wrap"><input type="text" name="name" class="ptitle" value="" /></span>
 683                  </label>
 684  
 685                  <?php if ( ! global_terms_enabled() ) : ?>
 686                      <label>
 687                          <span class="title"><?php _e( 'Slug' ); ?></span>
 688                          <span class="input-text-wrap"><input type="text" name="slug" class="ptitle" value="" /></span>
 689                      </label>
 690                  <?php endif; ?>
 691                  </div>
 692              </fieldset>
 693  
 694              <?php
 695              $core_columns = array(
 696                  'cb'          => true,
 697                  'description' => true,
 698                  'name'        => true,
 699                  'slug'        => true,
 700                  'posts'       => true,
 701              );
 702  
 703              list( $columns ) = $this->get_column_info();
 704  
 705              foreach ( $columns as $column_name => $column_display_name ) {
 706                  if ( isset( $core_columns[ $column_name ] ) ) {
 707                      continue;
 708                  }
 709  
 710                  /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
 711                  do_action( 'quick_edit_custom_box', $column_name, 'edit-tags', $this->screen->taxonomy );
 712              }
 713              ?>
 714  
 715              <div class="inline-edit-save submit">
 716                  <button type="button" class="cancel button alignleft"><?php _e( 'Cancel' ); ?></button>
 717                  <button type="button" class="save button button-primary alignright"><?php echo $tax->labels->update_item; ?></button>
 718                  <span class="spinner"></span>
 719  
 720                  <?php wp_nonce_field( 'taxinlineeditnonce', '_inline_edit', false ); ?>
 721                  <input type="hidden" name="taxonomy" value="<?php echo esc_attr( $this->screen->taxonomy ); ?>" />
 722                  <input type="hidden" name="post_type" value="<?php echo esc_attr( $this->screen->post_type ); ?>" />
 723                  <br class="clear" />
 724  
 725                  <div class="notice notice-error notice-alt inline hidden">
 726                      <p class="error"></p>
 727                  </div>
 728              </div>
 729  
 730              </td></tr>
 731  
 732          </tbody></table>
 733          </form>
 734          <?php
 735      }
 736  }


Generated: Tue Sep 21 01:00:05 2021 Cross-referenced by PHPXref 0.7.1