WP_List_Table::_js_vars()
Sends required variables to JavaScript land.
More Information
It outputs key Javascript variables that were dynamically created by the class.
Source
File: wp-admin/includes/class-wp-list-table.php
public function _js_vars() {
$args = array(
'class' => get_class( $this ),
'screen' => array(
'id' => $this->screen->id,
'base' => $this->screen->base,
),
);
printf( "<script type='text/javascript'>list_args = %s;</script>\n", wp_json_encode( $args ) );
} Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_list_table/_js_vars