I'm creating a custom WP Admin Bar menu item with custom HTML inside the dropdowns. Referring to this: https://codex.wordpress.org/Class_Reference/WP_Admin_Bar/add_menu
the HTML i want to use is quite extensive so I created a separate php file for that HTML. Then I'm trying to include that PHP file inside the menu item, but it's not printing/echoing properly. Right now, all the shows inside the menu item is a 1, and the content is getting printed later on in the DOM of the page.
Here's the code I have:
$admin_bar->add_menu(
array(
'id' => 'dh_row_layouts-content',
'parent' => 'dh_row_layouts',
'meta' => array(
'class' => 'dh_hack',
'html' => include('docs/row_layouts.php'),
),
)
);
Any ideas?