Yoast\WP\SEO\Generators\Schema\Third_Party
Events_Calendar_Schema::get_month_events() private Yoast 1.0
Get an array of events for the requested month.
{} Это метод класса: Events_Calendar_Schema{}
Хуков нет.
Возвращает
Массив. An array of posts of the custom post type event.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_month_events();
Код Events_Calendar_Schema::get_month_events() Events Calendar Schema::get month events Yoast 15.6.2
private function get_month_events() {
$wp_query = \tribe_get_global_query_object();
$event_date = $wp_query->get( 'eventDate' );
$month = $event_date;
if ( empty( $month ) ) {
$month = \tribe_get_month_view_date();
}
$args = [
'eventDisplay' => 'custom',
'start_date' => Tribe__Events__Template__Month::calculate_first_cell_date( $month ),
'end_date' => Tribe__Events__Template__Month::calculate_final_cell_date( $month ),
'posts_per_page' => -1,
'hide_upcoming' => true,
];
return \tribe_get_events( $args );
}