00P3,qUߎڿ GCB_CONTROLl(1,U 멝B00-qUE_RGCB_CRjc,U 멝B00-qU^{k GCB_EXTENDwOq,U 멝B000-qU) 1GCB_L*īH,U 멝B00-qUb_RGCB_LFV`,U 멝B00p-qUr_RGCB_LV-ݵ+dQ,U 멝B00-qUOGCB_LVT6?SB_STERMp ,U 멝B00-qU%kX?SB_UPPERt Q ,U 멝B } /** * Creates an array of resource sections with relevant content for each section. * * Each section can be filtered independently or as a complete set. * * @since 6.8.2 * @since 6.13.2 Refactored using the Link_Section_Builder and FAQ_Section_Builder classes. * * @return array The filtered resource sections array. */ public function create_resource_sections(): array { /** @var Link_Section_Builder $link_builder */ $link_builder = tribe( Link_Section_Builder::class ); /** @var FAQ_Section_Builder $faq_builder */ $faq_builder = tribe( FAQ_Section_Builder::class ); // Build all sections. $this->build_getting_started_section( $link_builder ); $this->build_customizations_section( $link_builder ); $this->build_common_issues_section( $link_builder ); $this->build_faq_section( $faq_builder ); // Get all built sections. return array_merge( $link_builder::get_all_sections(), $faq_builder::get_all_sections() ); } /** * Builds the Getting Started section. * * @since 6.13.2 * * @param Link_Section_Builder $builder The section builder instance. * * @return void */ protected function build_getting_started_section( Link_Section_Builder $builder ): void { $builder::make( _x( 'Getting Started', 'Section title', 'the-events-calendar' ), 'getting_started' ) ->set_description( _x( 'Easy to follow step-by-step instructions to make the most out of your calendar.', 'Section description', 'the-events-calendar' ) ) ->add_link( _x( 'The Events Calendar', 'The Events Calendar title', 'the-events-calendar' ), 'https://evnt.is/1ap9', $this->get_icon_url( 'tec_icon' ) ) ->add_link( _x( 'Event Aggregator', 'Event Aggregator title', 'the-events-calendar' ), 'https://evnt.is/1apc', $this->get_icon_url( 'ea_icon' ) ) ->add_link( _x( 'Filter Bar', 'Filter Bar title', 'the-events-calendar' ), 'https://evnt.is/1apd', $this->get_icon_url( 'fbar_icon' ) ) ->build(); } /** * Builds the Customizations section. * * @since 6.13.2 * * @param Link_Section_Builder $builder The section builder instance. * * @return void */ protected function build_customizations_section( Link_Section_Builder $builder ): void { $builder::make( _x( 'Customizations', 'Section title', 'the-events-calendar' ), 'customizations' ) ->set_description( _x( 'Tips and tricks on making your calendar just the way you want it.', 'Section description', 'the-events-calendar' ) ) ->add_link( _x( 'Getting started with customization', 'Customization article', 'the-events-calendar' ), 'https://evnt.is/1apf', $this->get_icon_url( 'article_icon' ) ) ->add_link( _x( 'Highlighting events', 'Highlighting events article', 'the-events-calendar' ), 'https://evnt.is/1apg', $this->get_icon_url( 'article_icon' ) ) ->add_link( _x( 'Customizing template files', 'Customizing templates article', 'the-events-calendar' ), 'https://evnt.is/1aph', $this->get_icon_url( 'article_icon' ) ) ->add_link( _x( 'Customizing CSS', 'Customizing CSS article', 'the-events-calendar' ), 'https://evnt.is/1api', $this->get_icon_url( 'article_icon' ) ) ->build(); } /** * Builds the Common Issues section. * * @since 6.13.2 * * @param Link_Section_Builder $builder The section builder instance. * * @return void */ protected function build_common_issues_section( Link_Section_Builder $builder ): void { $builder::make( _x( 'Common Issues', 'Section title', 'the-events-calendar' ), 'common_issues' ) ->set_description( sprintf( /* translators: %s is the link to the AI Chatbot */ _x( 'Having trouble? Find solutions to common issues or ask our %s.', 'Common issues section description', 'the-events-calendar' ), '' . _x( 'AI Chatbot', 'AI Chatbot link text', 'the-events-calendar' ) . '' ) ) ->add_link( _x( 'Known issues', 'Known issues article', 'the-events-calendar' ), 'https://evnt.is/1apj', $this->get_icon_url( 'article_icon' ) ) ->add_link( _x( 'Release notes', 'Release notes article', 'the-events-calendar' ), 'https://evnt.is/1apk', $this->get_icon_url( 'article_icon' ) ) ->add_link( _x( 'Integrations', 'Integrations article', 'the-events-calendar' ), 'https://evnt.is/1apl', $this->get_icon_url( 'article_icon' ) ) ->add_link( _x( 'Shortcodes', 'Shortcodes article', 'the-events-calendar' ), 'https://evnt.is/1apm', $this->get_icon_url( 'article_icon' ) ) ->build(); } /** * Builds the FAQ section. * * @since 6.13.2 * * @param FAQ_Section_Builder $builder The section builder instance. * * @return void */ protected function build_faq_section( FAQ_Section_Builder $builder ): void { $builder::make( 'FAQ', 'faq' ) ->set_description( _x( 'Frequently Asked Questions', 'FAQ section description', 'the-events-calendar' ) ) ->add_faq( _x( 'Can I have more than one calendar?', 'FAQ more than one calendar question', 'the-events-calendar' ), _x( 'No, but you can use event categories or tags to display certain events.', 'FAQ more than one calendar answer', 'the-events-calendar' ), _x( 'Learn More', 'Link to more than one calendar article', 'the-events-calendar' ), 'https://evnt.is/1arh' ) ->add_faq( _x( 'What do I get with Events Calendar Pro?', 'FAQ what is in Calendar Pro question', 'the-events-calendar' ), _x( 'Events Calendar Pro enhances The Events Calendar with additional views, powerful shortcodes, and a host of premium features.', 'FAQ what is in Calendar Pro answer', 'the-events-calendar' ), _x( 'Learn More', 'Link to what is in Calendar Pro article', 'the-events-calendar' ), 'https://evnt.is/1arj' ) ->add_faq( _x( 'How do I sell event tickets?', 'FAQ how to sell event tickets question', 'the-events-calendar' ), _x( 'Get started with tickets and RSVPs using our free Event Tickets plugin.', 'FAQ how to sell event tickets answer', 'the-events-calendar' ), _x( 'Learn More', 'Link to what is in Event Tickets article', 'the-events-calendar' ), 'https://evnt.is/1ark' ) ->add_faq( _x( 'Where can I find a list of available shortcodes?', 'FAQ where are the shortcodes question', 'the-events-calendar' ), _x( 'Our plugins offer a variety of shortcodes, allowing you to easily embed the calendar, display an event countdown clock, show attendee details, and much more.', 'FAQ where are the shortcodes answer', 'the-events-calendar' ), _x( 'Learn More', 'Link to the shortcodes article', 'the-events-calendar' ), 'https://evnt.is/1arl' ) ->build(); } /** * Retrieves the URL for a specified icon. * * @since 6.8.2 * * @param string $icon_name The name of the icon to retrieve. * * @return string The URL of the specified icon, or an empty string if the icon does not exist. */ public function get_icon_url( string $icon_name ): string { return $this->icons[ $icon_name ] ?? ''; } /** * Get the license validity and telemetry opt-in status. * * @since 6.8.2 * * @return array Contains 'has_valid_license' and 'is_opted_in' status. */ public function get_license_and_opt_in_status(): array { $has_valid_license = Tribe__PUE__Checker::is_any_license_valid(); $common_telemetry = tribe( Telemetry::class ); $is_opted_in = $common_telemetry->calculate_optin_status(); return [ 'has_valid_license' => $has_valid_license, 'is_opted_in' => $is_opted_in, ]; } /** * Determines if the current admin page is the Help Hub page. * * Checks the 'page' request variable against the Help Hub settings slug to confirm * if the user is currently viewing the Help Hub admin page. * * @since 6.13.2 * * @return bool True if the current page is the Help Hub, false otherwise. */ public function is_help_hub_page(): bool { $page = tec_get_request_var( 'page' ); return $this->get_help_hub_slug() === $page; } /** * Get the Help Hub id. * * @return string */ public function get_help_hub_id(): string { return self::HELP_HUB_PAGE_ID; } /** * Retrieve the Help Hub slug. * * @return string The slug for the Help Hub. */ public function get_help_hub_slug(): string { return Settings::$help_hub_slug; } }