WPSEO_Bulk_List_Table::display_tablenav()
Will show the navigation for the table like page navigation and page filter.
Метод класса: WPSEO_Bulk_List_Table{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
$WPSEO_Bulk_List_Table = new WPSEO_Bulk_List_Table(); $WPSEO_Bulk_List_Table->display_tablenav( $which );
- $which(строка) (обязательный)
- Table nav location (such as top).
Код WPSEO_Bulk_List_Table::display_tablenav() WPSEO Bulk List Table::display tablenav Yoast 20.3
<?php public function display_tablenav( $which ) { // phpcs:disable WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. $post_status = isset( $_GET['post_status'] ) && is_string( $_GET['post_status'] ) ? sanitize_text_field( wp_unslash( $_GET['post_status'] ) ) : ''; $order_by = isset( $_GET['orderby'] ) && is_string( $_GET['orderby'] ) ? sanitize_text_field( wp_unslash( $_GET['orderby'] ) ) : ''; $order = isset( $_GET['order'] ) && is_string( $_GET['order'] ) ? sanitize_text_field( wp_unslash( $_GET['order'] ) ) : ''; $post_type_filter = isset( $_GET['post_type_filter'] ) && is_string( $_GET['post_type_filter'] ) ? sanitize_text_field( wp_unslash( $_GET['post_type_filter'] ) ) : ''; // phpcs:enable WordPress.Security.NonceVerification.Recommended; ?> <div class="tablenav <?php echo esc_attr( $which ); ?>"> <?php if ( $which === 'top' ) { ?> <form id="posts-filter" action="" method="get"> <input type="hidden" name="nonce" value="<?php echo esc_attr( $this->nonce ); ?>"/> <input type="hidden" name="page" value="wpseo_tools"/> <input type="hidden" name="tool" value="bulk-editor"/> <input type="hidden" name="type" value="<?php echo esc_attr( $this->page_type ); ?>"/> <input type="hidden" name="orderby" value="<?php echo esc_attr( $order_by ); ?>"/> <input type="hidden" name="order" value="<?php echo esc_attr( $order ); ?>"/> <input type="hidden" name="post_type_filter" value="<?php echo esc_attr( $post_type_filter ); ?>"/> <?php if ( ! empty( $post_status ) ) { ?> <input type="hidden" name="post_status" value="<?php echo esc_attr( $post_status ); ?>"/> <?php } ?> <?php } ?> <?php $this->extra_tablenav( $which ); $this->pagination( $which ); ?> <br class="clear"/> <?php if ( $which === 'top' ) { ?> </form> <?php } ?> </div> <?php }