if ( !$args['plural'] )
$args['plural'] = $screen->base;
+ $args['plural'] = sanitize_key( $args['plural'] );
+ $args['singular'] = sanitize_key( $args['singular'] );
+
$this->_args = $args;
if ( $args['ajax'] ) {
}
/**
- * Display the bulk actions dropdown.
+ * Display the list of views available on this table.
*
* @since 3.1.0
* @access public
* @access protected
*
* @param array $actions The list of actions
- * @param bool $always_visible Wether the actions should be always visible
+ * @param bool $always_visible Whether the actions should be always visible
* @return string
*/
function row_actions( $actions, $always_visible = false ) {
* @access private
*/
function _js_vars() {
+ $current_screen = get_current_screen();
+
$args = array(
- 'class' => get_class( $this ),
- 'screen' => get_current_screen()
+ 'class' => get_class( $this ),
+ 'screen' => array(
+ 'id' => $current_screen->id,
+ 'base' => $current_screen->base,
+ )
);
printf( "<script type='text/javascript'>list_args = %s;</script>\n", json_encode( $args ) );