WP_List_Table::_js_vars()publicWP 3.1.0

Sends required variables to JavaScript land.

Метод класса: WP_List_Table{}

Хуков нет.

Возвращает

null. Ничего (null).

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

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

Список изменений

С версии 3.1.0 Введена.

Код WP_List_Table::_js_vars() 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 ) );
}