WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

WPSEO_Bulk_List_Table::extra_tablenav() public Yoast 1.0

Outputs extra table navigation.

{} Это метод класса: WPSEO_Bulk_List_Table{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$WPSEO_Bulk_List_Table = new WPSEO_Bulk_List_Table();
$WPSEO_Bulk_List_Table->extra_tablenav( $which );
$which(строка) (обязательный)
Table nav location (such as top).

Код WPSEO_Bulk_List_Table::extra_tablenav() Yoast 15.1.1

<?php
public function extra_tablenav( $which ) {

	if ( $which === 'top' ) {
		$post_types = get_post_types(
			[
				'public'              => true,
				'exclude_from_search' => false,
			]
		);

		$instance_type = esc_attr( $this->page_type );

		if ( is_array( $post_types ) && $post_types !== [] ) {
			global $wpdb;

			echo '<div class="alignleft actions">';

			$post_types = esc_sql( $post_types );
			$post_types = "'" . implode( "', '", $post_types ) . "'";

			$states          = get_post_stati( [ 'show_in_admin_all_list' => true ] );
			$states['trash'] = 'trash';
			$states          = esc_sql( $states );
			$all_states      = "'" . implode( "', '", $states ) . "'";

			$subquery = $this->get_base_subquery();

			$post_types = $wpdb->get_results(
				"
						SELECT DISTINCT post_type FROM {$subquery}
						WHERE post_status IN ({$all_states})
						ORDER BY 'post_type' ASC
					"
			);

			$post_type_filter = filter_input( INPUT_GET, 'post_type_filter' );
			$selected         = ( ! empty( $post_type_filter ) ) ? sanitize_text_field( $post_type_filter ) : '-1';

			$options = '<option value="-1">' . esc_html__( 'Show All Content Types', 'wordpress-seo' ) . '</option>';

			if ( is_array( $post_types ) && $post_types !== [] ) {
				foreach ( $post_types as $post_type ) {
					$obj      = get_post_type_object( $post_type->post_type );
					$options .= sprintf(
						'<option value="%2$s" %3$s>%1$s</option>',
						esc_html( $obj->labels->name ),
						esc_attr( $post_type->post_type ),
						selected( $selected, $post_type->post_type, false )
					);
				}
			}

			printf(
				'<label for="%1$s" class="screen-reader-text">%2$s</label>',
				esc_attr( 'post-type-filter-' . $instance_type ),
				esc_html__( 'Filter by content type', 'wordpress-seo' )
			);
			printf(
				'<select name="post_type_filter" id="%2$s">%1$s</select>',
				// phpcs:ignore WordPress.Security.EscapeOutput -- Reason: $options is properly escaped above.
				$options,
				esc_attr( 'post-type-filter-' . $instance_type )
			);

			submit_button( esc_html__( 'Filter', 'wordpress-seo' ), 'button', false, false, [ 'id' => 'post-query-submit' ] );
			echo '</div>';
		}
	}
}