Page_API::get_list_of_pages( boolean $all_data = false )
Get the listing of Facebook Pages.
Contents
Parameters
- $all_data
-
(boolean) (Optional) Whether to return all page data, default is only name and status.
Default value: false
Return
(TribeEventsVirtualMeetingsFacebookarray<string|TribeEventsVirtualMeetingsFacebookstring>) An array of all the Facebook Pages.
Source
File: src/Tribe/Meetings/Facebook/Page_API.php
public function get_list_of_pages( $all_data = false ) {
// Get list of pages.
$list_of_pages = get_option( $this->all_page_key, [] );
if ( empty( $all_data ) ) {
return $list_of_pages;
}
// Add all the data to the list.
foreach ( $list_of_pages as $local_id => $page ) {
$page_data = $this->get_page_by_id( $local_id );
$list_of_pages[ $local_id ] = $page_data;
}
return $list_of_pages;
}
Changelog
| Version | Description |
|---|---|
| 1.7.0 | Introduced. |