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
| /** | |
| * Immediately bans IPs that attempt to log in with specific forbidden usernames. | |
| * | |
| * This function hooks into the 'authenticate' filter to run before iThemes Security, | |
| * checks against a custom list of usernames, and uses the iThemes Security API | |
| * to execute the lockout. | |
| * | |
| * @param WP_User|WP_Error|null $user User object or error. | |
| * @param string $username The username being attempted. | |
| * @return WP_User|WP_Error|null |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <base target="_top"> | |
| <script> | |
| function onLoad() { | |
| google.script.run.withSuccessHandler(showProgress).getProgressPercentage(); | |
| google.script.run.withSuccessHandler(showTotal).getRunningTotal(); | |
| google.script.run.withSuccessHandler(showProjEnd).getProjectedYearEnd(); | |
| } |
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 doGet() { | |
| return HtmlService.createHtmlOutputFromFile('Index'); | |
| } | |
| function logDips(dips) { | |
| const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); | |
| const lastRow = sheet.getLastRow(); | |
| const currentDate = new Date(); | |
| // Insert new row with the date and dips |
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 hide_some_donor_dashboard_stuff() { | |
| wp_add_inline_style( | |
| /** | |
| * Below, use give-sequoia-template-css to style the multi-step donation form | |
| * or use to style the donor dashboard | |
| */ | |
| 'give-styles', | |
| ' | |
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 my_donor_count_shortcode( $atts ) { | |
| // Defaults | |
| $atts = shortcode_atts( array( | |
| 'form_id' => false, | |
| ), $atts, 'donor_count' ); | |
| $number = give_get_form_donor_count( $atts['form_id'] ); |
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 my_donor_count_shortcode( $atts ) { | |
| // Defaults | |
| $atts = shortcode_atts( array( | |
| 'form_id' => false, | |
| ), $atts, 'donor_count' ); | |
| $number = give_get_form_donor_count( $atts['form_id'] ); |
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 my_give_german_text_switcher( $translations, $text, $domain ) { | |
| if ( $domain == 'give' && $text == '<span class="income">%1$s</span> of <span class="goal-text">%2$s</span> raised' ) { | |
| $translations = __( '<span class="income">%1$s</span> von <span class="goal-text">%2$s</span> erreicht', 'give' ); | |
| } | |
| return $translations; | |
| } | |
| add_filter( 'gettext', 'my_give_german_text_switcher', 10, 3 ); |
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 | |
| /* | |
| * ALERT: THIS FUNCTION ONLY WORKS ON VERSION 5.0+ OF BETTER CLICK TO TWEET | |
| * | |
| * This function sets an option in your WordPress Options table (default wp_options), so adding this function | |
| * and refreshing the page even one time will disable the Better Click To Tweet Stylesheet until the option is removed. | |
| * | |
| * Note that uninstalling the core Better Click To Tweet plugin from the dashboard will remove the option automatically. | |
| * | |
| * To remove the option (and thus re-register and enqueue the defaultCSS) without deleting the core plugin, |
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
| [bctt tweet="Here's an emoji rocket: \xF0\x9F\x9A\x80"] | |
| find the emoji you are looking for here: http://apps.timwhitlock.info/emoji/tables/unicode |
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 prevents Better Click To Tweet from enqueuing any styles at all. | |
| * This is handy for folks who want styles to all live in their theme. | |
| * | |
| * This snippet is recommended to be used in a must-use plugin. | |
| * | |
| */ | |
| function bctt_so_quiet_in_here () { |
NewerOlder