'', 'pending' => '-approvals', 'agents' => '-agents', 'policies' => '-policies', 'exposure' => '-exposure', 'settings' => '-settings', ); /** * Every section's label, keyed by id, in menu order. * * @return array */ public static function all(): array { return array( 'ledger' => __( 'Activity Ledger', 'agentic-daisy-ai-agent-firewall' ), 'pending' => __( 'Approvals', 'agentic-daisy-ai-agent-firewall' ), 'agents' => __( 'Agents', 'agentic-daisy-ai-agent-firewall' ), 'policies' => __( 'Policies', 'agentic-daisy-ai-agent-firewall' ), 'exposure' => __( 'Exposure Scan', 'agentic-daisy-ai-agent-firewall' ), 'settings' => __( 'Settings', 'agentic-daisy-ai-agent-firewall' ), ); } /** * A section's page slug. * * @param string $id Section id; an unknown one is the ledger. */ public static function slug( string $id ): string { return AdminPage::SLUG . ( self::SUFFIXES[ $id ] ?? '' ); } /** * A section's admin URL. * * @param string $id Section id. */ public static function url( string $id ): string { return admin_url( 'admin.php?page=' . self::slug( $id ) ); } /** * The section an old `&tab=` link on the main page should open, or null * when the main page itself is right. * * @param string $tab The tab parameter. */ public static function redirect_for_tab( string $tab ): ?string { return 'ledger' !== $tab && isset( self::SUFFIXES[ $tab ] ) ? $tab : null; } }