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
| /*Stylesheet cleaned up and organized by Marketing Press*/ | |
| .clear { | |
| clear:both | |
| } | |
| .nobr { | |
| white-space:nowrap; | |
| } |
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 nfjal_open_field_group( $field_id, $data ) { | |
| if ( !$class = $data['class'] ) { | |
| $class = ''; | |
| } | |
| if ( strstr( $class, 'nf-open-field-group' ) ) { | |
| $class = nfjal_get_group_wrap_class( $class ); | |
| echo '<div class="' . $class . '">'; | |
| } |
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 | |
| // Force pickup as a shipping option if one or more products in the catalog is marked as pickup only. | |
| // To do this, add a shipping class with the slug 'pickup-only' then set products with that class as required. | |
| // Add this script to your theme's functions.php or similar. | |
| function hideShippingWhenPickupRequired($rates, $package) | |
| { | |
| foreach ($package['contents'] as $item) { | |
| $product = $item['data']; | |
| $shippingClass = $product->get_shipping_class(); |
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 scrollTo(Y, duration, easingFunction, callback) { | |
| var start = Date.now(), | |
| elem = document.documentElement.scrollTop?document.documentElement:document.body, | |
| from = elem.scrollTop; | |
| if(from === Y) { | |
| callback(); | |
| return; /* Prevent scrolling to the Y point if already there */ | |
| } |
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 | |
| /*******************************************************Podcast Meta-boxes *******************/ | |
| //Add Metabox | |
| //Source: http://wordpress.stackexchange.com/questions/139841/add-metabox-with-media-uploader-in-a-custom-post-type | |
| add_action( 'add_meta_boxes', 'add_upload_file_metaboxes' ); | |
| function add_upload_file_metaboxes() { | |
| add_meta_box( 'swp_file_upload', 'File Upload', 'swp_file_upload', 'videos', 'normal', 'default' ); | |
| } |
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 | |
| /** | |
| * Range Control Class | |
| */ | |
| class WP_Customize_Range_Control extends WP_Customize_Control { | |
| /** | |
| * @access public | |
| * @var string |
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
| //Custom scroll animator w/ easing support & requestAnimationFrame, who needs jQuery ^ ^ | |
| //Supports window (use 'window') and element (use document.querySelector(...)[0]) scrolling | |
| //Want features? Use jQuery. | |
| //properties: | |
| // - Element: [required] The element you want the scroll to apply to. Use 'window' for window | |
| // - To: [required] the offset (in px) to scroll to. Note that it will add this to the current position | |
| // - Duration: [required] the duration (in ms) for the scrolling animation | |
| // - Direction: [optional] (default: 'horizontal') The direction for the scrolling animation (horizontal | vertical) |
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
| const path = require( 'path' ); | |
| const webpack = require( 'webpack' ); | |
| const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | |
| module.exports = ( env, options ) => { | |
| return { | |
| entry: './src/block.js', | |
| output: { | |
| path: path.resolve( __dirname, 'build' ), |