ACF.php
2 days ago
BeaverBuilder.php
2 days ago
BuddyPress.php
2 days ago
EventsCalendar.php
2 days ago
Filter.php
2 days ago
GravityForms.php
2 days ago
IntegrationRepository.php
2 days ago
JetEngine.php
2 days ago
MediaLibraryAssistant.php
2 days ago
MetaBox.php
2 days ago
Pods.php
2 days ago
RankMath.php
2 days ago
SeoPress.php
2 days ago
Types.php
2 days ago
WooCommerce.php
2 days ago
YoastSeo.php
2 days ago
Pods.php
42 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\Integration; |
| 6 | |
| 7 | use AC\Screen; |
| 8 | use AC\Type\Integration; |
| 9 | use AC\Type\Url\Site; |
| 10 | |
| 11 | final class Pods extends Integration |
| 12 | { |
| 13 | public function __construct() |
| 14 | { |
| 15 | parent::__construct( |
| 16 | 'ac-addon-pods', |
| 17 | __('Pods', 'codepress-admin-columns'), |
| 18 | 'assets/images/addons/pods.png', |
| 19 | __( |
| 20 | 'Show your Pods fields as list table columns. Inline edit field values, filter by any Pod field, and keep your custom content types organized at scale.', |
| 21 | 'codepress-admin-columns' |
| 22 | ), |
| 23 | null, |
| 24 | new Site(Site::PAGE_ADDON_PODS) |
| 25 | ); |
| 26 | } |
| 27 | |
| 28 | public function is_plugin_active(): bool |
| 29 | { |
| 30 | return function_exists('pods'); |
| 31 | } |
| 32 | |
| 33 | public function show_notice(Screen $screen): bool |
| 34 | { |
| 35 | return in_array($screen->get_id(), [ |
| 36 | 'toplevel_page_pods', |
| 37 | 'pods-admin_page_pods-settings', |
| 38 | ]); |
| 39 | } |
| 40 | |
| 41 | } |
| 42 |