I hereby claim:
- I am mattmcgiv on github.
- I am mattmcgiv (https://keybase.io/mattmcgiv) on keybase.
- I have a public key whose fingerprint is C582 CCFF 1819 FB5B AE64 4EDD 7762 A02A 193C A1B0
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
In order for Livereload to work, you need a Firefox or Chrome extension as Gulp doesn't inset it automatically. Alternatively, you can also manually put the livereload script in footer.php
, just make sure to insert it only on development environment:
<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
html { | |
font-size: 16px; /*1rem=16px*/ | |
} | |
h1 { | |
font-size: 3rem; /* 48px (16 times 3) */ | |
} | |
h2 { | |
font-size: 2rem; /* 32px */ |
// Add this to wp-config.php | |
// Enable WP_DEBUG mode | |
define('WP_DEBUG', true); | |
// Enable Debug logging | |
define('WP_DEBUG_LOG', true); | |
/* PHP info will be logged to: | |
wp-content/debug.log |
function mm_js_in_wp_head($pid){ | |
global $post; | |
// only for post Id = 720 | |
$mm_id_of_page="720"; | |
if($post->ID==$mm_id_of_page){ | |
echo "<script>alert('hello world');</script>"; | |
} | |
} | |
add_action( 'wp_head', 'mm_js_in_wp_head' ); |
#PURPOSE to easily generate SQL required to update a WP db to a new URL | |
#USAGE ./wp-db.bash http://source.com http://destination.com | |
echo "UPDATE wp_options SET option_value = REPLACE(option_value, '$1', '$2');" | |
echo "UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, '$1', '$2');" | |
echo "UPDATE wp_posts SET guid = REPLACE(guid, '$1', '$2');" | |
echo "UPDATE wp_posts SET post_content = REPLACE(post_content, '$1', '$2');" |
<!--?xml version="1.0" encoding="utf-8"?--> | |
<request method="invoice.list"> | |
<!-- Filter by client (Optional) --> | |
<client_id>3</client_id> | |
<!-- Filter by recurring id (Optional) --> | |
<recurring_id>10</recurring_id> | |
<!-- Filter by status (Optional) --> | |
<status>draft</status> | |
<!-- Returns invoices with a number like this arg (Optional) --> | |
<number>FB00004</number> |
<?php | |
function mm_get_html_from_file() { | |
$mm_html_file = | |
include '$mm_html_file'; | |
?> |
<?php | |
wp_enqueue_script('whatev-handle', __FILE__ . '/js/script.js', 'jquery', true); | |
/* | |
* Usage: | |
* wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer ); | |
* | |
* @param string $handle Name of the script. | |
* @param string|bool $src Path to the script from the root directory of WordPress. Example: '/js/myscript.js'. | |
* @param array $deps An array of registered handles this script depends on. Default empty array. |
<span id="main-feedback" class="inline-block mt2" style="width:100%;"> | |
<span class="col col-4 h2 inline-block left-align">Charge:<br><span class="h2">$225<span></span></span></span> | |
<span class="col col-4 inline-block left-align"> | |
<form action=""> | |
<input class="mb2" type="radio" value="am" name="tod">Daytime<br> | |
<input type="radio" name="tod" value="pm">After-hours | |
</form> | |
</span> | |
<span class="col col-4 inline-block left-align"> | |
<span class="h3 block">Region: North</span> |