Skip to content

Commit

Permalink
Fix issue with third-party admin columns
Browse files Browse the repository at this point in the history
  • Loading branch information
jplhomer committed Dec 3, 2017
1 parent ce292bd commit cdbb42f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Admin/Columns.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ public function add($columns)
public function render($column, $id)
{
$instance = $this->model::find($id);

// Allow third-party plugins to render their own custom columns downstream
if (empty($this->args['columns'][$column])) return;

$settings = $this->args['columns'][$column];
if (!empty($settings['value']) && is_callable($settings['value'])) {
echo $settings['value']($instance);
Expand Down

0 comments on commit cdbb42f

Please sign in to comment.