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 | |
| /** | |
| * Customize Adjacent Post Link Order | |
| */ | |
| function my_custom_adjacent_post_where($sql) { | |
| if ( !is_main_query() || !is_singular() ) | |
| return $sql; | |
| $the_post = get_post( get_the_ID() ); | |
| $patterns = 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 | |
| /* DON'T copy the first line (above) if your functions.php already has it. | |
| * ---------------------------------------------------------------------- */ | |
| function et_divi_fonts_url() { | |
| $fonts_url = ''; | |
| /* Translators: If there are characters in your language that are not | |
| * supported by Open Sans, translate this to 'off'. Do not translate | |
| * into your own language. | |
| */ |
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 | |
| $purchases = edd_get_users_purchases( get_current_user_id(), 20, true ); | |
| if( $purchases ) : | |
| do_action( 'edd_before_download_history' ); ?> | |
| <table id="edd_user_history"> | |
| <thead> | |
| <tr class="edd_download_history_row"> | |
| <?php do_action( 'edd_download_history_header_start' ); ?> | |
| <th class="edd_download_download_name"><?php _e( 'Download Name', 'edd' ); ?></th> | |
| <?php if( ! edd_no_redownload() ) { ?> |
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 | |
| if ( !function_exists( 'wp_new_user_notification' ) ) { | |
| function wp_new_user_notification( $studentID, $plaintext_pass = '' ) { | |
| $student = new WP_User($studentID); | |
| $student_data = get_userdata( $studentID ); | |
| $firstname = $student_data->first_name; | |
| $student_login = stripslashes( $student_data->user_login ); | |
| // URLs | |
| $site_url = site_url(); |
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 code snippet can be added to your functions.php file (without the <?php) | |
| to add a query string to the login link emailed to the user upon registration | |
| which when clicked will validate the user, log them in, and direct them to | |
| the home page. | |
| */ | |
| /** | |
| * This first function is hooked to the 'user_register' action which fires |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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 | |
| // Run this code on 'after_theme_setup', when plugins have already been loaded. | |
| add_action('after_setup_theme', 'my_load_plugin'); | |
| // This function loads the plugin. | |
| function my_load_plugin() { | |
| // Check to see if your plugin has already been loaded. This can be done in several | |
| // ways - here are a few examples: |
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 | |
| /* | |
| * Get the most recently replied-to topics, and their most recent reply | |
| */ | |
| function custom_bbpress_recent_replies_by_topic($atts){ | |
| $short_array = shortcode_atts(array('show' => 5, 'forum' => false, 'include_empty_topics' => false), $atts); | |
| extract($short_array); | |
| // default values |
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: PMPro stop downgrade level | |
| Plugin URI: https://gist.github.com/1wdtv/a6d8a45979e4e217d212 | |
| Description: Prevent existing paid members from downgrading to free level (eg: when registering from a webinar). | |
| Version: 1 | |
| Author: 1WD.tv | |
| Author URI: https://1wd.tv | |
| */ | |
| /* |