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 | |
$user_membership_ids = new \WP_Query( array( | |
'post_type' => 'wc_user_membership', | |
'post_status' => wc_memberships_get_user_membership_statuses( false ), | |
'fields' => 'ids', | |
'nopaging' => true, | |
'suppress_filters' => 1, | |
'meta_query' => array( | |
'relation' => 'OR', | |
array( |
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 | |
/** | |
* Automatically install wp-cli on remote hosts if absent | |
* | |
* @author koko-ng <[email protected]> | |
* @package koko-ng/wp-cli-config | |
*/ | |
WP_CLI::add_hook( | |
'before_ssh', |
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 | |
/* Pull apart OEmbed video link to get thumbnails out*/ | |
function get_video_oembed_data( $video_uri ) { | |
//second false skip ACF pre-processcing | |
$url = get_field('videos', false, false); | |
//get wp_oEmed object, not a public method. new WP_oEmbed() would also be possible | |
$oembed = _wp_oembed_get_object(); | |
//get provider | |
$provider = $oembed->get_provider($url); |