Adding additional row actions using mbct_{$model}_row_actions

Support MB Custom Table Adding additional row actions using mbct_{$model}_row_actions

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

    Hi,

    We need to add some additional row actions but the hook only passes the actions array and not the $item['ID']. Can you tell me how to get this parameter in the example function below?

    
    add_filter('mbct_event_row_actions', 'indigo_event_row_actions');
    
    function indigo_event_row_actions($actions) {
      $actions['view'] = '<a href="">View</a>'; // Item ID needed here...
      return $actions;
    }
    

    Cheers,

    Will

    #36348
    Long NguyenLong Nguyen
    Moderator

    Hi Will,

    Thanks for your feedback.

    I will inform the development team to add passed arguments to this filter hook to use the ID. I think it should be:

    apply_filters( "mbct_{$this->model->name}_row_actions", $actions, $item, $column_name, $primary, $this );
    
    #36354
    wgstjfwgstjf
    Participant

    Thanks for that, really appreciate it. Any chance they can resolve this issue at the same time? https://support.metabox.io/topic/mbct_after_add-object_id-empty/#post-35871

    Hope it's soon as we are working on a live project that needs this functionality. 🙂

    Cheers,

    Will

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