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 | |
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 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 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 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 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 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 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 () { |
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
editor.windowManager.open( { | |
title: 'A popup dialog', | |
body: [ | |
{ | |
type: 'textbox', | |
name: 'text1', | |
label: 'enter your text', | |
multiline : true, | |
minHeight : 60, | |