WP_List_Table::_js_vars()publicWP 3.1.0

Sends required variables to JavaScript land.

Method of the class: WP_List_Table{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_List_Table = new WP_List_Table();
$WP_List_Table->_js_vars();

Changelog

Since 3.1.0 Introduced.

WP_List_Table::_js_vars() code WP 6.5.2

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 ) );
}