__( 'Course Data', 'learnpress' ), 'assign_course' => __( 'Assign/Unassigned Course', 'learnpress' ), 'database' => __( 'Database', 'learnpress' ), 'template' => __( 'Templates', 'learnpress' ), 'lp_beta_version' => __( 'LearnPress Beta Version', 'learnpress' ), 'cache' => __( 'Cache', 'learnpress' ), ) ); } /** * Map of tool tabs to view paths. * * @return array */ private static function get_tab_views(): array { return apply_filters( 'learn-press/admin/tools-tab-views', array( 'course' => 'tools/html-course', 'database' => 'tools/html-database', 'template' => 'tools/html-template', ) ); } /** * Render the LearnPress Tools page. * * @return void */ public function html_page() { $tabs = self::get_tabs(); $tab_views = self::get_tab_views(); $tab = isset( $_REQUEST['tab'] ) ? LP_Helper::sanitize_params_submitted( $_REQUEST['tab'] ) : ''; $tab = array_key_exists( $tab, $tabs ) ? $tab : ( array_key_first( $tabs ) ?? '' ); ob_start(); ?>