Skip to content

Instantly share code, notes, and snippets.

View blakewilson's full-sized avatar
:shipit:

Blake Wilson blakewilson

:shipit:
View GitHub Profile
@blakewilson
blakewilson / functions.php
Last active July 26, 2016 05:16
Add a fixed surcharge to your cart and checkout based on array of product IDs in cart –– WooCommerce
<?php
/**
* Add a fixed surcharge to your cart and checkout based on array of
* product ids in cart.
*
* @author Blake Wilson
* @link https://gist.github.com/blakewilson/1d1be3ed68526dc12a5cb28d44cb6316
* @license MIT
* @license https://opensource.org/licenses/MIT
*
@blakewilson
blakewilson / function.php
Last active February 19, 2018 02:42
Video Background Pro - Post Types Filter
<?php
/**
* Define Video Background Pro's post types
*
* @since 1.1.2
* @author Push Labs
* @param array $post_types
* @return array Array of post types Video Background Pro should use
*/
function themeprefix_vidbgpro_post_types( $post_types ) {
@blakewilson
blakewilson / functions.php
Created July 15, 2017 22:01
Video Background Pro - Metabox Priority Filter
<?php
/**
* Define Video Background Pro's metabox priority
*
* @since 2.0.0
* @author Push Labs
* @uses apply_filters()
* @return string The location of the metabox used by WordPress
* @link https://developer.wordpress.org/reference/functions/add_meta_box/
*/
@blakewilson
blakewilson / shortcode.md
Last active July 11, 2019 14:37
Video Background Pro - Default Shortcode

[vidbg container="body" type="self-host" mp4="#" webm="#" vimeo_url="#" youtube_url="#" youtube_start="0" youtube_end="null" poster="#" end_frame_poster="false" loop="true" overlay="false" overlay_color="#000" overlay_alpha="0.3" frontend_play_button="false" frontend_volume_button="false" player_options="JSON_STRING" frontend_container=".some-class"]

@blakewilson
blakewilson / shortcode.md
Created August 6, 2017 21:26
Video Background - Default Shortcode

[vidbg container=”body” mp4=”#” webm=”#” poster=”#” muted=”true” loop=”true” overlay=”false” overlay_color=”#000″ overlay_alpha=”0.3″]

@blakewilson
blakewilson / functions.php
Created August 6, 2017 21:28
Video Background - Post Types Filter
<?php
/**
* Define Video Background's post types
*
* @since 2.5.7
* @author Push Labs
* @param array $post_types
* @return array Array of post types Video Background should use
*/
function themeprefix_vidbg_post_types( $post_types ) {
@blakewilson
blakewilson / functions.php
Created February 18, 2018 20:41
Video Background Pro Default Mobile Playback Behavior
<?php
/**
* Define Video Background Pro's Default Mobile Playback Behavior
*
* @since 2.2.0
* @author Push Labs
* @param String $default Please note that $default is a STRING, not BOOLEAN.
* @return String $default The default behavior.
*/
function themeprefix_vidbgpro_play_on_mobile_default( $default ) {
@blakewilson
blakewilson / functions.php
Created February 18, 2018 20:47
Define Video Background Pro Dependencies
<?php
/**
* Define Video Background Pro's Script Dependencies
*
* @since 2.2.0
* @author Push Labs
* @param Array $deps The dependencies for the Video Background Pro plugin
* @return Array $deps
*/
function themeprefix_vidbgpro_deps( $deps ) {
@blakewilson
blakewilson / functions.php
Last active February 28, 2018 19:40
Video Background Pro Disable Visual Composer Integration
<?php
/**
* Disable Video Background Pro's Visual Composer Integration
*
* @since 2.2.0
* @author Push Labs
* @param Boolean $is_enabled Boolean decisison to enable/disable the integration
* @return Array $is_enabled
*/
function themeprefix_vidbgpro_disable_vc( $is_enabled ) {
@blakewilson
blakewilson / methods.js
Created March 3, 2018 04:08
Video Background Pro Methods
// Play the video background
$( '#container' ).data( 'vidbgpro' ).playVidbg();
// Pause the video background
$( '#container' ).data( 'vidbgpro' ).pauseVidbg();
// Mute the video background
$( '#container' ).data( 'vidbgpro' ).muteVidbg();
// UnMute the video background