[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

   1  <?php
   2  /**
   3   * List Table API: WP_Posts_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 posts in a list table.
  12   *
  13   * @since 3.1.0
  14   * @access private
  15   *
  16   * @see WP_List_Table
  17   */
  18  class WP_Posts_List_Table extends WP_List_Table {
  19  
  20      /**
  21       * Whether the items should be displayed hierarchically or linearly.
  22       *
  23       * @since 3.1.0
  24       * @var bool
  25       */
  26      protected $hierarchical_display;
  27  
  28      /**
  29       * Holds the number of pending comments for each post.
  30       *
  31       * @since 3.1.0
  32       * @var array
  33       */
  34      protected $comment_pending_count;
  35  
  36      /**
  37       * Holds the number of posts for this user.
  38       *
  39       * @since 3.1.0
  40       * @var int
  41       */
  42      private $user_posts_count;
  43  
  44      /**
  45       * Holds the number of posts which are sticky.
  46       *
  47       * @since 3.1.0
  48       * @var int
  49       */
  50      private $sticky_posts_count = 0;
  51  
  52      private $is_trash;
  53  
  54      /**
  55       * Current level for output.
  56       *
  57       * @since 4.3.0
  58       * @var int
  59       */
  60      protected $current_level = 0;
  61  
  62      /**
  63       * Constructor.
  64       *
  65       * @since 3.1.0
  66       *
  67       * @see WP_List_Table::__construct() for more information on default arguments.
  68       *
  69       * @global WP_Post_Type $post_type_object
  70       * @global wpdb         $wpdb             WordPress database abstraction object.
  71       *
  72       * @param array $args An associative array of arguments.
  73       */
  74  	public function __construct( $args = array() ) {
  75          global $post_type_object, $wpdb;
  76  
  77          parent::__construct(
  78              array(
  79                  'plural' => 'posts',
  80                  'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
  81              )
  82          );
  83  
  84          $post_type        = $this->screen->post_type;
  85          $post_type_object = get_post_type_object( $post_type );
  86  
  87          $exclude_states         = get_post_stati(
  88              array(
  89                  'show_in_admin_all_list' => false,
  90              )
  91          );
  92          $this->user_posts_count = (int) $wpdb->get_var(
  93              $wpdb->prepare(
  94                  "
  95              SELECT COUNT( 1 )
  96              FROM $wpdb->posts
  97              WHERE post_type = %s
  98              AND post_status NOT IN ( '" . implode( "','", $exclude_states ) . "' )
  99              AND post_author = %d
 100          ",
 101                  $post_type,
 102                  get_current_user_id()
 103              )
 104          );
 105  
 106          if ( $this->user_posts_count && ! current_user_can( $post_type_object->cap->edit_others_posts ) && empty( $_REQUEST['post_status'] ) && empty( $_REQUEST['all_posts'] ) && empty( $_REQUEST['author'] ) && empty( $_REQUEST['show_sticky'] ) ) {
 107              $_GET['author'] = get_current_user_id();
 108          }
 109  
 110          $sticky_posts = get_option( 'sticky_posts' );
 111          if ( 'post' === $post_type && $sticky_posts ) {
 112              $sticky_posts             = implode( ', ', array_map( 'absint', (array) $sticky_posts ) );
 113              $this->sticky_posts_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT( 1 ) FROM $wpdb->posts WHERE post_type = %s AND post_status NOT IN ('trash', 'auto-draft') AND ID IN ($sticky_posts)", $post_type ) );
 114          }
 115      }
 116  
 117      /**
 118       * Sets whether the table layout should be hierarchical or not.
 119       *
 120       * @since 4.2.0
 121       *
 122       * @param bool $display Whether the table layout should be hierarchical.
 123       */
 124  	public function set_hierarchical_display( $display ) {
 125          $this->hierarchical_display = $display;
 126      }
 127  
 128      /**
 129       * @return bool
 130       */
 131  	public function ajax_user_can() {
 132          return current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_posts );
 133      }
 134  
 135      /**
 136       * @global string   $mode             List table view mode.
 137       * @global array    $avail_post_stati
 138       * @global WP_Query $wp_query         WordPress Query object.
 139       * @global int      $per_page
 140       */
 141  	public function prepare_items() {
 142          global $mode, $avail_post_stati, $wp_query, $per_page;
 143  
 144          if ( ! empty( $_REQUEST['mode'] ) ) {
 145              $mode = 'excerpt' === $_REQUEST['mode'] ? 'excerpt' : 'list';
 146              set_user_setting( 'posts_list_mode', $mode );
 147          } else {
 148              $mode = get_user_setting( 'posts_list_mode', 'list' );
 149          }
 150  
 151          // Is going to call wp().
 152          $avail_post_stati = wp_edit_posts_query();
 153  
 154          $this->set_hierarchical_display( is_post_type_hierarchical( $this->screen->post_type ) && 'menu_order title' === $wp_query->query['orderby'] );
 155  
 156          $post_type = $this->screen->post_type;
 157          $per_page  = $this->get_items_per_page( 'edit_' . $post_type . '_per_page' );
 158  
 159          /** This filter is documented in wp-admin/includes/post.php */
 160          $per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type );
 161  
 162          if ( $this->hierarchical_display ) {
 163              $total_items = $wp_query->post_count;
 164          } elseif ( $wp_query->found_posts || $this->get_pagenum() === 1 ) {
 165              $total_items = $wp_query->found_posts;
 166          } else {
 167              $post_counts = (array) wp_count_posts( $post_type, 'readable' );
 168  
 169              if ( isset( $_REQUEST['post_status'] ) && in_array( $_REQUEST['post_status'], $avail_post_stati, true ) ) {
 170                  $total_items = $post_counts[ $_REQUEST['post_status'] ];
 171              } elseif ( isset( $_REQUEST['show_sticky'] ) && $_REQUEST['show_sticky'] ) {
 172                  $total_items = $this->sticky_posts_count;
 173              } elseif ( isset( $_GET['author'] ) && get_current_user_id() == $_GET['author'] ) {
 174                  $total_items = $this->user_posts_count;
 175              } else {
 176                  $total_items = array_sum( $post_counts );
 177  
 178                  // Subtract post types that are not included in the admin all list.
 179                  foreach ( get_post_stati( array( 'show_in_admin_all_list' => false ) ) as $state ) {
 180                      $total_items -= $post_counts[ $state ];
 181                  }
 182              }
 183          }
 184  
 185          $this->is_trash = isset( $_REQUEST['post_status'] ) && 'trash' === $_REQUEST['post_status'];
 186  
 187          $this->set_pagination_args(
 188              array(
 189                  'total_items' => $total_items,
 190                  'per_page'    => $per_page,
 191              )
 192          );
 193      }
 194  
 195      /**
 196       * @return bool
 197       */
 198  	public function has_items() {
 199          return have_posts();
 200      }
 201  
 202      /**
 203       */
 204  	public function no_items() {
 205          if ( isset( $_REQUEST['post_status'] ) && 'trash' === $_REQUEST['post_status'] ) {
 206              echo get_post_type_object( $this->screen->post_type )->labels->not_found_in_trash;
 207          } else {
 208              echo get_post_type_object( $this->screen->post_type )->labels->not_found;
 209          }
 210      }
 211  
 212      /**
 213       * Determine if the current view is the "All" view.
 214       *
 215       * @since 4.2.0
 216       *
 217       * @return bool Whether the current view is the "All" view.
 218       */
 219  	protected function is_base_request() {
 220          $vars = $_GET;
 221          unset( $vars['paged'] );
 222  
 223          if ( empty( $vars ) ) {
 224              return true;
 225          } elseif ( 1 === count( $vars ) && ! empty( $vars['post_type'] ) ) {
 226              return $this->screen->post_type === $vars['post_type'];
 227          }
 228  
 229          return 1 === count( $vars ) && ! empty( $vars['mode'] );
 230      }
 231  
 232      /**
 233       * Helper to create links to edit.php with params.
 234       *
 235       * @since 4.4.0
 236       *
 237       * @param string[] $args  Associative array of URL parameters for the link.
 238       * @param string   $label Link text.
 239       * @param string   $class Optional. Class attribute. Default empty string.
 240       * @return string The formatted link string.
 241       */
 242  	protected function get_edit_link( $args, $label, $class = '' ) {
 243          $url = add_query_arg( $args, 'edit.php' );
 244  
 245          $class_html   = '';
 246          $aria_current = '';
 247          if ( ! empty( $class ) ) {
 248              $class_html = sprintf(
 249                  ' class="%s"',
 250                  esc_attr( $class )
 251              );
 252  
 253              if ( 'current' === $class ) {
 254                  $aria_current = ' aria-current="page"';
 255              }
 256          }
 257  
 258          return sprintf(
 259              '<a href="%s"%s%s>%s</a>',
 260              esc_url( $url ),
 261              $class_html,
 262              $aria_current,
 263              $label
 264          );
 265      }
 266  
 267      /**
 268       * @global array $locked_post_status This seems to be deprecated.
 269       * @global array $avail_post_stati
 270       * @return array
 271       */
 272  	protected function get_views() {
 273          global $locked_post_status, $avail_post_stati;
 274  
 275          $post_type = $this->screen->post_type;
 276  
 277          if ( ! empty( $locked_post_status ) ) {
 278              return array();
 279          }
 280  
 281          $status_links = array();
 282          $num_posts    = wp_count_posts( $post_type, 'readable' );
 283          $total_posts  = array_sum( (array) $num_posts );
 284          $class        = '';
 285  
 286          $current_user_id = get_current_user_id();
 287          $all_args        = array( 'post_type' => $post_type );
 288          $mine            = '';
 289  
 290          // Subtract post types that are not included in the admin all list.
 291          foreach ( get_post_stati( array( 'show_in_admin_all_list' => false ) ) as $state ) {
 292              $total_posts -= $num_posts->$state;
 293          }
 294  
 295          if ( $this->user_posts_count && $this->user_posts_count !== $total_posts ) {
 296              if ( isset( $_GET['author'] ) && ( $_GET['author'] == $current_user_id ) ) {
 297                  $class = 'current';
 298              }
 299  
 300              $mine_args = array(
 301                  'post_type' => $post_type,
 302                  'author'    => $current_user_id,
 303              );
 304  
 305              $mine_inner_html = sprintf(
 306                  /* translators: %s: Number of posts. */
 307                  _nx(
 308                      'Mine <span class="count">(%s)</span>',
 309                      'Mine <span class="count">(%s)</span>',
 310                      $this->user_posts_count,
 311                      'posts'
 312                  ),
 313                  number_format_i18n( $this->user_posts_count )
 314              );
 315  
 316              $mine = $this->get_edit_link( $mine_args, $mine_inner_html, $class );
 317  
 318              $all_args['all_posts'] = 1;
 319              $class                 = '';
 320          }
 321  
 322          if ( empty( $class ) && ( $this->is_base_request() || isset( $_REQUEST['all_posts'] ) ) ) {
 323              $class = 'current';
 324          }
 325  
 326          $all_inner_html = sprintf(
 327              /* translators: %s: Number of posts. */
 328              _nx(
 329                  'All <span class="count">(%s)</span>',
 330                  'All <span class="count">(%s)</span>',
 331                  $total_posts,
 332                  'posts'
 333              ),
 334              number_format_i18n( $total_posts )
 335          );
 336  
 337          $status_links['all'] = $this->get_edit_link( $all_args, $all_inner_html, $class );
 338          if ( $mine ) {
 339              $status_links['mine'] = $mine;
 340          }
 341  
 342          foreach ( get_post_stati( array( 'show_in_admin_status_list' => true ), 'objects' ) as $status ) {
 343              $class = '';
 344  
 345              $status_name = $status->name;
 346  
 347              if ( ! in_array( $status_name, $avail_post_stati, true ) || empty( $num_posts->$status_name ) ) {
 348                  continue;
 349              }
 350  
 351              if ( isset( $_REQUEST['post_status'] ) && $status_name === $_REQUEST['post_status'] ) {
 352                  $class = 'current';
 353              }
 354  
 355              $status_args = array(
 356                  'post_status' => $status_name,
 357                  'post_type'   => $post_type,
 358              );
 359  
 360              $status_label = sprintf(
 361                  translate_nooped_plural( $status->label_count, $num_posts->$status_name ),
 362                  number_format_i18n( $num_posts->$status_name )
 363              );
 364  
 365              $status_links[ $status_name ] = $this->get_edit_link( $status_args, $status_label, $class );
 366          }
 367  
 368          if ( ! empty( $this->sticky_posts_count ) ) {
 369              $class = ! empty( $_REQUEST['show_sticky'] ) ? 'current' : '';
 370  
 371              $sticky_args = array(
 372                  'post_type'   => $post_type,
 373                  'show_sticky' => 1,
 374              );
 375  
 376              $sticky_inner_html = sprintf(
 377                  /* translators: %s: Number of posts. */
 378                  _nx(
 379                      'Sticky <span class="count">(%s)</span>',
 380                      'Sticky <span class="count">(%s)</span>',
 381                      $this->sticky_posts_count,
 382                      'posts'
 383                  ),
 384                  number_format_i18n( $this->sticky_posts_count )
 385              );
 386  
 387              $sticky_link = array(
 388                  'sticky' => $this->get_edit_link( $sticky_args, $sticky_inner_html, $class ),
 389              );
 390  
 391              // Sticky comes after Publish, or if not listed, after All.
 392              $split        = 1 + array_search( ( isset( $status_links['publish'] ) ? 'publish' : 'all' ), array_keys( $status_links ), true );
 393              $status_links = array_merge( array_slice( $status_links, 0, $split ), $sticky_link, array_slice( $status_links, $split ) );
 394          }
 395  
 396          return $status_links;
 397      }
 398  
 399      /**
 400       * @return array
 401       */
 402  	protected function get_bulk_actions() {
 403          $actions       = array();
 404          $post_type_obj = get_post_type_object( $this->screen->post_type );
 405  
 406          if ( current_user_can( $post_type_obj->cap->edit_posts ) ) {
 407              if ( $this->is_trash ) {
 408                  $actions['untrash'] = __( 'Restore' );
 409              } else {
 410                  $actions['edit'] = __( 'Edit' );
 411              }
 412          }
 413  
 414          if ( current_user_can( $post_type_obj->cap->delete_posts ) ) {
 415              if ( $this->is_trash || ! EMPTY_TRASH_DAYS ) {
 416                  $actions['delete'] = __( 'Delete permanently' );
 417              } else {
 418                  $actions['trash'] = __( 'Move to Trash' );
 419              }
 420          }
 421  
 422          return $actions;
 423      }
 424  
 425      /**
 426       * Displays a categories drop-down for filtering on the Posts list table.
 427       *
 428       * @since 4.6.0
 429       *
 430       * @global int $cat Currently selected category.
 431       *
 432       * @param string $post_type Post type slug.
 433       */
 434  	protected function categories_dropdown( $post_type ) {
 435          global $cat;
 436  
 437          /**
 438           * Filters whether to remove the 'Categories' drop-down from the post list table.
 439           *
 440           * @since 4.6.0
 441           *
 442           * @param bool   $disable   Whether to disable the categories drop-down. Default false.
 443           * @param string $post_type Post type slug.
 444           */
 445          if ( false !== apply_filters( 'disable_categories_dropdown', false, $post_type ) ) {
 446              return;
 447          }
 448  
 449          if ( is_object_in_taxonomy( $post_type, 'category' ) ) {
 450              $dropdown_options = array(
 451                  'show_option_all' => get_taxonomy( 'category' )->labels->all_items,
 452                  'hide_empty'      => 0,
 453                  'hierarchical'    => 1,
 454                  'show_count'      => 0,
 455                  'orderby'         => 'name',
 456                  'selected'        => $cat,
 457              );
 458  
 459              echo '<label class="screen-reader-text" for="cat">' . get_taxonomy( 'category' )->labels->filter_by_item . '</label>';
 460  
 461              wp_dropdown_categories( $dropdown_options );
 462          }
 463      }
 464  
 465      /**
 466       * Displays a formats drop-down for filtering items.
 467       *
 468       * @since 5.2.0
 469       * @access protected
 470       *
 471       * @param string $post_type Post type slug.
 472       */
 473  	protected function formats_dropdown( $post_type ) {
 474          /**
 475           * Filters whether to remove the 'Formats' drop-down from the post list table.
 476           *
 477           * @since 5.2.0
 478           * @since 5.5.0 The `$post_type` parameter was added.
 479           *
 480           * @param bool   $disable   Whether to disable the drop-down. Default false.
 481           * @param string $post_type Post type slug.
 482           */
 483          if ( apply_filters( 'disable_formats_dropdown', false, $post_type ) ) {
 484              return;
 485          }
 486  
 487          // Return if the post type doesn't have post formats or if we're in the Trash.
 488          if ( ! is_object_in_taxonomy( $post_type, 'post_format' ) || $this->is_trash ) {
 489              return;
 490          }
 491  
 492          // Make sure the dropdown shows only formats with a post count greater than 0.
 493          $used_post_formats = get_terms(
 494              array(
 495                  'taxonomy'   => 'post_format',
 496                  'hide_empty' => true,
 497              )
 498          );
 499  
 500          // Return if there are no posts using formats.
 501          if ( ! $used_post_formats ) {
 502              return;
 503          }
 504  
 505          $displayed_post_format = isset( $_GET['post_format'] ) ? $_GET['post_format'] : '';
 506          ?>
 507          <label for="filter-by-format" class="screen-reader-text"><?php _e( 'Filter by post format' ); ?></label>
 508          <select name="post_format" id="filter-by-format">
 509              <option<?php selected( $displayed_post_format, '' ); ?> value=""><?php _e( 'All formats' ); ?></option>
 510              <?php
 511              foreach ( $used_post_formats as $used_post_format ) {
 512                  // Post format slug.
 513                  $slug = str_replace( 'post-format-', '', $used_post_format->slug );
 514                  // Pretty, translated version of the post format slug.
 515                  $pretty_name = get_post_format_string( $slug );
 516                  // Skip the standard post format.
 517                  if ( 'standard' === $slug ) {
 518                      continue;
 519                  }
 520                  ?>
 521                  <option<?php selected( $displayed_post_format, $slug ); ?> value="<?php echo esc_attr( $slug ); ?>"><?php echo esc_html( $pretty_name ); ?></option>
 522                  <?php
 523              }
 524              ?>
 525          </select>
 526          <?php
 527      }
 528  
 529      /**
 530       * @param string $which
 531       */
 532  	protected function extra_tablenav( $which ) {
 533          ?>
 534          <div class="alignleft actions">
 535          <?php
 536          if ( 'top' === $which ) {
 537              ob_start();
 538  
 539              $this->months_dropdown( $this->screen->post_type );
 540              $this->categories_dropdown( $this->screen->post_type );
 541              $this->formats_dropdown( $this->screen->post_type );
 542  
 543              /**
 544               * Fires before the Filter button on the Posts and Pages list tables.
 545               *
 546               * The Filter button allows sorting by date and/or category on the
 547               * Posts list table, and sorting by date on the Pages list table.
 548               *
 549               * @since 2.1.0
 550               * @since 4.4.0 The `$post_type` parameter was added.
 551               * @since 4.6.0 The `$which` parameter was added.
 552               *
 553               * @param string $post_type The post type slug.
 554               * @param string $which     The location of the extra table nav markup:
 555               *                          'top' or 'bottom' for WP_Posts_List_Table,
 556               *                          'bar' for WP_Media_List_Table.
 557               */
 558              do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
 559  
 560              $output = ob_get_clean();
 561  
 562              if ( ! empty( $output ) ) {
 563                  echo $output;
 564                  submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
 565              }
 566          }
 567  
 568          if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) && $this->has_items() ) {
 569              submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
 570          }
 571          ?>
 572          </div>
 573          <?php
 574          /**
 575           * Fires immediately following the closing "actions" div in the tablenav for the posts
 576           * list table.
 577           *
 578           * @since 4.4.0
 579           *
 580           * @param string $which The location of the extra table nav markup: 'top' or 'bottom'.
 581           */
 582          do_action( 'manage_posts_extra_tablenav', $which );
 583      }
 584  
 585      /**
 586       * @return string
 587       */
 588  	public function current_action() {
 589          if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) {
 590              return 'delete_all';
 591          }
 592  
 593          return parent::current_action();
 594      }
 595  
 596      /**
 597       * @global string $mode List table view mode.
 598       *
 599       * @return array
 600       */
 601  	protected function get_table_classes() {
 602          global $mode;
 603  
 604          $mode_class = esc_attr( 'table-view-' . $mode );
 605  
 606          return array( 'widefat', 'fixed', 'striped', $mode_class, is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts' );
 607      }
 608  
 609      /**
 610       * @return array
 611       */
 612  	public function get_columns() {
 613          $post_type = $this->screen->post_type;
 614  
 615          $posts_columns = array();
 616  
 617          $posts_columns['cb'] = '<input type="checkbox" />';
 618  
 619          /* translators: Posts screen column name. */
 620          $posts_columns['title'] = _x( 'Title', 'column name' );
 621  
 622          if ( post_type_supports( $post_type, 'author' ) ) {
 623              $posts_columns['author'] = __( 'Author' );
 624          }
 625  
 626          $taxonomies = get_object_taxonomies( $post_type, 'objects' );
 627          $taxonomies = wp_filter_object_list( $taxonomies, array( 'show_admin_column' => true ), 'and', 'name' );
 628  
 629          /**
 630           * Filters the taxonomy columns in the Posts list table.
 631           *
 632           * The dynamic portion of the hook name, `$post_type`, refers to the post
 633           * type slug.
 634           *
 635           * @since 3.5.0
 636           *
 637           * @param string[] $taxonomies Array of taxonomy names to show columns for.
 638           * @param string   $post_type  The post type.
 639           */
 640          $taxonomies = apply_filters( "manage_taxonomies_for_{$post_type}_columns", $taxonomies, $post_type );
 641          $taxonomies = array_filter( $taxonomies, 'taxonomy_exists' );
 642  
 643          foreach ( $taxonomies as $taxonomy ) {
 644              if ( 'category' === $taxonomy ) {
 645                  $column_key = 'categories';
 646              } elseif ( 'post_tag' === $taxonomy ) {
 647                  $column_key = 'tags';
 648              } else {
 649                  $column_key = 'taxonomy-' . $taxonomy;
 650              }
 651  
 652              $posts_columns[ $column_key ] = get_taxonomy( $taxonomy )->labels->name;
 653          }
 654  
 655          $post_status = ! empty( $_REQUEST['post_status'] ) ? $_REQUEST['post_status'] : 'all';
 656          if ( post_type_supports( $post_type, 'comments' ) && ! in_array( $post_status, array( 'pending', 'draft', 'future' ), true ) ) {
 657              $posts_columns['comments'] = '<span class="vers comment-grey-bubble" title="' . esc_attr__( 'Comments' ) . '"><span class="screen-reader-text">' . __( 'Comments' ) . '</span></span>';
 658          }
 659  
 660          $posts_columns['date'] = __( 'Date' );
 661  
 662          if ( 'page' === $post_type ) {
 663  
 664              /**
 665               * Filters the columns displayed in the Pages list table.
 666               *
 667               * @since 2.5.0
 668               *
 669               * @param string[] $post_columns An associative array of column headings.
 670               */
 671              $posts_columns = apply_filters( 'manage_pages_columns', $posts_columns );
 672          } else {
 673  
 674              /**
 675               * Filters the columns displayed in the Posts list table.
 676               *
 677               * @since 1.5.0
 678               *
 679               * @param string[] $post_columns An associative array of column headings.
 680               * @param string   $post_type    The post type slug.
 681               */
 682              $posts_columns = apply_filters( 'manage_posts_columns', $posts_columns, $post_type );
 683          }
 684  
 685          /**
 686           * Filters the columns displayed in the Posts list table for a specific post type.
 687           *
 688           * The dynamic portion of the hook name, `$post_type`, refers to the post type slug.
 689           *
 690           * @since 3.0.0
 691           *
 692           * @param string[] $post_columns An associative array of column headings.
 693           */
 694          return apply_filters( "manage_{$post_type}_posts_columns", $posts_columns );
 695      }
 696  
 697      /**
 698       * @return array
 699       */
 700  	protected function get_sortable_columns() {
 701          return array(
 702              'title'    => 'title',
 703              'parent'   => 'parent',
 704              'comments' => 'comment_count',
 705              'date'     => array( 'date', true ),
 706          );
 707      }
 708  
 709      /**
 710       * @global WP_Query $wp_query WordPress Query object.
 711       * @global int $per_page
 712       * @param array $posts
 713       * @param int   $level
 714       */
 715  	public function display_rows( $posts = array(), $level = 0 ) {
 716          global $wp_query, $per_page;
 717  
 718          if ( empty( $posts ) ) {
 719              $posts = $wp_query->posts;
 720          }
 721  
 722          add_filter( 'the_title', 'esc_html' );
 723  
 724          if ( $this->hierarchical_display ) {
 725              $this->_display_rows_hierarchical( $posts, $this->get_pagenum(), $per_page );
 726          } else {
 727              $this->_display_rows( $posts, $level );
 728          }
 729      }
 730  
 731      /**
 732       * @param array $posts
 733       * @param int   $level
 734       */
 735  	private function _display_rows( $posts, $level = 0 ) {
 736          $post_type = $this->screen->post_type;
 737  
 738          // Create array of post IDs.
 739          $post_ids = array();
 740  
 741          foreach ( $posts as $a_post ) {
 742              $post_ids[] = $a_post->ID;
 743          }
 744  
 745          if ( post_type_supports( $post_type, 'comments' ) ) {
 746              $this->comment_pending_count = get_pending_comments_num( $post_ids );
 747          }
 748  
 749          foreach ( $posts as $post ) {
 750              $this->single_row( $post, $level );
 751          }
 752      }
 753  
 754      /**
 755       * @global wpdb    $wpdb WordPress database abstraction object.
 756       * @global WP_Post $post Global post object.
 757       * @param array $pages
 758       * @param int   $pagenum
 759       * @param int   $per_page
 760       */
 761  	private function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 20 ) {
 762          global $wpdb;
 763  
 764          $level = 0;
 765  
 766          if ( ! $pages ) {
 767              $pages = get_pages( array( 'sort_column' => 'menu_order' ) );
 768  
 769              if ( ! $pages ) {
 770                  return;
 771              }
 772          }
 773  
 774          /*
 775           * Arrange pages into two parts: top level pages and children_pages
 776           * children_pages is two dimensional array, eg.
 777           * children_pages[10][] contains all sub-pages whose parent is 10.
 778           * It only takes O( N ) to arrange this and it takes O( 1 ) for subsequent lookup operations
 779           * If searching, ignore hierarchy and treat everything as top level
 780           */
 781          if ( empty( $_REQUEST['s'] ) ) {
 782  
 783              $top_level_pages = array();
 784              $children_pages  = array();
 785  
 786              foreach ( $pages as $page ) {
 787  
 788                  // Catch and repair bad pages.
 789                  if ( $page->post_parent == $page->ID ) {
 790                      $page->post_parent = 0;
 791                      $wpdb->update( $wpdb->posts, array( 'post_parent' => 0 ), array( 'ID' => $page->ID ) );
 792                      clean_post_cache( $page );
 793                  }
 794  
 795                  if ( 0 == $page->post_parent ) {
 796                      $top_level_pages[] = $page;
 797                  } else {
 798                      $children_pages[ $page->post_parent ][] = $page;
 799                  }
 800              }
 801  
 802              $pages = &$top_level_pages;
 803          }
 804  
 805          $count      = 0;
 806          $start      = ( $pagenum - 1 ) * $per_page;
 807          $end        = $start + $per_page;
 808          $to_display = array();
 809  
 810          foreach ( $pages as $page ) {
 811              if ( $count >= $end ) {
 812                  break;
 813              }
 814  
 815              if ( $count >= $start ) {
 816                  $to_display[ $page->ID ] = $level;
 817              }
 818  
 819              $count++;
 820  
 821              if ( isset( $children_pages ) ) {
 822                  $this->_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page, $to_display );
 823              }
 824          }
 825  
 826          // If it is the last pagenum and there are orphaned pages, display them with paging as well.
 827          if ( isset( $children_pages ) && $count < $end ) {
 828              foreach ( $children_pages as $orphans ) {
 829                  foreach ( $orphans as $op ) {
 830                      if ( $count >= $end ) {
 831                          break;
 832                      }
 833  
 834                      if ( $count >= $start ) {
 835                          $to_display[ $op->ID ] = 0;
 836                      }
 837  
 838                      $count++;
 839                  }
 840              }
 841          }
 842  
 843          $ids = array_keys( $to_display );
 844          _prime_post_caches( $ids );
 845  
 846          if ( ! isset( $GLOBALS['post'] ) ) {
 847              $GLOBALS['post'] = reset( $ids );
 848          }
 849  
 850          foreach ( $to_display as $page_id => $level ) {
 851              echo "\t";
 852              $this->single_row( $page_id, $level );
 853          }
 854      }
 855  
 856      /**
 857       * Given a top level page ID, display the nested hierarchy of sub-pages
 858       * together with paging support
 859       *
 860       * @since 3.1.0 (Standalone function exists since 2.6.0)
 861       * @since 4.2.0 Added the `$to_display` parameter.
 862       *
 863       * @param array $children_pages
 864       * @param int   $count
 865       * @param int   $parent
 866       * @param int   $level
 867       * @param int   $pagenum
 868       * @param int   $per_page
 869       * @param array $to_display List of pages to be displayed. Passed by reference.
 870       */
 871  	private function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page, &$to_display ) {
 872          if ( ! isset( $children_pages[ $parent ] ) ) {
 873              return;
 874          }
 875  
 876          $start = ( $pagenum - 1 ) * $per_page;
 877          $end   = $start + $per_page;
 878  
 879          foreach ( $children_pages[ $parent ] as $page ) {
 880              if ( $count >= $end ) {
 881                  break;
 882              }
 883  
 884              // If the page starts in a subtree, print the parents.
 885              if ( $count == $start && $page->post_parent > 0 ) {
 886                  $my_parents = array();
 887                  $my_parent  = $page->post_parent;
 888                  while ( $my_parent ) {
 889                      // Get the ID from the list or the attribute if my_parent is an object.
 890                      $parent_id = $my_parent;
 891                      if ( is_object( $my_parent ) ) {
 892                          $parent_id = $my_parent->ID;
 893                      }
 894  
 895                      $my_parent    = get_post( $parent_id );
 896                      $my_parents[] = $my_parent;
 897                      if ( ! $my_parent->post_parent ) {
 898                          break;
 899                      }
 900                      $my_parent = $my_parent->post_parent;
 901                  }
 902                  $num_parents = count( $my_parents );
 903                  while ( $my_parent = array_pop( $my_parents ) ) {
 904                      $to_display[ $my_parent->ID ] = $level - $num_parents;
 905                      $num_parents--;
 906                  }
 907              }
 908  
 909              if ( $count >= $start ) {
 910                  $to_display[ $page->ID ] = $level;
 911              }
 912  
 913              $count++;
 914  
 915              $this->_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page, $to_display );
 916          }
 917  
 918          unset( $children_pages[ $parent ] ); // Required in order to keep track of orphans.
 919      }
 920  
 921      /**
 922       * Handles the checkbox column output.
 923       *
 924       * @since 4.3.0
 925       *
 926       * @param WP_Post $post The current WP_Post object.
 927       */
 928  	public function column_cb( $post ) {
 929          $show = current_user_can( 'edit_post', $post->ID );
 930  
 931          /**
 932           * Filters whether to show the bulk edit checkbox for a post in its list table.
 933           *
 934           * By default the checkbox is only shown if the current user can edit the post.
 935           *
 936           * @since 5.7.0
 937           *
 938           * @param bool    $show Whether to show the checkbox.
 939           * @param WP_Post $post The current WP_Post object.
 940           */
 941          if ( apply_filters( 'wp_list_table_show_post_checkbox', $show, $post ) ) :
 942              ?>
 943              <label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>">
 944                  <?php
 945                      /* translators: %s: Post title. */
 946                      printf( __( 'Select %s' ), _draft_or_post_title() );
 947                  ?>
 948              </label>
 949              <input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
 950              <div class="locked-indicator">
 951                  <span class="locked-indicator-icon" aria-hidden="true"></span>
 952                  <span class="screen-reader-text">
 953                  <?php
 954                  printf(
 955                      /* translators: %s: Post title. */
 956                      __( '&#8220;%s&#8221; is locked' ),
 957                      _draft_or_post_title()
 958                  );
 959                  ?>
 960                  </span>
 961              </div>
 962              <?php
 963          endif;
 964      }
 965  
 966      /**
 967       * @since 4.3.0
 968       *
 969       * @param WP_Post $post
 970       * @param string  $classes
 971       * @param string  $data
 972       * @param string  $primary
 973       */
 974  	protected function _column_title( $post, $classes, $data, $primary ) {
 975          echo '<td class="' . $classes . ' page-title" ', $data, '>';
 976          echo $this->column_title( $post );
 977          echo $this->handle_row_actions( $post, 'title', $primary );
 978          echo '</td>';
 979      }
 980  
 981      /**
 982       * Handles the title column output.
 983       *
 984       * @since 4.3.0
 985       *
 986       * @global string $mode List table view mode.
 987       *
 988       * @param WP_Post $post The current WP_Post object.
 989       */
 990  	public function column_title( $post ) {
 991          global $mode;
 992  
 993          if ( $this->hierarchical_display ) {
 994              if ( 0 === $this->current_level && (int) $post->post_parent > 0 ) {
 995                  // Sent level 0 by accident, by default, or because we don't know the actual level.
 996                  $find_main_page = (int) $post->post_parent;
 997                  while ( $find_main_page > 0 ) {
 998                      $parent = get_post( $find_main_page );
 999  
1000                      if ( is_null( $parent ) ) {
1001                          break;
1002                      }
1003  
1004                      $this->current_level++;
1005                      $find_main_page = (int) $parent->post_parent;
1006  
1007                      if ( ! isset( $parent_name ) ) {
1008                          /** This filter is documented in wp-includes/post-template.php */
1009                          $parent_name = apply_filters( 'the_title', $parent->post_title, $parent->ID );
1010                      }
1011                  }
1012              }
1013          }
1014  
1015          $can_edit_post = current_user_can( 'edit_post', $post->ID );
1016  
1017          if ( $can_edit_post && 'trash' !== $post->post_status ) {
1018              $lock_holder = wp_check_post_lock( $post->ID );
1019  
1020              if ( $lock_holder ) {
1021                  $lock_holder   = get_userdata( $lock_holder );
1022                  $locked_avatar = get_avatar( $lock_holder->ID, 18 );
1023                  /* translators: %s: User's display name. */
1024                  $locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
1025              } else {
1026                  $locked_avatar = '';
1027                  $locked_text   = '';
1028              }
1029  
1030              echo '<div class="locked-info"><span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span></div>\n";
1031          }
1032  
1033          $pad = str_repeat( '&#8212; ', $this->current_level );
1034          echo '<strong>';
1035  
1036          $title = _draft_or_post_title();
1037  
1038          if ( $can_edit_post && 'trash' !== $post->post_status ) {
1039              printf(
1040                  '<a class="row-title" href="%s" aria-label="%s">%s%s</a>',
1041                  get_edit_post_link( $post->ID ),
1042                  /* translators: %s: Post title. */
1043                  esc_attr( sprintf( __( '&#8220;%s&#8221; (Edit)' ), $title ) ),
1044                  $pad,
1045                  $title
1046              );
1047          } else {
1048              printf(
1049                  '<span>%s%s</span>',
1050                  $pad,
1051                  $title
1052              );
1053          }
1054          _post_states( $post );
1055  
1056          if ( isset( $parent_name ) ) {
1057              $post_type_object = get_post_type_object( $post->post_type );
1058              echo ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html( $parent_name );
1059          }
1060          echo "</strong>\n";
1061  
1062          if ( 'excerpt' === $mode
1063              && ! is_post_type_hierarchical( $this->screen->post_type )
1064              && current_user_can( 'read_post', $post->ID )
1065          ) {
1066              if ( post_password_required( $post ) ) {
1067                  echo '<span class="protected-post-excerpt">' . esc_html( get_the_excerpt() ) . '</span>';
1068              } else {
1069                  echo esc_html( get_the_excerpt() );
1070              }
1071          }
1072  
1073          get_inline_data( $post );
1074      }
1075  
1076      /**
1077       * Handles the post date column output.
1078       *
1079       * @since 4.3.0
1080       *
1081       * @global string $mode List table view mode.
1082       *
1083       * @param WP_Post $post The current WP_Post object.
1084       */
1085  	public function column_date( $post ) {
1086          global $mode;
1087  
1088          if ( '0000-00-00 00:00:00' === $post->post_date ) {
1089              $t_time    = __( 'Unpublished' );
1090              $time_diff = 0;
1091          } else {
1092              $t_time = sprintf(
1093                  /* translators: 1: Post date, 2: Post time. */
1094                  __( '%1$s at %2$s' ),
1095                  /* translators: Post date format. See https://www.php.net/manual/datetime.format.php */
1096                  get_the_time( __( 'Y/m/d' ), $post ),
1097                  /* translators: Post time format. See https://www.php.net/manual/datetime.format.php */
1098                  get_the_time( __( 'g:i a' ), $post )
1099              );
1100  
1101              $time      = get_post_timestamp( $post );
1102              $time_diff = time() - $time;
1103          }
1104  
1105          if ( 'publish' === $post->post_status ) {
1106              $status = __( 'Published' );
1107          } elseif ( 'future' === $post->post_status ) {
1108              if ( $time_diff > 0 ) {
1109                  $status = '<strong class="error-message">' . __( 'Missed schedule' ) . '</strong>';
1110              } else {
1111                  $status = __( 'Scheduled' );
1112              }
1113          } else {
1114              $status = __( 'Last Modified' );
1115          }
1116  
1117          /**
1118           * Filters the status text of the post.
1119           *
1120           * @since 4.8.0
1121           *
1122           * @param string  $status      The status text.
1123           * @param WP_Post $post        Post object.
1124           * @param string  $column_name The column name.
1125           * @param string  $mode        The list display mode ('excerpt' or 'list').
1126           */
1127          $status = apply_filters( 'post_date_column_status', $status, $post, 'date', $mode );
1128  
1129          if ( $status ) {
1130              echo $status . '<br />';
1131          }
1132  
1133          /**
1134           * Filters the published time of the post.
1135           *
1136           * @since 2.5.1
1137           * @since 5.5.0 Removed the difference between 'excerpt' and 'list' modes.
1138           *              The published time and date are both displayed now,
1139           *              which is equivalent to the previous 'excerpt' mode.
1140           *
1141           * @param string  $t_time      The published time.
1142           * @param WP_Post $post        Post object.
1143           * @param string  $column_name The column name.
1144           * @param string  $mode        The list display mode ('excerpt' or 'list').
1145           */
1146          echo apply_filters( 'post_date_column_time', $t_time, $post, 'date', $mode );
1147      }
1148  
1149      /**
1150       * Handles the comments column output.
1151       *
1152       * @since 4.3.0
1153       *
1154       * @param WP_Post $post The current WP_Post object.
1155       */
1156  	public function column_comments( $post ) {
1157          ?>
1158          <div class="post-com-count-wrapper">
1159          <?php
1160              $pending_comments = isset( $this->comment_pending_count[ $post->ID ] ) ? $this->comment_pending_count[ $post->ID ] : 0;
1161  
1162              $this->comments_bubble( $post->ID, $pending_comments );
1163          ?>
1164          </div>
1165          <?php
1166      }
1167  
1168      /**
1169       * Handles the post author column output.
1170       *
1171       * @since 4.3.0
1172       *
1173       * @param WP_Post $post The current WP_Post object.
1174       */
1175  	public function column_author( $post ) {
1176          $args = array(
1177              'post_type' => $post->post_type,
1178              'author'    => get_the_author_meta( 'ID' ),
1179          );
1180          echo $this->get_edit_link( $args, get_the_author() );
1181      }
1182  
1183      /**
1184       * Handles the default column output.
1185       *
1186       * @since 4.3.0
1187       *
1188       * @param WP_Post $post        The current WP_Post object.
1189       * @param string  $column_name The current column name.
1190       */
1191  	public function column_default( $post, $column_name ) {
1192          if ( 'categories' === $column_name ) {
1193              $taxonomy = 'category';
1194          } elseif ( 'tags' === $column_name ) {
1195              $taxonomy = 'post_tag';
1196          } elseif ( 0 === strpos( $column_name, 'taxonomy-' ) ) {
1197              $taxonomy = substr( $column_name, 9 );
1198          } else {
1199              $taxonomy = false;
1200          }
1201          if ( $taxonomy ) {
1202              $taxonomy_object = get_taxonomy( $taxonomy );
1203              $terms           = get_the_terms( $post->ID, $taxonomy );
1204              if ( is_array( $terms ) ) {
1205                  $term_links = array();
1206                  foreach ( $terms as $t ) {
1207                      $posts_in_term_qv = array();
1208                      if ( 'post' !== $post->post_type ) {
1209                          $posts_in_term_qv['post_type'] = $post->post_type;
1210                      }
1211                      if ( $taxonomy_object->query_var ) {
1212                          $posts_in_term_qv[ $taxonomy_object->query_var ] = $t->slug;
1213                      } else {
1214                          $posts_in_term_qv['taxonomy'] = $taxonomy;
1215                          $posts_in_term_qv['term']     = $t->slug;
1216                      }
1217  
1218                      $label = esc_html( sanitize_term_field( 'name', $t->name, $t->term_id, $taxonomy, 'display' ) );
1219  
1220                      $term_links[] = $this->get_edit_link( $posts_in_term_qv, $label );
1221                  }
1222  
1223                  /**
1224                   * Filters the links in `$taxonomy` column of edit.php.
1225                   *
1226                   * @since 5.2.0
1227                   *
1228                   * @param string[]  $term_links Array of term editing links.
1229                   * @param string    $taxonomy   Taxonomy name.
1230                   * @param WP_Term[] $terms      Array of term objects appearing in the post row.
1231                   */
1232                  $term_links = apply_filters( 'post_column_taxonomy_links', $term_links, $taxonomy, $terms );
1233  
1234                  /* translators: Used between list items, there is a space after the comma. */
1235                  echo implode( __( ', ' ), $term_links );
1236              } else {
1237                  echo '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . $taxonomy_object->labels->no_terms . '</span>';
1238              }
1239              return;
1240          }
1241  
1242          if ( is_post_type_hierarchical( $post->post_type ) ) {
1243  
1244              /**
1245               * Fires in each custom column on the Posts list table.
1246               *
1247               * This hook only fires if the current post type is hierarchical,
1248               * such as pages.
1249               *
1250               * @since 2.5.0
1251               *
1252               * @param string $column_name The name of the column to display.
1253               * @param int    $post_id     The current post ID.
1254               */
1255              do_action( 'manage_pages_custom_column', $column_name, $post->ID );
1256          } else {
1257  
1258              /**
1259               * Fires in each custom column in the Posts list table.
1260               *
1261               * This hook only fires if the current post type is non-hierarchical,
1262               * such as posts.
1263               *
1264               * @since 1.5.0
1265               *
1266               * @param string $column_name The name of the column to display.
1267               * @param int    $post_id     The current post ID.
1268               */
1269              do_action( 'manage_posts_custom_column', $column_name, $post->ID );
1270          }
1271  
1272          /**
1273           * Fires for each custom column of a specific post type in the Posts list table.
1274           *
1275           * The dynamic portion of the hook name, `$post->post_type`, refers to the post type.
1276           *
1277           * @since 3.1.0
1278           *
1279           * @param string $column_name The name of the column to display.
1280           * @param int    $post_id     The current post ID.
1281           */
1282          do_action( "manage_{$post->post_type}_posts_custom_column", $column_name, $post->ID );
1283      }
1284  
1285      /**
1286       * @global WP_Post $post Global post object.
1287       *
1288       * @param int|WP_Post $post
1289       * @param int         $level
1290       */
1291  	public function single_row( $post, $level = 0 ) {
1292          $global_post = get_post();
1293  
1294          $post                = get_post( $post );
1295          $this->current_level = $level;
1296  
1297          $GLOBALS['post'] = $post;
1298          setup_postdata( $post );
1299  
1300          $classes = 'iedit author-' . ( get_current_user_id() == $post->post_author ? 'self' : 'other' );
1301  
1302          $lock_holder = wp_check_post_lock( $post->ID );
1303          if ( $lock_holder ) {
1304              $classes .= ' wp-locked';
1305          }
1306  
1307          if ( $post->post_parent ) {
1308              $count    = count( get_post_ancestors( $post->ID ) );
1309              $classes .= ' level-' . $count;
1310          } else {
1311              $classes .= ' level-0';
1312          }
1313          ?>
1314          <tr id="post-<?php echo $post->ID; ?>" class="<?php echo implode( ' ', get_post_class( $classes, $post->ID ) ); ?>">
1315              <?php $this->single_row_columns( $post ); ?>
1316          </tr>
1317          <?php
1318          $GLOBALS['post'] = $global_post;
1319      }
1320  
1321      /**
1322       * Gets the name of the default primary column.
1323       *
1324       * @since 4.3.0
1325       *
1326       * @return string Name of the default primary column, in this case, 'title'.
1327       */
1328  	protected function get_default_primary_column_name() {
1329          return 'title';
1330      }
1331  
1332      /**
1333       * Generates and displays row action links.
1334       *
1335       * @since 4.3.0
1336       *
1337       * @param WP_Post $post        Post being acted upon.
1338       * @param string  $column_name Current column name.
1339       * @param string  $primary     Primary column name.
1340       * @return string Row actions output for posts, or an empty string
1341       *                if the current column is not the primary column.
1342       */
1343  	protected function handle_row_actions( $post, $column_name, $primary ) {
1344          if ( $primary !== $column_name ) {
1345              return '';
1346          }
1347  
1348          $post_type_object = get_post_type_object( $post->post_type );
1349          $can_edit_post    = current_user_can( 'edit_post', $post->ID );
1350          $actions          = array();
1351          $title            = _draft_or_post_title();
1352  
1353          if ( $can_edit_post && 'trash' !== $post->post_status ) {
1354              $actions['edit'] = sprintf(
1355                  '<a href="%s" aria-label="%s">%s</a>',
1356                  get_edit_post_link( $post->ID ),
1357                  /* translators: %s: Post title. */
1358                  esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $title ) ),
1359                  __( 'Edit' )
1360              );
1361  
1362              if ( 'wp_block' !== $post->post_type ) {
1363                  $actions['inline hide-if-no-js'] = sprintf(
1364                      '<button type="button" class="button-link editinline" aria-label="%s" aria-expanded="false">%s</button>',
1365                      /* translators: %s: Post title. */
1366                      esc_attr( sprintf( __( 'Quick edit &#8220;%s&#8221; inline' ), $title ) ),
1367                      __( 'Quick&nbsp;Edit' )
1368                  );
1369              }
1370          }
1371  
1372          if ( current_user_can( 'delete_post', $post->ID ) ) {
1373              if ( 'trash' === $post->post_status ) {
1374                  $actions['untrash'] = sprintf(
1375                      '<a href="%s" aria-label="%s">%s</a>',
1376                      wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&amp;action=untrash', $post->ID ) ), 'untrash-post_' . $post->ID ),
1377                      /* translators: %s: Post title. */
1378                      esc_attr( sprintf( __( 'Restore &#8220;%s&#8221; from the Trash' ), $title ) ),
1379                      __( 'Restore' )
1380                  );
1381              } elseif ( EMPTY_TRASH_DAYS ) {
1382                  $actions['trash'] = sprintf(
1383                      '<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
1384                      get_delete_post_link( $post->ID ),
1385                      /* translators: %s: Post title. */
1386                      esc_attr( sprintf( __( 'Move &#8220;%s&#8221; to the Trash' ), $title ) ),
1387                      _x( 'Trash', 'verb' )
1388                  );
1389              }
1390              if ( 'trash' === $post->post_status || ! EMPTY_TRASH_DAYS ) {
1391                  $actions['delete'] = sprintf(
1392                      '<a href="%s" class="submitdelete" aria-label="%s">%s</a>',
1393                      get_delete_post_link( $post->ID, '', true ),
1394                      /* translators: %s: Post title. */
1395                      esc_attr( sprintf( __( 'Delete &#8220;%s&#8221; permanently' ), $title ) ),
1396                      __( 'Delete Permanently' )
1397                  );
1398              }
1399          }
1400  
1401          if ( is_post_type_viewable( $post_type_object ) ) {
1402              if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ), true ) ) {
1403                  if ( $can_edit_post ) {
1404                      $preview_link    = get_preview_post_link( $post );
1405                      $actions['view'] = sprintf(
1406                          '<a href="%s" rel="bookmark" aria-label="%s">%s</a>',
1407                          esc_url( $preview_link ),
1408                          /* translators: %s: Post title. */
1409                          esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $title ) ),
1410                          __( 'Preview' )
1411                      );
1412                  }
1413              } elseif ( 'trash' !== $post->post_status ) {
1414                  $actions['view'] = sprintf(
1415                      '<a href="%s" rel="bookmark" aria-label="%s">%s</a>',
1416                      get_permalink( $post->ID ),
1417                      /* translators: %s: Post title. */
1418                      esc_attr( sprintf( __( 'View &#8220;%s&#8221;' ), $title ) ),
1419                      __( 'View' )
1420                  );
1421              }
1422          }
1423  
1424          if ( 'wp_block' === $post->post_type ) {
1425              $actions['export'] = sprintf(
1426                  '<button type="button" class="wp-list-reusable-blocks__export button-link" data-id="%s" aria-label="%s">%s</button>',
1427                  $post->ID,
1428                  /* translators: %s: Post title. */
1429                  esc_attr( sprintf( __( 'Export &#8220;%s&#8221; as JSON' ), $title ) ),
1430                  __( 'Export as JSON' )
1431              );
1432          }
1433  
1434          if ( is_post_type_hierarchical( $post->post_type ) ) {
1435  
1436              /**
1437               * Filters the array of row action links on the Pages list table.
1438               *
1439               * The filter is evaluated only for hierarchical post types.
1440               *
1441               * @since 2.8.0
1442               *
1443               * @param string[] $actions An array of row action links. Defaults are
1444               *                          'Edit', 'Quick Edit', 'Restore', 'Trash',
1445               *                          'Delete Permanently', 'Preview', and 'View'.
1446               * @param WP_Post  $post    The post object.
1447               */
1448              $actions = apply_filters( 'page_row_actions', $actions, $post );
1449          } else {
1450  
1451              /**
1452               * Filters the array of row action links on the Posts list table.
1453               *
1454               * The filter is evaluated only for non-hierarchical post types.
1455               *
1456               * @since 2.8.0
1457               *
1458               * @param string[] $actions An array of row action links. Defaults are
1459               *                          'Edit', 'Quick Edit', 'Restore', 'Trash',
1460               *                          'Delete Permanently', 'Preview', and 'View'.
1461               * @param WP_Post  $post    The post object.
1462               */
1463              $actions = apply_filters( 'post_row_actions', $actions, $post );
1464          }
1465  
1466          return $this->row_actions( $actions );
1467      }
1468  
1469      /**
1470       * Outputs the hidden row displayed when inline editing
1471       *
1472       * @since 3.1.0
1473       *
1474       * @global string $mode List table view mode.
1475       */
1476  	public function inline_edit() {
1477          global $mode;
1478  
1479          $screen = $this->screen;
1480  
1481          $post             = get_default_post_to_edit( $screen->post_type );
1482          $post_type_object = get_post_type_object( $screen->post_type );
1483  
1484          $taxonomy_names          = get_object_taxonomies( $screen->post_type );
1485          $hierarchical_taxonomies = array();
1486          $flat_taxonomies         = array();
1487  
1488          foreach ( $taxonomy_names as $taxonomy_name ) {
1489  
1490              $taxonomy = get_taxonomy( $taxonomy_name );
1491  
1492              $show_in_quick_edit = $taxonomy->show_in_quick_edit;
1493  
1494              /**
1495               * Filters whether the current taxonomy should be shown in the Quick Edit panel.
1496               *
1497               * @since 4.2.0
1498               *
1499               * @param bool   $show_in_quick_edit Whether to show the current taxonomy in Quick Edit.
1500               * @param string $taxonomy_name      Taxonomy name.
1501               * @param string $post_type          Post type of current Quick Edit post.
1502               */
1503              if ( ! apply_filters( 'quick_edit_show_taxonomy', $show_in_quick_edit, $taxonomy_name, $screen->post_type ) ) {
1504                  continue;
1505              }
1506  
1507              if ( $taxonomy->hierarchical ) {
1508                  $hierarchical_taxonomies[] = $taxonomy;
1509              } else {
1510                  $flat_taxonomies[] = $taxonomy;
1511              }
1512          }
1513  
1514          $m            = ( isset( $mode ) && 'excerpt' === $mode ) ? 'excerpt' : 'list';
1515          $can_publish  = current_user_can( $post_type_object->cap->publish_posts );
1516          $core_columns = array(
1517              'cb'         => true,
1518              'date'       => true,
1519              'title'      => true,
1520              'categories' => true,
1521              'tags'       => true,
1522              'comments'   => true,
1523              'author'     => true,
1524          );
1525  
1526          ?>
1527  
1528          <form method="get">
1529          <table style="display: none"><tbody id="inlineedit">
1530          <?php
1531          $hclass              = count( $hierarchical_taxonomies ) ? 'post' : 'page';
1532          $inline_edit_classes = "inline-edit-row inline-edit-row-$hclass";
1533          $bulk_edit_classes   = "bulk-edit-row bulk-edit-row-$hclass bulk-edit-{$screen->post_type}";
1534          $quick_edit_classes  = "quick-edit-row quick-edit-row-$hclass inline-edit-{$screen->post_type}";
1535  
1536          $bulk = 0;
1537          while ( $bulk < 2 ) :
1538              $classes  = $inline_edit_classes . ' ';
1539              $classes .= $bulk ? $bulk_edit_classes : $quick_edit_classes;
1540              ?>
1541              <tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" class="<?php echo $classes; ?>" style="display: none">
1542              <td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
1543  
1544              <fieldset class="inline-edit-col-left">
1545                  <legend class="inline-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>
1546                  <div class="inline-edit-col">
1547  
1548                  <?php if ( post_type_supports( $screen->post_type, 'title' ) ) : ?>
1549  
1550                      <?php if ( $bulk ) : ?>
1551  
1552                          <div id="bulk-title-div">
1553                              <div id="bulk-titles"></div>
1554                          </div>
1555  
1556                      <?php else : // $bulk ?>
1557  
1558                          <label>
1559                              <span class="title"><?php _e( 'Title' ); ?></span>
1560                              <span class="input-text-wrap"><input type="text" name="post_title" class="ptitle" value="" /></span>
1561                          </label>
1562  
1563                          <?php if ( is_post_type_viewable( $screen->post_type ) ) : ?>
1564  
1565                              <label>
1566                                  <span class="title"><?php _e( 'Slug' ); ?></span>
1567                                  <span class="input-text-wrap"><input type="text" name="post_name" value="" /></span>
1568                              </label>
1569  
1570                          <?php endif; // is_post_type_viewable() ?>
1571  
1572                      <?php endif; // $bulk ?>
1573  
1574                  <?php endif; // post_type_supports( ... 'title' ) ?>
1575  
1576                  <?php if ( ! $bulk ) : ?>
1577                      <fieldset class="inline-edit-date">
1578                          <legend><span class="title"><?php _e( 'Date' ); ?></span></legend>
1579                          <?php touch_time( 1, 1, 0, 1 ); ?>
1580                      </fieldset>
1581                      <br class="clear" />
1582                  <?php endif; // $bulk ?>
1583  
1584                  <?php
1585                  if ( post_type_supports( $screen->post_type, 'author' ) ) :
1586                      $authors_dropdown = '';
1587  
1588                      if ( current_user_can( $post_type_object->cap->edit_others_posts ) ) :
1589                          $users_opt = array(
1590                              'hide_if_only_one_author' => false,
1591                              'who'                     => 'authors',
1592                              'name'                    => 'post_author',
1593                              'class'                   => 'authors',
1594                              'multi'                   => 1,
1595                              'echo'                    => 0,
1596                              'show'                    => 'display_name_with_login',
1597                          );
1598  
1599                          if ( $bulk ) {
1600                              $users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
1601                          }
1602  
1603                          /**
1604                           * Filters the arguments used to generate the Quick Edit authors drop-down.
1605                           *
1606                           * @since 5.6.0
1607                           *
1608                           * @see wp_dropdown_users()
1609                           *
1610                           * @param array $users_opt An array of arguments passed to wp_dropdown_users().
1611                           * @param bool  $bulk      A flag to denote if it's a bulk action.
1612                           */
1613                          $users_opt = apply_filters( 'quick_edit_dropdown_authors_args', $users_opt, $bulk );
1614  
1615                          $authors = wp_dropdown_users( $users_opt );
1616                          if ( $authors ) :
1617                              $authors_dropdown  = '<label class="inline-edit-author">';
1618                              $authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
1619                              $authors_dropdown .= $authors;
1620                              $authors_dropdown .= '</label>';
1621                          endif;
1622                      endif; // current_user_can( 'edit_others_posts' )
1623                      ?>
1624  
1625                      <?php
1626                      if ( ! $bulk ) {
1627                          echo $authors_dropdown;
1628                      }
1629                  endif; // post_type_supports( ... 'author' )
1630                  ?>
1631  
1632                  <?php if ( ! $bulk && $can_publish ) : ?>
1633  
1634                      <div class="inline-edit-group wp-clearfix">
1635                          <label class="alignleft">
1636                              <span class="title"><?php _e( 'Password' ); ?></span>
1637                              <span class="input-text-wrap"><input type="text" name="post_password" class="inline-edit-password-input" value="" /></span>
1638                          </label>
1639  
1640                          <span class="alignleft inline-edit-or">
1641                              <?php
1642                              /* translators: Between password field and private checkbox on post quick edit interface. */
1643                              _e( '&ndash;OR&ndash;' );
1644                              ?>
1645                          </span>
1646                          <label class="alignleft inline-edit-private">
1647                              <input type="checkbox" name="keep_private" value="private" />
1648                              <span class="checkbox-title"><?php _e( 'Private' ); ?></span>
1649                          </label>
1650                      </div>
1651  
1652                  <?php endif; ?>
1653  
1654                  </div>
1655              </fieldset>
1656  
1657              <?php if ( count( $hierarchical_taxonomies ) && ! $bulk ) : ?>
1658  
1659                  <fieldset class="inline-edit-col-center inline-edit-categories">
1660                      <div class="inline-edit-col">
1661  
1662                      <?php foreach ( $hierarchical_taxonomies as $taxonomy ) : ?>
1663  
1664                          <span class="title inline-edit-categories-label"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
1665                          <input type="hidden" name="<?php echo ( 'category' === $taxonomy->name ) ? 'post_category[]' : 'tax_input[' . esc_attr( $taxonomy->name ) . '][]'; ?>" value="0" />
1666                          <ul class="cat-checklist <?php echo esc_attr( $taxonomy->name ); ?>-checklist">
1667                              <?php wp_terms_checklist( null, array( 'taxonomy' => $taxonomy->name ) ); ?>
1668                          </ul>
1669  
1670                      <?php endforeach; // $hierarchical_taxonomies as $taxonomy ?>
1671  
1672                      </div>
1673                  </fieldset>
1674  
1675              <?php endif; // count( $hierarchical_taxonomies ) && ! $bulk ?>
1676  
1677              <fieldset class="inline-edit-col-right">
1678                  <div class="inline-edit-col">
1679  
1680                  <?php
1681                  if ( post_type_supports( $screen->post_type, 'author' ) && $bulk ) {
1682                      echo $authors_dropdown;
1683                  }
1684                  ?>
1685  
1686                  <?php if ( post_type_supports( $screen->post_type, 'page-attributes' ) ) : ?>
1687  
1688                      <?php if ( $post_type_object->hierarchical ) : ?>
1689  
1690                          <label>
1691                              <span class="title"><?php _e( 'Parent' ); ?></span>
1692                              <?php
1693                              $dropdown_args = array(
1694                                  'post_type'         => $post_type_object->name,
1695                                  'selected'          => $post->post_parent,
1696                                  'name'              => 'post_parent',
1697                                  'show_option_none'  => __( 'Main Page (no parent)' ),
1698                                  'option_none_value' => 0,
1699                                  'sort_column'       => 'menu_order, post_title',
1700                              );
1701  
1702                              if ( $bulk ) {
1703                                  $dropdown_args['show_option_no_change'] = __( '&mdash; No Change &mdash;' );
1704                              }
1705  
1706                              /**
1707                               * Filters the arguments used to generate the Quick Edit page-parent drop-down.
1708                               *
1709                               * @since 2.7.0
1710                               * @since 5.6.0 The `$bulk` parameter was added.
1711                               *
1712                               * @see wp_dropdown_pages()
1713                               *
1714                               * @param array $dropdown_args An array of arguments passed to wp_dropdown_pages().
1715                               * @param bool  $bulk          A flag to denote if it's a bulk action.
1716                               */
1717                              $dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args, $bulk );
1718  
1719                              wp_dropdown_pages( $dropdown_args );
1720                              ?>
1721                          </label>
1722  
1723                      <?php endif; // hierarchical ?>
1724  
1725                      <?php if ( ! $bulk ) : ?>
1726  
1727                          <label>
1728                              <span class="title"><?php _e( 'Order' ); ?></span>
1729                              <span class="input-text-wrap"><input type="text" name="menu_order" class="inline-edit-menu-order-input" value="<?php echo $post->menu_order; ?>" /></span>
1730                          </label>
1731  
1732                      <?php endif; // ! $bulk ?>
1733  
1734                  <?php endif; // post_type_supports( ... 'page-attributes' ) ?>
1735  
1736                  <?php if ( 0 < count( get_page_templates( null, $screen->post_type ) ) ) : ?>
1737  
1738                      <label>
1739                          <span class="title"><?php _e( 'Template' ); ?></span>
1740                          <select name="page_template">
1741                              <?php if ( $bulk ) : ?>
1742                              <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
1743                              <?php endif; // $bulk ?>
1744                              <?php
1745                              /** This filter is documented in wp-admin/includes/meta-boxes.php */
1746                              $default_title = apply_filters( 'default_page_template_title', __( 'Default template' ), 'quick-edit' );
1747                              ?>
1748                              <option value="default"><?php echo esc_html( $default_title ); ?></option>
1749                              <?php page_template_dropdown( '', $screen->post_type ); ?>
1750                          </select>
1751                      </label>
1752  
1753                  <?php endif; ?>
1754  
1755                  <?php if ( count( $flat_taxonomies ) && ! $bulk ) : ?>
1756  
1757                      <?php foreach ( $flat_taxonomies as $taxonomy ) : ?>
1758  
1759                          <?php if ( current_user_can( $taxonomy->cap->assign_terms ) ) : ?>
1760                              <?php $taxonomy_name = esc_attr( $taxonomy->name ); ?>
1761  
1762                              <label class="inline-edit-tags">
1763                                  <span class="title"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
1764                                  <textarea data-wp-taxonomy="<?php echo $taxonomy_name; ?>" cols="22" rows="1" name="tax_input[<?php echo $taxonomy_name; ?>]" class="tax_input_<?php echo $taxonomy_name; ?>"></textarea>
1765                              </label>
1766  
1767                          <?php endif; // current_user_can( 'assign_terms' ) ?>
1768  
1769                      <?php endforeach; // $flat_taxonomies as $taxonomy ?>
1770  
1771                  <?php endif; // count( $flat_taxonomies ) && ! $bulk ?>
1772  
1773                  <?php if ( post_type_supports( $screen->post_type, 'comments' ) || post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?>
1774  
1775                      <?php if ( $bulk ) : ?>
1776  
1777                          <div class="inline-edit-group wp-clearfix">
1778  
1779                          <?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
1780  
1781                              <label class="alignleft">
1782                                  <span class="title"><?php _e( 'Comments' ); ?></span>
1783                                  <select name="comment_status">
1784                                      <option value=""><?php _e( '&mdash; No Change &mdash;' ); ?></option>
1785                                      <option value="open"><?php _e( 'Allow' ); ?></option>
1786                                      <option value="closed"><?php _e( 'Do not allow' ); ?></option>
1787                                  </select>
1788                              </label>
1789  
1790                          <?php endif; ?>
1791  
1792                          <?php if ( post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?>
1793  
1794                              <label class="alignright">
1795                                  <span class="title"><?php _e( 'Pings' ); ?></span>
1796                                  <select name="ping_status">
1797                                      <option value=""><?php _e( '&mdash; No Change &mdash;' ); ?></option>
1798                                      <option value="open"><?php _e( 'Allow' ); ?></option>
1799                                      <option value="closed"><?php _e( 'Do not allow' ); ?></option>
1800                                  </select>
1801                              </label>
1802  
1803                          <?php endif; ?>
1804  
1805                          </div>
1806  
1807                      <?php else : // $bulk ?>
1808  
1809                          <div class="inline-edit-group wp-clearfix">
1810  
1811                          <?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
1812  
1813                              <label class="alignleft">
1814                                  <input type="checkbox" name="comment_status" value="open" />
1815                                  <span class="checkbox-title"><?php _e( 'Allow Comments' ); ?></span>
1816                              </label>
1817  
1818                          <?php endif; ?>
1819  
1820                          <?php if ( post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?>
1821  
1822                              <label class="alignleft">
1823                                  <input type="checkbox" name="ping_status" value="open" />
1824                                  <span class="checkbox-title"><?php _e( 'Allow Pings' ); ?></span>
1825                              </label>
1826  
1827                          <?php endif; ?>
1828  
1829                          </div>
1830  
1831                      <?php endif; // $bulk ?>
1832  
1833                  <?php endif; // post_type_supports( ... comments or pings ) ?>
1834  
1835                      <div class="inline-edit-group wp-clearfix">
1836  
1837                          <label class="inline-edit-status alignleft">
1838                              <span class="title"><?php _e( 'Status' ); ?></span>
1839                              <select name="_status">
1840                                  <?php if ( $bulk ) : ?>
1841                                      <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
1842                                  <?php endif; // $bulk ?>
1843  
1844                                  <?php if ( $can_publish ) : // Contributors only get "Unpublished" and "Pending Review". ?>
1845                                      <option value="publish"><?php _e( 'Published' ); ?></option>
1846                                      <option value="future"><?php _e( 'Scheduled' ); ?></option>
1847                                      <?php if ( $bulk ) : ?>
1848                                          <option value="private"><?php _e( 'Private' ); ?></option>
1849                                      <?php endif; // $bulk ?>
1850                                  <?php endif; ?>
1851  
1852                                  <option value="pending"><?php _e( 'Pending Review' ); ?></option>
1853                                  <option value="draft"><?php _e( 'Draft' ); ?></option>
1854                              </select>
1855                          </label>
1856  
1857                          <?php if ( 'post' === $screen->post_type && $can_publish && current_user_can( $post_type_object->cap->edit_others_posts ) ) : ?>
1858  
1859                              <?php if ( $bulk ) : ?>
1860  
1861                                  <label class="alignright">
1862                                      <span class="title"><?php _e( 'Sticky' ); ?></span>
1863                                      <select name="sticky">
1864                                          <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
1865                                          <option value="sticky"><?php _e( 'Sticky' ); ?></option>
1866                                          <option value="unsticky"><?php _e( 'Not Sticky' ); ?></option>
1867                                      </select>
1868                                  </label>
1869  
1870                              <?php else : // $bulk ?>
1871  
1872                                  <label class="alignleft">
1873                                      <input type="checkbox" name="sticky" value="sticky" />
1874                                      <span class="checkbox-title"><?php _e( 'Make this post sticky' ); ?></span>
1875                                  </label>
1876  
1877                              <?php endif; // $bulk ?>
1878  
1879                          <?php endif; // 'post' && $can_publish && current_user_can( 'edit_others_posts' ) ?>
1880  
1881                      </div>
1882  
1883                  <?php if ( $bulk && current_theme_supports( 'post-formats' ) && post_type_supports( $screen->post_type, 'post-formats' ) ) : ?>
1884                      <?php $post_formats = get_theme_support( 'post-formats' ); ?>
1885  
1886                      <label class="alignleft">
1887                          <span class="title"><?php _ex( 'Format', 'post format' ); ?></span>
1888                          <select name="post_format">
1889                              <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
1890                              <option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
1891                              <?php if ( is_array( $post_formats[0] ) ) : ?>
1892                                  <?php foreach ( $post_formats[0] as $format ) : ?>
1893                                      <option value="<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
1894                                  <?php endforeach; ?>
1895                              <?php endif; ?>
1896                          </select>
1897                      </label>
1898  
1899                  <?php endif; ?>
1900  
1901                  </div>
1902              </fieldset>
1903  
1904              <?php
1905              list( $columns ) = $this->get_column_info();
1906  
1907              foreach ( $columns as $column_name => $column_display_name ) {
1908                  if ( isset( $core_columns[ $column_name ] ) ) {
1909                      continue;
1910                  }
1911  
1912                  if ( $bulk ) {
1913  
1914                      /**
1915                       * Fires once for each column in Bulk Edit mode.
1916                       *
1917                       * @since 2.7.0
1918                       *
1919                       * @param string $column_name Name of the column to edit.
1920                       * @param string $post_type   The post type slug.
1921                       */
1922                      do_action( 'bulk_edit_custom_box', $column_name, $screen->post_type );
1923                  } else {
1924  
1925                      /**
1926                       * Fires once for each column in Quick Edit mode.
1927                       *
1928                       * @since 2.7.0
1929                       *
1930                       * @param string $column_name Name of the column to edit.
1931                       * @param string $post_type   The post type slug, or current screen name if this is a taxonomy list table.
1932                       * @param string $taxonomy    The taxonomy name, if any.
1933                       */
1934                      do_action( 'quick_edit_custom_box', $column_name, $screen->post_type, '' );
1935                  }
1936              }
1937              ?>
1938  
1939              <div class="submit inline-edit-save">
1940                  <button type="button" class="button cancel alignleft"><?php _e( 'Cancel' ); ?></button>
1941  
1942                  <?php if ( ! $bulk ) : ?>
1943                      <?php wp_nonce_field( 'inlineeditnonce', '_inline_edit', false ); ?>
1944                      <button type="button" class="button button-primary save alignright"><?php _e( 'Update' ); ?></button>
1945                      <span class="spinner"></span>
1946                  <?php else : ?>
1947                      <?php submit_button( __( 'Update' ), 'primary alignright', 'bulk_edit', false ); ?>
1948                  <?php endif; ?>
1949  
1950                  <input type="hidden" name="post_view" value="<?php echo esc_attr( $m ); ?>" />
1951                  <input type="hidden" name="screen" value="<?php echo esc_attr( $screen->id ); ?>" />
1952                  <?php if ( ! $bulk && ! post_type_supports( $screen->post_type, 'author' ) ) : ?>
1953                      <input type="hidden" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" />
1954                  <?php endif; ?>
1955                  <br class="clear" />
1956  
1957                  <div class="notice notice-error notice-alt inline hidden">
1958                      <p class="error"></p>
1959                  </div>
1960              </div>
1961  
1962              </td></tr>
1963  
1964              <?php
1965              $bulk++;
1966          endwhile;
1967          ?>
1968          </tbody></table>
1969          </form>
1970          <?php
1971      }
1972  }


Generated : Fri Mar 5 08:20:02 2021 Cross-referenced by PHPXref