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 | |
/* | |
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 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
/* ENQEUE CUSTOM SCRIPTS */ | |
function enqueue_scripts_method() { | |
/* | |
wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer ); | |
$handle (required): script name - Default: None | |
$src (optional): url to script (optional if wp_register_script has been used, if this is the case use just $handle) - Default: false | |
$deps (optional): if script depends on another script, i.e. 'jquery' - Default: array() | |
$ver (optional): script version - Default: false | |
$in_footer (optional): Boolean to link file in wp_footer(). Default: false |
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
/* | |
* Checks if the page is the parent or a child of the page matching the $pid param | |
* $pid can be the page slug or the page ID # | |
* | |
* This function is best used to display menus when the parent/top level menu item needs | |
* a rollover state or special treatment. | |
* | |
* @param \$pid (string or int) | |
* returns true if current page ID matches $pid, else return false | |
*/ |