Aggregate.php
3 days ago
BeaverBuilderGroups.php
3 days ago
BuddyPressGroups.php
3 days ago
DefaultGroups.php
3 days ago
EventsCalendarGroups.php
3 days ago
GravityFormsGroups.php
3 days ago
JetEngineGroups.php
3 days ago
MediaLibraryAssistantGroups.php
3 days ago
MetaBoxGroups.php
3 days ago
WooCommerceGroups.php
3 days ago
EventsCalendarGroups.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\Admin\MenuGroupFactory; |
| 6 | |
| 7 | use AC\Admin\MenuGroupFactory; |
| 8 | use AC\Admin\Type\MenuGroup; |
| 9 | use AC\TableScreen; |
| 10 | use AC\TableScreen\Post; |
| 11 | |
| 12 | class EventsCalendarGroups implements MenuGroupFactory |
| 13 | { |
| 14 | public function create(TableScreen $table_screen): ?MenuGroup |
| 15 | { |
| 16 | if ( |
| 17 | $table_screen instanceof Post && |
| 18 | in_array( |
| 19 | (string)$table_screen->get_post_type(), |
| 20 | ['tribe_events', 'tribe_organizer', 'tribe_venue', 'tribe_event_series'], |
| 21 | true |
| 22 | ) |
| 23 | ) { |
| 24 | return new MenuGroup( |
| 25 | 'events-calendar', |
| 26 | __('Events Calendar', 'codepress-admin-columns'), |
| 27 | 14, |
| 28 | 'dashicons-calendar-alt' |
| 29 | ); |
| 30 | } |
| 31 | |
| 32 | return null; |
| 33 | } |
| 34 | |
| 35 | } |
| 36 |