List table view messages limited

Support MB Custom Table List table view messages limitedResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #36629
    wgstjfwgstjf
    Participant

    Hi guys,

    Quick one - it looks like you only allow for 'deleted' messages on the list-table view in custom models

    
    <?php if ( rwmb_request()->get( 'model-message' ) === 'deleted' ) : ?>
    	<div id="message" class="updated notice notice-success is-dismissible"><p><?= esc_html( $this->model->labels['item_deleted'] ) ?></p></div>
    <?php endif ?>
    

    Whereas the 'edit' view allows for all types of message:

    
    <?php if ( $message ) : ?>
    	<div id="message" class="updated notice notice-success is-dismissible"><p><?= esc_html( $this->model->labels["item_$message"] ) ?></p></div>
    <?php endif ?>
    

    Can you modify the list-table view to allow for additional messages please? We need to be able to return standard messages such as 'Item updated successfully' or custom messages such as 'Item cloned successfully' or 'Item clone failed' etc.

    Cheers,

    Will

    #36635
    Long NguyenLong Nguyen
    Moderator

    Hi Will,

    Thanks for your feedback.

    I will inform the development team to consider supporting filter hooks to modify the standard messages.

    #36643
    wgstjfwgstjf
    Participant

    THanks Long, much appreciated.

    It would be great if they could also add in the ability to have custom bulk actions by modifying the get_bulk_actions() function in src/Model/ListTable.php to the following:

    
    public function get_bulk_actions() {
    	$actions = [
    		'bulk-delete' => __( 'Delete', 'mb-custom-table' ),
    	];
    	
    	$actions = apply_filters( "mbct_{$this->model->name}_bulk_actions", $actions );
    
    	return $actions;
    }
    

    It's been a while since there were updated to the MB Custom Table plugin - is it due for an update any time soon?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.