Basic utility to launch a python 2 or python 3 simple http server.
#!/usr/bin/env bash
if [ "$1" != "" ]; then
PORT="$1"
elif [ "$PORT" = "" ]; then
PORT=8000
fi
function debug( $message, $label = '', $log_file = 'debug.log' ) { | |
if ( is_bool( $message ) ) { | |
$message = $message ? 'true' : 'false'; | |
} else if ( is_array( $message ) || is_object( $message ) ) { | |
$message = json_encode( | |
$message, | |
JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | |
); | |
} |
Basic utility to launch a python 2 or python 3 simple http server.
#!/usr/bin/env bash
if [ "$1" != "" ]; then
PORT="$1"
elif [ "$PORT" = "" ]; then
PORT=8000
fi
<?php | |
// source: http://wordpress.stackexchange.com/questions/211703/need-a-simple-but-complete-example-of-adding-metabox-to-taxonomy | |
// code authored by jgraup - http://wordpress.stackexchange.com/users/84219/jgraup | |
// REGISTER TERM META | |
add_action( 'init', '___register_term_meta_text' ); | |
function ___register_term_meta_text() { |
/** | |
* This is the old version build by jQuery trigger event. | |
* | |
* DO NOT USE | |
* | |
*/ | |
if ( typeof window.wpdk_add_action === 'undefined' ) { | |
/** |