This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { graphqlRequest } from "./graphqlRequest"; | |
export async function getContactInfo() { | |
const query = { | |
query:` | |
query acfContactInfo { | |
aCFOptions { | |
optionsFields { | |
contactText | |
emailAddress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function graphqlRequest(query) { | |
const url = "removed-for-security"; | |
const headers = { 'Content-Type' : 'application/json' }; | |
const res = await fetch(url, { | |
headers, | |
method: 'POST', | |
body: JSON.stringify(query) | |
}); | |
const resJson = await res.json(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_theme_setup() { | |
add_image_size( 'image-size-class', 1280, 720, true ); | |
} | |
add_action( 'after_setup_theme', 'my_theme_setup' ); | |
function my_theme_wp_image_editor_output_format( $formats ) { | |
$formats['image/jpg'] = 'image/webp'; | |
return $formats; |