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
| <html> | |
| <head> | |
| <title>Scroll to bottom Detection</title> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
| <script type="text/javascript"> | |
| var count=0; | |
| $(document).ready(function(){ | |
| SetValues(); | |
| $(window).scroll(function(){ | |
| //Will check if the user has reached bottom of a PAGE |
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
| $(window).on("scroll", function() { | |
| var scrollHeight = $(document).height(); | |
| var scrollPosition = $(window).height() + $(window).scrollTop(); | |
| if ((scrollHeight - scrollPosition) / scrollHeight === 0) { | |
| // when scroll to bottom of the page | |
| } | |
| }); |
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 the action setting | |
| add_filter( 'wc_points_rewards_action_settings', 'points_rewards_newsletter_action_settings' ); | |
| function points_rewards_newsletter_action_settings( $settings ) { | |
| $settings[] = array( | |
| 'title' => __( 'Points earned for newsletter signup' ), | |
| 'desc_tip' => __( 'Enter the amount of points earned when a customer signs up for a newsletter via MailChimp.' ), |
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
| #!/bin/bash | |
| # Installation: | |
| # Install the script in one of the folders in your PATH. Make sure it has execute permissions (i.e. chmod +x wp-install-core-sub-dir). | |
| #Usage: | |
| # $ mkdir mysite | |
| # $ cd mysite |
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
| <? | |
| // <readme> | |
| /* | |
| This is a lite version of Olark's and Intercom's functionality (without the chat part). | |
| It lets you get feedback from users on your site to your email. | |
| And you won't have to rely on another company anymore! | |
| #killyourdependencies |
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_action( 'woocommerce_single_product_summary', 'wc_product_sold_count', 11 ); | |
| function wc_product_sold_count() { | |
| global $product; | |
| $units_sold = get_post_meta( $product->id, 'total_sales', true ); | |
| echo '<p>' . sprintf( __( 'Units Sold: %s', 'woocommerce' ), $units_sold ) . '</p>'; | |
| } | |
| ?> |
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 | |
| // Change To Repo Directory | |
| chdir("/full/path/to/repo"); | |
| // Load Last 10 Git Logs | |
| $git_history = []; | |
| $git_logs = []; | |
| exec("git log -10", $git_logs); |
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 sumobi_edd_terms_agreement() { | |
| global $edd_options; | |
| if ( isset( $edd_options['show_agree_to_terms'] ) ) { | |
| ?> | |
| <fieldset id="edd_terms_agreement"> | |
| <div id="edd_terms"> | |
| <?php | |
| do_action( 'edd_before_terms' ); |
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 sumobi_edd_purchase_link_show_featured_image( $download_id ) { | |
| echo get_the_post_thumbnail( $download_id, 'thumbnail' ); | |
| } | |
| add_action( 'edd_purchase_link_top', 'sumobi_edd_purchase_link_show_featured_image' ); |
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 | |
| /** | |
| * Milestone Sale Alerts | |
| * Be notified when a specific download is sold X times. | |
| */ | |
| function sumobi_edd_milestone_sales_alert( $purchase_id ) { | |
| // ID of download to check | |
| $download_id = 8; |