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 | |
/** | |
* Write an array to a JSON file. Replace $data with your array, | |
* and skip JSON encoding if you already have JSON | |
*/ | |
function write_data_to_file( $filename ) { | |
$json = file_get_contents( 'http://path.to/external-site/file.json'); | |
$time = time(); | |
file_put_contents( $filename, $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
/*------------------------------------------------------------------------------ | |
Gulpfile.js | |
------------------------------------------------------------------------------*/ | |
// Theme information (name, starting theme version) | |
var theme = 'zoe', | |
version = '0.2.1'; | |
// Set the paths you will be working with | |
var phpFiles = ['./**/*.php', './*.php'], | |
htmlFiles = ['./**/*.html', './*.html'], |
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
## - Create the repo on the server | |
mkdir repo && cd repo | |
mkdir site.git && cd site.git | |
git init --bare |
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
{"lastUpload":"2022-03-02T14:57:25.998Z","extensionVersion":"v3.4.3"} |
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 { createUseStyles, useTheme } from "react-jss"; | |
import { WithStyles as WithStylesI, Theme } from "../../types"; | |
export const WithStyles = ({ children, styles }: WithStylesI) => { | |
const useStyles = createUseStyles((theme: Theme) => styles(theme)); | |
const theme = useTheme(); | |
const classes = useStyles({ theme }); | |
return children(classes); | |
}; |
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
if (!function_exists('log_it')) { | |
function log_it($message) | |
{ | |
if (WP_DEBUG === true) { | |
if (is_array($message) || is_object($message)) { | |
error_log(print_r($message, true)); | |
} else { | |
error_log($message); | |
} | |
} |
OlderNewer