Skip to content

Instantly share code, notes, and snippets.

View abaicus's full-sized avatar

Andrei Băicuș abaicus

View GitHub Profile
@abaicus
abaicus / node.js
Created October 26, 2022 07:50
Get the theme mods for the starter content in PHP format
import fs from 'fs';
import fetch from 'node-fetch';
const run = async () => {
const data = await fetch(
'https://demosites.io/web-agency-gb/wp-json/ti-demo-data/data'
);
const json = await data.json();
fs.writeFile('theme_mods.json', JSON.stringify(json.theme_mods), function (err) {