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
.alert { | |
padding: 15px; | |
margin-bottom: 20px; | |
border: 1px solid transparent; | |
border-radius: 4px; | |
} | |
.alert h4 { | |
margin-top: 0; | |
color: inherit; |
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 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 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( 'admin_enqueue_scripts', 'admin_print_js' ); | |
public function admin_print_js() { | |
global $wp_locale; | |
//add the jQuery UI elements shipped with WP | |
wp_enqueue_script( 'jquery' ); | |
wp_enqueue_script( 'jquery-ui-datepicker' ); |
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
workflows: | |
version: 2 | |
main: | |
jobs: | |
- php56-build | |
- php70-build | |
- php71-build | |
- php72-build | |
- deploy: | |
requires: |
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 | |
/* | |
* Add a hidden field to our WooCommerce login form - passing in the refering page URL | |
* Note: the input (hidden) field doesn't actually get created unless the user was directed | |
* to this page from a single product page | |
*/ | |
function redirect_user_back_to_product() { | |
// check for a referer | |
$referer = wp_get_referer(); | |
// if there was a referer.. |
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
<table class="widefat fixed" cellspacing="0"> | |
<thead> | |
<tr> | |
<th id="cb" class="manage-column column-cb check-column" scope="col"></th> <!-- this column contains checkboxes --> | |
<th id="columnname" class="manage-column column-columnname" scope="col"></th> | |
<th id="columnname" class="manage-column column-columnname num" scope="col"></th> <!-- "num" added because the column contains numbers --> | |
</tr> | |
</thead> |
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 | |
/* | |
* This snippet should go at the bottom of your functions.php file. | |
* Send a notification email to the user after a form is successfully submitted | |
* @sample snippet | |
*/ | |
function yikes_easy_forms_for_mailchimp_email_notifications( $email, $submitted_data, $form, $notifications ) { | |
if( ! empty( $submitted_data ) ) { | |
// add additional items you don't want included in the email notification | |
$exclude_from_email = 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 // Do not include this line - this is here for syntax highlighting only | |
/** | |
* Alter the read more text on the timeline | |
* | |
* @param string $text The read more link text. | |
* @param integer $post_id The post ID. | |
* | |
* @return string The final read more link text. | |
*/ |
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: RW Elephant Filters | |
* Plugin URI: https://www.evan-herman.com | |
* Description: Customizations for the RW Elephant Inventory Gallery plugin. | |
* Version: 1.0.0 | |
* Author: Evan Herman | |
* Author URI: https://www.evan-herman.com | |
*/ |
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
/* | |
* 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 ) { |
NewerOlder