current_section = $current_section; $this->init_menu_items(); } private function init_menu_items(): void { $rows = array( 'apps' => array( __( 'Tools', '1platform-content-ai' ), 'list-view', true ), 'toc' => array( __( 'Table of Contents', '1platform-content-ai' ), 'list-view', false ), 'internal-links' => array( __( 'Internal Links', '1platform-content-ai' ), 'admin-links', false ), 'search-console' => array( __( 'Search Console', '1platform-content-ai' ), 'cloud', false ), 'publisuites' => array( __( 'Link Building', '1platform-content-ai' ), 'money-alt', false ), 'ads-manager' => array( __( 'Ads Manager', '1platform-content-ai' ), 'megaphone', false ), 'analytics' => array( __( 'Google Analytics', '1platform-content-ai' ), 'chart-area', false ), ); $this->menu_items = array(); foreach ( $rows as $slug => list( $title, $icon, $home ) ) { $this->menu_items[ $slug ] = array( 'title' => $title, 'icon' => 'dashicons-' . $icon, 'home' => $home, ); } } public function render(): void { ?> current_section === $slug; $item_class = $is_active ? 'is-active' : ''; $parameters = ! $item['home'] ? array( 'section' => $slug ) : array(); $url = add_query_arg( $parameters, admin_url( 'admin.php?page=contai-apps' ) ); ?>