X7ROOT File Manager
Current Path:
/home/gfecatvj/4abetter.us/wp-content/plugins/kubio/lib/api
home
/
gfecatvj
/
4abetter.us
/
wp-content
/
plugins
/
kubio
/
lib
/
api
/
📁
..
📄
colibri.php
(13.69 KB)
📄
contact-form.php
(1.91 KB)
📄
entity.php
(683 B)
📄
get-body-class.php
(586 B)
📄
get-classic-page-template.php
(647 B)
📄
get-page-query.php
(1.52 KB)
📄
get-page-title.php
(393 B)
📄
get-post-content.php
(1.17 KB)
📄
get-post-styles.php
(859 B)
📄
index.php
(807 B)
📄
kubio-cloud.php
(2.05 KB)
📁
multilanguage
📄
page-templates.php
(640 B)
📁
recommendations
📄
save-template-parts-filter.php
(2.11 KB)
📄
subscribe-form.php
(1.06 KB)
📄
typekit.php
(866 B)
📄
update-settings-flags.php
(3.13 KB)
Editing: subscribe-form.php
<?php function kubio_subscribe_forms_by_type( WP_REST_Request $data ) { $forms = array(); if ( class_exists( '\MC4WP_Plugin' ) ) { $mailchimp_items = array(); $args = array( 'post_type' => 'mc4wp-form', 'posts_per_page' => -1, ); $data = get_posts( $args ); if ( count( $data ) === 0 ) { kubio_mailchimp_create_sample_form(); $data = get_posts( $args ); } if ( $data ) { foreach ( $data as $key ) { $mailchimp_items[] = array( 'label' => $key->post_title ?: __( 'Untitled form', 'kubio' ), 'value' => $key->ID, ); } } if ( count( $mailchimp_items ) > 0 ) { $forms['mailchimp'] = $mailchimp_items; } } return $forms; } add_action( 'rest_api_init', function () { $namespace = 'kubio/v1'; register_rest_route( $namespace, '/subscribe-form/forms_by_type', array( 'methods' => 'GET', 'callback' => 'kubio_subscribe_forms_by_type', 'permission_callback' => function () { return current_user_can( 'edit_posts' ); }, ) ); } );
Upload File
Create Folder