In a plugin I’ve this filter
// Let the extensions add any menu earlier than motion buttons.
$extended_tab_listings = apply_filters('rm_after_front_tabtitle_listing',array());
foreach($extended_tab_listings as $tab){ ?>
<div class="rmtabs_head <?php echo $tab['class']; ?> rmtabs_head" title="<?php echo $tab['label'] ?>" data-rmt-tabcontent="#<?php echo $tab['id'] ?>"><?php echo $tab['icon'].' '.$tab['label'] ?></a></div>
<?php }
?>
I’ve tried passing the array to the filter as follows, by amalgamating; Utilizing multi-dimensional array with filter and https://pippinsplugins.com/a-quick-introduction-to-using-filters/. Nevertheless, it’s not working appropriately.
operate nj_add_rm_after_front_tabtitle_listing() {
// Add the titles of tabs we would like
$array =
array(
'label' => "TEST",
'class' => "my-class",
'icon' => 'my-icon',
'id' => '123',
);
return $array;
}
add_filter('rm_after_front_tabtitle_listing', 'nj_add_rm_after_front_tabtitle_listing');
What’s the appropriate methodology to move the variables?