]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/class-wp-list-table.php
Wordpress 3.3
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-list-table.php
index 6420ee781af322cb046f57ee0cc9f17efba0a66c..446174d4dea6409f8a2ef7381caa485b3f05732a 100644 (file)
@@ -91,6 +91,9 @@ class WP_List_Table {
                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'] ) {
@@ -229,7 +232,7 @@ class WP_List_Table {
        }
 
        /**
-        * Display the bulk actions dropdown.
+        * Display the list of views available on this table.
         *
         * @since 3.1.0
         * @access public
@@ -326,7 +329,7 @@ class WP_List_Table {
         * @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 ) {
@@ -897,9 +900,14 @@ class WP_List_Table {
         * @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 ) );