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
<?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
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 | |
* |
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 | |
// domain.com/videos/funny/cute-dogs/ | |
function add_video_post_type() { | |
$labels = array( | |
'name' => _x( 'Videos', 'Post Type General Name', 'kibble' ), | |
'singular_name' => _x( 'Video', 'Post Type Singular Name', 'kibble' ), | |
'menu_name' => __( 'Videos', 'kibble' ), |
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
pronamicMedia = function(elem, options) { | |
this.elem = elem; | |
this.$elem = jQuery(elem); | |
this.options = options; | |
}; | |
pronamicMedia.prototype = { | |
_frame:undefined |