WP_List_Table::_js_vars()

In this article

Sends required variables to JavaScript land.

More Information

It outputs key Javascript variables that were dynamically created by the class.

Source

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

VersionDescription
3.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.