This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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 | |
/*-----------------------------------------------------------------------------------*/ | |
/* Conditional Logic to Detect Various Event Related Views/Pages | |
/*-----------------------------------------------------------------------------------*/ | |
if( tribe_is_month() && !is_tax() ) { // Month View Page | |
echo 'were on the month view page'; | |
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page |
This file contains hidden or 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 | |
/* | |
Plugin Name: Disable plugins when doing local dev | |
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
This file contains hidden or 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 (!is_blog_installed()) { return; } | |
if ('http://' . $_SERVER['SERVER_NAME'] . '/wp' == get_option('home')) { | |
update_option('siteurl', 'http://' . $_SERVER['SERVER_NAME'] . '/wp'); | |
update_option('home', 'http://' . $_SERVER['SERVER_NAME']); | |
update_option('upload_path', $_SERVER['DOCUMENT_ROOT'] . '/media'); | |
update_option('upload_url_path', 'http://' . $_SERVER['SERVER_NAME'] . '/media'); | |
update_option('permalink_structure', '/%postname%/'); | |
} |
This file contains hidden or 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 | |
/* | |
Plugin Name: Disable Plugins | |
Description: Disables plugins that you specify depending on the value of the WP_LOCAL_DEV constant | |
Version: 0.2 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
NewerOlder