| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
// Add "AI Assistant" to the shared top nav every other WPFunnels admin page |
| 8 |
// uses (admin/partials/dashboard-nav.php), so this page reads as part of the |
| 9 |
// plugin rather than a standalone island. |
| 10 |
add_filter( |
| 11 |
'wpfnl_dashboard_nav_lists', |
| 12 |
function ( $items ) { |
| 13 |
$items['ai_assistant'] = [ |
| 14 |
'title' => __( 'AI Assistant', 'wpfnl' ), |
| 15 |
'icon' => 'ai-assistant-icon', |
| 16 |
'page' => defined( 'WPFNL_AI_FUNNEL_PAGE_SLUG' ) ? WPFNL_AI_FUNNEL_PAGE_SLUG : 'wpfnl-ai-funnel', |
| 17 |
]; |
| 18 |
return $items; |
| 19 |
} |
| 20 |
); |
| 21 |
|
| 22 |
?> |
| 23 |
|
| 24 |
<div class="wpfnl-dashboard wpfnl-ai-funnel-admin-page"> |
| 25 |
<nav class="wpfnl-dashboard__nav"> |
| 26 |
<?php require_once WPFNL_DIR . '/admin/partials/dashboard-nav.php'; ?> |
| 27 |
</nav> |
| 28 |
|
| 29 |
<div class="dashboard-nav__content"> |
| 30 |
<div id="wpfnl-ai-copilot"></div> |
| 31 |
</div> |
| 32 |
</div> |
| 33 |
|