hook = add_submenu_page( Constants::ADPRESSO_SLUG, __( 'AdPresso Tools', 'adpresso' ), __( 'Tools', 'adpresso' ), adpresso_get_capability( 'use_tools' ), $this->get_id(), [ $this, 'render' ] ); } /** * Renders the complete Tools page, including tab navigation and content. * * @return void */ public function render(): void { // Instantiate the manager that handles the logic and UI rendering for the forms. $import_export_manager = Plugin::get()->globals[ ImportExportManager::class ] ?? new ImportExportManager(); $tabs = [ 'import' => __( 'Import', 'adpresso' ), 'export' => __( 'Export', 'adpresso' ), 'migration' => __( 'Migration Tools', 'adpresso' ), 'history' => __( 'Import History', 'adpresso' ), ]; // Allow add-ons to add their own tabs to the Tools page. $tabs = apply_filters( 'adpresso_tools_tabs', $tabs ); $current_tab = Params::get()->getKey( 'tab', 'import' ); $logo_url = ADPRESSO_BASE_URL . 'admin/assets/img/adpresso-logo.svg'; echo '
'; echo '' . esc_html__( 'A history of past imports with rollback options will be displayed here.', 'adpresso' ) . '
'; break; default: // Allow add-ons to render their custom tab content. do_action( 'adpresso_tools_render_tab_' . $current_tab ); break; } ?>%s