id: amaretti title: Amaretti price: 6 tva: TVA 5.5 quantity: 100 unit: grammes categories:
- src/content/categories/biscuits.md image: "../../uploads/Amaretti.jpg"
import OpenAI from "openai"; | |
const openai = new OpenAI({ | |
apiKey: process.env.OPENAI_API_KEY, | |
}); | |
const response = await openai.responses.create({ | |
model: "gpt-4o", | |
tools: [ | |
{ | |
type: "web_search_preview", |
<!-- encore plus simple avec juste le namespace dans les commentaires, pas besoin de variation js normalement --> | |
<!-- wp:query {"queryId":1,"query":{"perPage":100,"pages":0,"offset":0,"postType":"post","order":"asc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","taxQuery":{},"inherit":false},"namespace":"namespace/variation-name","align":"wide","className":"..."} --> | |
<div class="wp-block-query alignwide ..."><!-- wp:post-template {"layout":{"type":"grid","columnCount":3}} --> | |
<!-- wp:group {"align":"wide"} --> | |
<div class="wp-block-group alignwide"><!-- wp:post-featured-image {"isLink":true} /--> | |
<!-- wp:post-title {"textAlign":"left","level":3} /--> | |
<!-- wp:post-excerpt {"excerptLength":50} /--> |
{ | |
"version": 2, | |
"settings": { | |
// Setting that enables the following UI tools:border: color, radius, style, width, color: link, spacing: blockGap, margin, padding, typography: lineHeight | |
"appearanceTools": true, | |
// Settings related to borders | |
"border": { | |
color: false, | |
radius: false, | |
style: false, |
<?php | |
// in functions file | |
// require_once(dirname(__FILE__) . '/field.php'); | |
// gm-field-name is name for input in front | |
// gm-show-name-field is name of input in back | |
namespace Goodmotion\inc\woocommerce\field; | |
// Exit if accessed directly | |
if (!defined('ABSPATH')) { | |
exit; |
// thank http://jsfiddle.net/Schepp/uZDHY/ for idea | |
const canIUseWebp = () => { | |
return new Promise((resolve, reject) => { | |
// create image | |
const webp = new Image(); | |
// detect if browser can read format | |
webp.onerror = () => reject('Your browser does not suppoert WebP'); | |
webp.onload = () => resolve('Your browser supports WebP, yay!'); | |
// just 1px blank webp image | |
webp.src = 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAsBMJaQAA3AA/veMAAA='; |
id: amaretti title: Amaretti price: 6 tva: TVA 5.5 quantity: 100 unit: grammes categories:
// https://github.com/gaearon/redux-thunk | |
export function updateTitleMeta(value) { | |
return (dispatch, getState) => { | |
const state = getState(); | |
const head = state.header; | |
head.title = value; | |
return dispatch(addToHeader(head)); | |
}; | |
} |