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
/* | |
* Timeline Express - Image Icons | |
* | |
* Note: Requires Timeline Express v1.2 or later. | |
* The following code should be placed in the bottom of your active themes functions.php file. | |
*/ | |
add_filter( 'timeline-express-custom-icon-html', 'pn_timeline_express_custom_icon_html_test', 10, 3 ); | |
function pn_timeline_express_custom_icon_html_test( $html, $post_id, $timeline_express_options ) { |
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 Name: Pug Bomb API Endpoint | |
Description: Adds an API endpoint at /api/pugs/$n_pugs | |
Version: 0.1 | |
Author: Brian Fegter | |
Author URL: http://coderrr.com | |
*/ | |
class Pugs_API_Endpoint{ |
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
/* | |
* Timeline Express Custom Icon Filter Test | |
* Note: Requires Timeline Express v1.2 or later. | |
* The following code should be placed in the bottom of your active themes functions.php file. | |
*/ | |
add_filter( 'timeline-express-custom-icon-html', 'pn_timeline_express_custom_icon_html_test', 10, 3 ); | |
function pn_timeline_express_custom_icon_html_test( $html, $post_id, $timeline_express_options ) { | |
$custom_png_icon = get_post_meta( $post_id, '_custom_png_icon', true ); |
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 isOnScreen(elem) { | |
// if the element doesn't exist, abort | |
if( elem.length == 0 ) { | |
return; | |
} | |
var $window = jQuery(window) | |
var viewport_top = $window.scrollTop() | |
var viewport_height = $window.height() | |
var viewport_bottom = viewport_top + viewport_height | |
var $elem = jQuery(elem) |
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 | |
function yikes_woocommerce_free_shipping( $is_available ) { | |
global $woocommerce; | |
// set the product ids that are eligible | |
$eligible = array( '360' ); | |
// get cart contents | |
$cart_items = $woocommerce->cart->get_cart(); |
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 | |
/* | |
* Alter the URL the user is redirected to after a successfull submission of form #3 | |
* - Add a custom URL, or add query args to the page URL selected on the edit forms page | |
* @parameters | |
* $url - the original URL set on the edit forms page | |
* $form_id - the ID of the form that was submitted | |
* $page_data - the global $post data - contains all sorts of info about the current page (including ID, title etc.) | |
*/ | |
function yikes_mailchimp_alter_redirect_url( $url, $form_id, $page_data ) { |
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 a new custom tag to the 'pre defined tags' section | |
* @ Change 'tag', 'description' and 'title' to suit your needs. | |
* @ $available_tags - the default pre-defined tags available out of the box | |
*/ | |
add_filter( 'yikes-mailchimp-custom-default-value-tags', 'add_new_pre_defined_tags' ); | |
function add_new_pre_defined_tags( $available_tags ) { | |
// define a new array, with our default tag data (note: to create more than one, simply copy and paste what is below and alter the values) | |
$available_tags[] = 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 | |
/* | |
* Grab the contents of an ACF 'file' field, called attached_file, on the page the form was submitted on (ie: page with ID 15) | |
* and re-direct the user to that URL (to download the file) after a successful submission. | |
* @since 0.1 | |
*/ | |
function yikes_mailchimp_alter_redirect_url( $url, $form_id, $page_data ) { | |
// grab the ACF field -- returns an array | |
// (Example: Array ( [id] => 43 [alt] => [title] => 2002 [caption] => [description] => [mime_type] => file/zip [url] => http://www.example.com/file.zip ) ) |
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 | |
/* | |
* This snippet gets placed at the bottom of your active themes functions.php file | |
* - This is necessary as some themes load their own set of icons and use !important; which conflicts with our plugin | |
*/ | |
/* | |
* Fix theme's overriding the default icon set in the dashboard | |
*/ |
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 a new custom tag to the 'pre defined tags' section | |
* @ Change 'tag', 'description' and 'title' to suit your needs. | |
* @ $available_tags - the default pre-defined tags available out of the box | |
*/ | |
add_filter( 'yikes-mailchimp-custom-default-value-tags', 'add_new_pre_defined_tags' ); | |
function add_new_pre_defined_tags( $available_tags ) { | |
// define a new array, with our default tag data (note: to create more than one, simply copy and paste what is below and alter the values) |
OlderNewer