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 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) { |
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 | |
$allowed_mappings = [ | |
'domain.test', | |
]; | |
define( 'NOBLOGREDIRECT', isset( $_SERVER['HTTP_HOST'] ) && in_array( $_SERVER['HTTP_HOST'], $allowed_mappings ) ); |
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 | |
const TEST_USERS_OPT = 'test-users-generated'; | |
$generated = get_option( TEST_USERS_OPT ); | |
if( $generated === 'yes' ) { | |
return; | |
} |
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 | |
/** | |
* Migrate hfg_builders on demosites. | |
*/ | |
function demosites_run_builders_migrator() { | |
$option = 'neve_demosites_header_migrated'; | |
$has_migrated = get_option( $option ); | |
if ( $has_migrated === true ) { |
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 | |
if ( strpos( $_SERVER['HTTP_HOST'], 'ngrok' ) ) { | |
add_filter( "option_siteurl", 'adapt_ngrok' ); | |
add_filter( "option_home", 'adapt_ngrok' ); | |
} | |
function adapt_ngrok() { | |
return 'http://' . $_SERVER['HTTP_HOST']; | |
} |
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
#!/usr/bin/env bash | |
# Delete all network sites. | |
wp site list --field=blog_id --allow-root | xargs -I % wp site delete % --yes --allow-root | |
wp plugin activate neve-pro-addon --network --allow-root; | |
# Create all onboarding sites and switch theme. | |
wp themeisle-si list --field=slug --allow-root | xargs -n1 -I % wp site create --slug=% --allow-root | |
wp site list --field=url --allow-root | xargs -n1 -I % wp --url=% theme activate neve --allow-root |
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
// Delay from parent. | |
delayFrames = 5; | |
delay = framesToTime(delayFrames); | |
transform.position + (parent.transform.position.valueAtTime(time-delay) - parent.transform.position.valueAtTime(time)) |
NewerOlder