bulk_actions example


    protected function display_tablenav( $which ) {
        ?> <div class="tablenav <?php echo esc_attr( $which ); ?>"> <?php if ( 'bottom' === $which ) : ?> <div class="alignright"> <button type="button" name="revoke-all-application-passwords" id="revoke-all-application-passwords" class="button delete"><?php _e( 'Revoke all application passwords' ); ?></button> </div> <?php endif; ?> <div class="alignleft actions bulkactions"> <?php $this->bulk_actions( $which ); ?> </div> <?php             $this->extra_tablenav( $which );
            $this->pagination( $which );
            ?> <br class="clear" /> </div> <?php     }

    /** * Generates content for a single row of the table. * * @since 5.6.0 * * @param array $item The current item. */

    protected function display_tablenav( $which ) {
        if ( 'top' === $which ) {
            wp_nonce_field( 'bulk-' . $this->_args['plural'] );
        }
        ?> <div class="tablenav <?php echo esc_attr( $which ); ?>"> <?php if ( $this->has_items() ) : ?> <div class="alignleft actions bulkactions"> <?php $this->bulk_actions( $which ); ?> </div> <?php         endif;
        $this->extra_tablenav( $which );
        $this->pagination( $which );
        ?> <br class="clear" /> </div> <?php     }

    
/** * @global string $status * @param string $which */
    public function bulk_actions( $which = '' ) {
        global $status;

        if ( in_array( $status, array( 'mustuse', 'dropins' ), true ) ) {
            return;
        }

        parent::bulk_actions( $which );
    }

    /** * @global string $status * @param string $which */
    protected function extra_tablenav( $which ) {
        global $status;

        if ( ! in_array( $status, array( 'recently_activated', 'mustuse', 'dropins' ), true ) ) {
            return;
        }
Home | Imprint | This part of the site doesn't use cookies.