Support » Plugin: Grid » How can I disable a Grid Box Type?

Viewing 2 replies - 1 through 2 (of 2 total)
  • By using the action grid_boxes_search.

    Example:

    
    add_action( 'grid_boxes_search', function($result, $grid_id=null, $post_id=null) {
        $final_results = [];
        $allowed_types = ["media", "posts", "facebook_feed", "post", "my_type"];
        foreach ($result as $item) {
            if (in_array($item['type'], $allowed_types)) {
                array_push($final_results, $item);
            }
        }
        return $final_results;
    });
    
    • This reply was modified 2 years, 3 months ago by  philippze.
    Plugin Author EdwardBock

    (@edwardbock)

    Hey philippze,

    that’s totally right. Alternatively one can use the elements trash plugin.

    https://wordpress.org/plugins/grid-element-trash/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How can I disable a Grid Box Type?’ is closed to new replies.