ACF.php
3 months ago
BeaverBuilder.php
3 months ago
BuddyPress.php
3 months ago
EventsCalendar.php
3 months ago
Filter.php
3 months ago
GravityForms.php
3 months ago
IntegrationRepository.php
3 months ago
JetEngine.php
3 months ago
MediaLibraryAssistant.php
3 months ago
MetaBox.php
3 months ago
Pods.php
3 months ago
RankMath.php
3 months ago
SeoPress.php
3 months ago
Types.php
3 months ago
WooCommerce.php
3 months ago
YoastSeo.php
3 months ago
ACF.php
41 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AC\Integration; |
| 4 | |
| 5 | use AC\Screen; |
| 6 | use AC\Type\Integration; |
| 7 | use AC\Type\Url\External; |
| 8 | use AC\Type\Url\Site; |
| 9 | |
| 10 | final class ACF extends Integration |
| 11 | { |
| 12 | |
| 13 | public function __construct() |
| 14 | { |
| 15 | parent::__construct( |
| 16 | 'ac-addon-acf', |
| 17 | __('Advanced Custom Fields', 'codepress-admin-columns'), |
| 18 | 'assets/images/addons/acf-v2.png', |
| 19 | __( |
| 20 | 'See every ACF field directly in your list table - and edit values without opening a single post. Sort, filter, and bulk edit across all field types including repeaters, groups, and relationships.', |
| 21 | 'codepress-admin-columns' |
| 22 | ), |
| 23 | new External('https://www.advancedcustomfields.com'), |
| 24 | new Site(Site::PAGE_ADDON_ACF) |
| 25 | ); |
| 26 | } |
| 27 | |
| 28 | public function is_plugin_active(): bool |
| 29 | { |
| 30 | return class_exists('acf', false) || class_exists('ACF', false); |
| 31 | } |
| 32 | |
| 33 | public function show_notice(Screen $screen): bool |
| 34 | { |
| 35 | return in_array($screen->get_id(), [ |
| 36 | 'edit-acf-field-group', |
| 37 | 'acf-field-group', |
| 38 | ]); |
| 39 | } |
| 40 | |
| 41 | } |