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
{ | |
"name": "clarkson/website", | |
"type": "project", | |
"license": "MIT", | |
"description": "Example to add Clarkson Core via Compser", | |
"repositories": [ | |
{ | |
"type": "git", | |
"url":"https://github.com/level-level/Clarkson-Core" | |
} |
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 | |
class WPCOM_VIP_CLI_Command extends WP_CLI_Command { | |
/** | |
* Clear all of the caches for memory management | |
*/ | |
protected function stop_the_insanity() { | |
/** | |
* @var \WP_Object_Cache $wp_object_cache |
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 | |
use Clarkson\EventManager\Event; | |
// Which class do we need to initiate? new \XYZ? | |
add_filter('clarkson_event_manager_post_class', function(){ | |
return '\Clarkson_Event'; | |
}, 10, 0); | |
// Our custom WordPress object | |
class Clarkson_Event extends Event { |
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
function SetSearchArgs( $formattedArgs, $args = [] ) { | |
if( isset( $args[ 'post_type' ] ) && ( count( $args[ 'post_type' ] ) > 1 || gettype( $args[ 'post_type' ] ) === 'string' ) ) { | |
if( gettype( $args[ 'post_type' ] ) === 'array' ) { | |
$existing_query = $formattedArgs[ 'query' ]; | |
unset( $formattedArgs[ 'query' ] ); |
OlderNewer