contact-forms
11 months ago
contact-forms.php
11 months ago
fluent-booking.php
9 months ago
index.php
1 month ago
newsletters.php
11 months ago
recommendation-page-post-type.php
11 months ago
recommendations-trait.php
3 months ago
siteleads.php
3 months ago
index.php
70 lines
| 1 | <?php |
| 2 | use Kubio\Flags; |
| 3 | |
| 4 | |
| 5 | require_once __DIR__ . '/recommendations-trait.php'; |
| 6 | require_once __DIR__ . '/contact-forms.php'; |
| 7 | require_once __DIR__ . '/newsletters.php'; |
| 8 | require_once __DIR__ . '/fluent-booking.php'; |
| 9 | require_once __DIR__ . '/siteleads.php'; |
| 10 | require_once __DIR__ . '/recommendation-page-post-type.php'; |
| 11 | |
| 12 | function kubio_get_recommendations_settings() { |
| 13 | return array( |
| 14 | 'contactForm' => array( |
| 15 | 'pluginIsActive' => kubio_is_recommendation_contact_form_plugin_active(), |
| 16 | 'inited' => Flags::getSetting( 'contactFormsInstalled', false ), |
| 17 | 'itemsList' => array(), |
| 18 | ), |
| 19 | 'newsletters' => array( |
| 20 | 'pluginIsActive' => kubio_is_recommendation_newsletter_plugin_active(), |
| 21 | 'inited' => Flags::getSetting( 'newslettersInstalled', false ), |
| 22 | 'itemsList' => array(), |
| 23 | ), |
| 24 | 'fluentBooking' => array( |
| 25 | 'pluginIsActive' => kubio_is_fluent_booking_plugin_active(), |
| 26 | 'inited' => Flags::getSetting( 'fluentBookingInstalled', false ), |
| 27 | 'itemsList' => array(), |
| 28 | ), |
| 29 | 'siteleads' => array( |
| 30 | 'proIsInstalled' => kubio_is_siteleads_pro_plugin_installed(), |
| 31 | 'pluginIsActive' => kubio_is_siteleads_plugin_active(), |
| 32 | 'pluginIsInstalled' => kubio_is_siteleads_plugin_installed(), |
| 33 | 'inited' => Flags::getSetting( 'siteleadsInstalled', false ), |
| 34 | 'itemsList' => kubio_get_siteleads_widgets(), |
| 35 | 'previewNonce' => wp_create_nonce( 'events_nonce' ), |
| 36 | ), |
| 37 | ); |
| 38 | } |
| 39 | add_filter( |
| 40 | 'kubio/kubio-utils-data/extras', |
| 41 | function ( $utils_data ) { |
| 42 | |
| 43 | $utils_data['recommendations'] = isset( $utils_data['recommendations'] ) ? $utils_data['recommendations'] : array(); |
| 44 | |
| 45 | $utils_data['recommendations'] = array_merge( |
| 46 | $utils_data['recommendations'], |
| 47 | array( |
| 48 | 'displayButtonActionsOptions' => true, |
| 49 | ) |
| 50 | ); |
| 51 | |
| 52 | return $utils_data; |
| 53 | } |
| 54 | ); |
| 55 | |
| 56 | //add_action( |
| 57 | // 'kubio/after_activation', |
| 58 | // function () { |
| 59 | // Flags::setSetting( 'displayButtonActionsOptions', true ); |
| 60 | // } |
| 61 | //); |
| 62 | |
| 63 | |
| 64 | add_action( |
| 65 | 'after_switch_theme', |
| 66 | function () { |
| 67 | kubio_import_recommendation_page_post_type_template( false ); |
| 68 | } |
| 69 | ); |
| 70 |