0, 'message' => __( 'Access denied', '3veta' ) ], JSON_NUMERIC_CHECK ); } if ( empty( $_POST['url'] ) ) { echo json_encode( [ 'status' => 0, 'message' => __( 'Please fill the your booking page URL.', '3veta' ) ], JSON_NUMERIC_CHECK ); } $url = esc_url_raw( $_POST['url'] . '.3veta.com/booking', [ 'https', 'http' ] ); $status = update_option( '3veta_booking_page', $url ); if ( ! $status ) { $message = __( 'There was a problem, please try again', '3veta' ); $status = 0; } else { $message = __( 'Saved!', '3veta' ); $status = 1; } echo json_encode( [ 'status' => $status, 'message' => $message ], JSON_NUMERIC_CHECK ); wp_die(); } add_action( 'wp_ajax_veta_save_booking_page', 'veta_save_booking_page_name' ); /** * Checks if the current page's content has the full page shortcode for 3veta and adds a loader for the time the iframe is loaded * * @param string $content * * @return mixed|string */ function veta_add_loader_for_full_page_iframe( $content ) { if ( strpos( $content, '[3veta type="full"]' ) !== false || strpos( $content, "[3veta type='full']" ) !== false ) { $initial_loader = '