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 | |
$return = ''; | |
foreach( $order->get_items() as $item ) : | |
$_product = $order->get_product_from_item( $item ); | |
$file = $sku = $variation = $image = ''; | |
$src = wp_get_attachment_image_src( get_post_thumbnail_id( $_product->id ), 'thumbnail'); |
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 wingz_exhibitor_filter(){ | |
global $wp_query; | |
$tax_query = array( 'relation' => 'AND' ); | |
if ( isset( $_GET['s'] ) ): | |
$search = sanitize_text_field( $_GET['s'] ); | |
else: | |
$search = ''; | |
endif; | |
if ( isset( $_GET['exhibitor_type'] ) && $_GET['exhibitor_type'] != '' ): |
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 | |
add_action( 'woocommerce_product_options_general_product_data', 'catalog_add_video_field' ); | |
add_action( 'woocommerce_process_product_meta', 'catalog_save_video_url' , 10, 2 ); | |
add_filter( 'woocommerce_single_product_image_html', 'catalog_set_featured_video' , 20 ); | |
function catalog_add_video_field() { | |
echo '<div class="options_group">'; | |
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 Auto Updates Whitelist | |
* Allows Forced Updates for listed Plugin Slugs | |
*/ | |
function pb_auto_update_whitelist_plugins( $update, $item ) { | |
// Array of plugin slugs to whitelist | |
$plugins = array ( | |
'jetpack', |
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 | |
/** | |
* Front to the WordPress application. This file doesn't do anything, but loads | |
* wp-blog-header.php which does and tells WordPress to load the theme. | |
* | |
* @package WordPress | |
*/ | |
/** | |
* Tells WordPress to load the WordPress theme and output it. |
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 get_top_parent_page_id() { | |
global $post; | |
// Check if page is a child page (any level) | |
if ($post->ancestors) { | |
// Grab the ID of top-level page from the tree | |
return end($post->ancestors); | |
} else { | |
// Page is the top level, so use it's own id | |
return $post->ID; | |
} |
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 unset_preorder_terms( $product ) { | |
if ( is_object( $product ) ) | |
$product = $product->id; | |
$terms = wp_get_post_terms($product, 'product_cat'); | |
$term_ids = array(); | |
foreach ( $terms as $term ){ | |
if ( strpos($term->slug, 'pre-order') === false ){ | |
$term_ids[] = $term->term_id; | |
} |
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
jQuery(document).ready(function ($) { | |
// Set the original handler, since we override Core, we need to fall back to core if we're not doing stuff our selves | |
var _custom_media = true, | |
_orig_wp_media_insert = wp.media.editor.insert; | |
// Any input field wit hthe class 'theme_custom_media' will trigger our custom behavior | |
$(".theme_custom_media").click(function (e) { | |
var button = $(this); | |
var id = button.attr('id').replace('_button', ''); | |
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 My_Shortcode | |
*/ | |
class My_Shortcode { | |
/** | |
* The shortcode attributes | |
* |
NewerOlder