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
registerBlockType( 'cgb/block-guten-load-post', { | |
// ... | |
keywords: [ | |
__( 'my-block — CGB Block' ), | |
__( 'CGB Example' ), | |
__( 'create-guten-block' ), | |
], | |
attributes: { | |
content: { |
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
// ==UserScript== | |
// @name Aliexpress | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://trade.aliexpress.ru/orderList.htm* | |
// @match https://trade.aliexpress.com/orderList.htm* | |
// @match https://trade.aliexpress.ru/order_list.htm* | |
// @match https://trade.aliexpress.com/order_list.htm* |
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 | |
/** | |
* BuddyPress 2.6.0 introduced a new nav API | |
* with a Backcompat mechanism. But accessing/editing | |
* deprecated globals can lead to such problems... | |
* | |
* It's too bad Theme designers forget to test betas :) | |
*/ | |
function strothi_profile_primary_nav_first() { |
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
(function(){ | |
/** | |
* Create a new MediaLibraryTaxonomyFilter we later will instantiate | |
*/ | |
var MediaLibraryTaxonomyFilter = wp.media.view.AttachmentFilters.extend({ | |
id: 'media-attachment-taxonomy-filter', | |
createFilters: function() { | |
var filters = {}; | |
// Formats the 'terms' we've included via wp_localize_script() |
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
#Get the size of each table, ordered by largest to smallest | |
SELECT table_name AS "Tables", | |
round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" | |
FROM information_schema.TABLES | |
WHERE table_schema = "YOU+TABLE+NAME+HERE" | |
ORDER BY (data_length + index_length) DESC; | |
#Get the size of the entire DB | |
SELECT table_schema "DB Name", | |
Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" |
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 | |
// In a class constructor | |
$this->size_tax = wc_attribute_taxonomy_name( 'Size' ); | |
$this->color_tax = wc_attribute_taxonomy_name( 'Color' ); | |
// Insert the main product first | |
// It will be used as a parent for other variations (think of it as a container) | |
$product_id = wp_insert_post( array( |
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 //* Mind this opening php tag and header information below | |
/* | |
Plugin Name: Create EDD Discounts with Gravity Forms | |
Plugin URI: http://engagewp.com/create-random-discount-codes-edd-gravity-forms | |
Description: Allows discount codes for Easy Digital Downloads to be randomly generated on Gravity Forms submissions. Code credit to David Smith of GravityWiz.com. Modified and put into plugin format by Ren Ventura. | |
Author: David Smith / Ren Ventura | |
Version: 1.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 | |
/** | |
* Vimeo class to fetch thumbnails | |
* @example | |
* $video = new VimeoThumbnail(array( | |
* 'video_url' => $url | |
* )); | |
* echo $video->thumbnail; | |
*/ |
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 | |
/** | |
* Plugin Name: WooCommerce Remove Billing Fields for Free Virtual Products | |
* Plugin URI: https://gist.github.com/BFTrick/7873168 | |
* Description: Remove the billing address fields for free virtual orders | |
* Author: Patrick Rauland | |
* Author URI: http://patrickrauland.com/ | |
* Version: 2.0 | |
* | |
* This program is free software: you can redistribute it and/or modify |
NewerOlder