Attendee_Registration::get_page_options()
Get the pages option.
Return
(array) Key value pair for pages options.
Source
File: src/Tickets_Plus/Admin/Tabs/Attendee_Registration.php
public function get_page_options() : array { // Show invalid option, if no pages are created. $page_options = [ '' => esc_html__( 'You must create a page before using this functionality', 'event-tickets-plus' ) ]; $pages = get_pages(); if ( $pages ) { $page_options = [ '' => esc_html__( 'Choose a page or leave blank.', 'event-tickets-plus' ) ]; foreach ( $pages as $page ) { $page_options[ $page->ID ] = $page->post_title; } } return $page_options; }
Changelog
Version | Description |
---|---|
5.5.1 | Introduced. |