| Server IP : 146.59.209.152 / Your IP : 216.73.216.46 Web Server : Apache System : Linux webm005.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : infrafs ( 43850) PHP Version : 8.2.29 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/infrafs/bike/wp-content/plugins/colibri-page-builder/extend-builder/api/ |
Upload File : |
<?php
namespace ExtendBuilder;
function wp_colibri_v1_newsletter_get_default_shortcode()
{
if(!colibri_user_can_customize()) {
return new \WP_REST_Response(null, 401);
}
return get_mailchimp_form_shortcode();
}
add_action('rest_api_init', function () {
register_rest_route('colibri/v1', '/newsletter/default-shortcode', array(
'methods' => 'GET',
'callback' => '\ExtendBuilder\wp_colibri_v1_newsletter_get_default_shortcode',
'permission_callback' => function () {
return current_user_can( 'edit_theme_options' );
}
));
});