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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* This is forked from https://gist.github.com/luetkemj/2023628, just in case the original ever gets zapped | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/query.php | |
*/ |
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
Show hidden characters
{ | |
//Debug logging | |
"debug_enable": false, | |
// Path to find icons at | |
"icon_path": "BracketHighlighter/icons", | |
// When only either the left or right bracket can be found | |
// this defines if the unmatched bracket should be shown. | |
"show_unmatched" : true, |
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 | |
/** | |
* Return the ID of the uploaded attachment of a given type | |
* | |
* @since 2.5.0 | |
* | |
* @param int $id The uploaded attachment ID | |
*/ | |
echo apply_filters("async_upload_{$type}", $id); |
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 | |
/** | |
* The location to send commenter after posting | |
* | |
* @since 1.5.0 | |
* | |
* @param string $location The 'redirect_to' URI sent via $_POST | |
* @param object The comment object | |
*/ |
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 | |
/** | |
* Allow definition of default variables | |
* | |
* @since MU | |
* | |
* @param array $user_data The user data to define { | |
* @type string $user_name The username | |
* @type string $user_email The user's email |
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
/** | |
* Allow definition of default variables | |
* | |
* @since MU | |
* | |
* @param array $user_data The user data to define { | |
* @type string "user_name" The username | |
* @type string "user_email" The user's email | |
* @type array "errors" | |
* } |
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 | |
// Disable support for SB Slideshows | |
function remove_sb_slideshows() { | |
remove_theme_support( 'sb-slideshows' ); | |
} | |
add_action( 'after_setup_theme', 'remove_sb_slideshows' ); |
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 | |
/** | |
* Return the ID of the uploaded attachment of a given type | |
* | |
* @since 2.5.0 | |
* | |
* @param int $id The uploaded attachment ID | |
* @return int The uploaded attachment ID | |
*/ |
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 | |
/** | |
* Override default image downsize rules with a custom resizing service | |
* | |
* Defaults to false (no third-party downsizing), but can pass an indexed | |
* array of image details to use in place of WP's default downsizing rules | |
* and short-circuit the remainder of the function. | |
* | |
* @since 2.5.0 |
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 | |
class HHW_WP_CLI_Commands extends WP_CLI_Command { | |
/** | |
* Update post meta for all posts that have sdac_post_thumbnail key. | |
* Move associated meta value to featured image. | |
*/ | |
function fix_images() { | |
global $wpdb; |