generated from pascalmartineau/wp-skeleton
wip: preview
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
<?php
|
||||
$preview_url = ( defined( 'NUXT_PUBLIC_SITE_URL' ) ? NUXT_PUBLIC_SITE_URL : 'https://cultureat.ca' ) . '/api/acf-preview';
|
||||
$data = array(
|
||||
'fieldGroupName' => get_row_layout(),
|
||||
'value' => ccat_get_graphql_row_value(),
|
||||
);
|
||||
$preview_url = ( defined( 'NUXT_PUBLIC_SITE_URL' ) ? NUXT_PUBLIC_SITE_URL : 'https://cultureat.ca' ) . '/api/preview';
|
||||
$data = ccat_get_graphql_preview_data();
|
||||
$result = wp_remote_post( $preview_url, array( 'body' => $data ) );
|
||||
if ( is_wp_error( $result ) ) {
|
||||
echo '<div style="color: red;">Erreur: ' . esc_html( $result->get_error_message() ) . '</div>';
|
||||
|
||||
Reference in New Issue
Block a user