WP_List_Table::_js_vars() – Send required variables to JavaScript land

You appear to be a bot. Output may be restricted

Description

Sends required variables to JavaScript land.

Usage

WP_List_Table::_js_vars();

Parameters

Returns

void

Source

File name: wordpress/wp-admin/includes/class-wp-list-table.php
Lines:

1 to 11 of 11
  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 ) );
  }
 

 View on GitHub View on Trac