contact-forms
11 months ago
bubble-chat.php
11 months ago
contact-forms.php
11 months ago
fluent-booking.php
11 months ago
index.php
11 months ago
newsletters.php
11 months ago
recommendation-page-post-type.php
11 months ago
recommendations-trait.php
11 months ago
index.php
67 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__ . '/bubble-chat.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 | 'bubbleChat' => array( |
| 30 | 'pluginIsActive' => kubio_is_bubble_chat_plugin_active(), |
| 31 | 'inited' => Flags::getSetting( 'bubbleChatInstalled', false ), |
| 32 | 'itemsList' => array(), |
| 33 | ), |
| 34 | ); |
| 35 | } |
| 36 | add_filter( |
| 37 | 'kubio/kubio-utils-data/extras', |
| 38 | function ( $utils_data ) { |
| 39 | |
| 40 | $utils_data['recommendations'] = isset( $utils_data['recommendations'] ) ? $utils_data['recommendations'] : array(); |
| 41 | |
| 42 | $utils_data['recommendations'] = array_merge( |
| 43 | $utils_data['recommendations'], |
| 44 | array( |
| 45 | 'displayButtonActionsOptions' => Flags::getSetting( 'displayButtonActionsOptions', false ), |
| 46 | ) |
| 47 | ); |
| 48 | |
| 49 | return $utils_data; |
| 50 | } |
| 51 | ); |
| 52 | |
| 53 | add_action( |
| 54 | 'kubio/after_activation', |
| 55 | function () { |
| 56 | Flags::setSetting( 'displayButtonActionsOptions', true ); |
| 57 | } |
| 58 | ); |
| 59 | |
| 60 | |
| 61 | add_action( |
| 62 | 'after_switch_theme', |
| 63 | function () { |
| 64 | kubio_import_recommendation_page_post_type_template( false ); |
| 65 | } |
| 66 | ); |
| 67 |