Make WordPress Core


Ignore:
Timestamp:
09/22/2010 12:10:39 AM (13 years ago)
Author:
scribu
Message:

Introduce WP_List_Table::current_action() and use throughout admin list screens. See #14579

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/default-list-tables.php

    r15633 r15642  
    214214<?php
    215215        }
     216    }
     217
     218    function current_action() {
     219        if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
     220            return 'delete_all';
     221
     222        return parent::current_action();
    216223    }
    217224
     
    10811088    }
    10821089
     1090    function current_action() {
     1091        if ( isset( $_REQUEST['find_detached'] ) )
     1092            return 'find_detached';
     1093
     1094        if ( isset( $_REQUEST['found_post_id'] ) && isset( $_REQUEST['media'] ) )
     1095            return 'attach';
     1096
     1097        if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
     1098            return 'delete_all';
     1099
     1100        return parent::current_action();
     1101    }
     1102
    10831103    function has_items() {
    10841104        return have_posts();
     
    14831503    }
    14841504
     1505    function current_action() {
     1506        if ( isset( $_REQUEST['action'] ) && isset( $_REQUEST['delete_tags'] ) && ( 'delete' == $_REQUEST['action'] || 'delete' == $_REQUEST['action2'] ) )
     1507            return 'bulk-delete';
     1508
     1509        return parent::current_action();
     1510    }
     1511
    14851512    function get_columns() {
    14861513        global $taxonomy;
     
    18611888    </div>
    18621889<?php
     1890    }
     1891   
     1892    function current_action() {
     1893        if ( isset($_REQUEST['changeit']) && !empty($_REQUEST['new_role']) )
     1894            return 'promote';
     1895
     1896        return parent::current_action();
    18631897    }
    18641898
     
    22132247        do_action( 'manage_comments_nav', $comment_status );
    22142248        echo '</div>';
     2249    }
     2250
     2251    function current_action() {
     2252        if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
     2253            return 'delete_all';
     2254
     2255        return parent::current_action();
    22152256    }
    22162257
     
    34593500    }
    34603501
     3502    function current_action() {
     3503        if ( isset($_POST['clear-recent-list']) )
     3504            return 'clear-recent-list';
     3505
     3506        return parent::current_action();
     3507    }
     3508
    34613509    function display_rows() {
    34623510        global $status, $page;
Note: See TracChangeset for help on using the changeset viewer.