WP_Application_Passwords_List_Table
- Since
- 5.6.0
- Source
wp-admin/includes/class-wp-application-passwords-list-table.php:17
Class for displaying the list of application password items.
Hooks fired · 2
Every hook that fires from inside WP_Application_Passwords_List_Table, in the order it appears in the class, grouped by the method that fires it.
Methods · 12
- get_columns()Gets the list of columns.
- prepare_items()Prepares the list of items for displaying.
- column_name()Handles the name column output.
- column_created()Handles the created column output.
- column_last_used()Handles the last used column output.
- column_last_ip()Handles the last ip column output.
- column_revoke()Handles the revoke column output.
- column_default()Generates content for a single row of the table
- display_tablenav()Generates custom table navigation to prevent conflicting nonces.
- single_row()Generates content for a single row of the table.
- get_default_primary_column_name()Gets the name of the default primary column.
- print_js_template_row()Prints the JavaScript template for the new row item.
Source
class WP_Application_Passwords_List_Table extends WP_List_Table { /** * Gets the list of columns. * * @since 5.6.0 * * @return string[] Array of column titles keyed by their column name. */ public function get_columns() { return array( 'name' => __( 'Name' ), 'created' => __( 'Created' ), 'last_used' => __( 'Last Used' ), 'last_ip' => __( 'Last IP' ), 'revoke' => __( 'Revoke' ), ); } /** * Prepares the list of items for displaying. * * @since 5.6.0 * * @global int $user_id User ID. */ public function prepare_items() { global $user_id; $this->items = array_reverse( WP_Application_Passwords::get_user_application_passwords( $user_id ) ); } /** * Handles the name column output. * * @since 5.6.0 * * @param array $item The current application password item. */ public function column_name( $item ) { echo esc_html( $item['name'] ); } /** * Handles the created column output. * * @since 5.6.0 * * @param array $item The current application password item. */ public function column_created( $item ) { if ( empty( $item['created'] ) ) { echo '—'; } else { echo date_i18n( __( 'F j, Y' ), $item['created'] ); } } /** * Handles the last used column output. * * @since 5.6.0 * * @param array $item The current application password item. */ public function column_last_used( $item ) { if ( empty( $item['last_used'] ) ) { echo '—'; } else { echo date_i18n( __( 'F j, Y' ), $item['last_used'] ); } } /** * Handles the last ip column output. * * @since 5.6.0 * * @param array $item The current application password item. */ public function column_last_ip( $item ) {History
Introduced in 5.6.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, from
src/wp-admin/includes/class-wp-application-passwords-list-table.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.