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
add_filter( 'caldera_forms_autopopulate_options_post_value_field', 'givewp_customer_addon_purchases', 24, 2 ); | |
function givewp_customer_addon_purchases() | |
{ | |
$current_user = wp_get_current_user(); | |
$purchases = edd_get_users_purchases($current_user->user_email, 100, false, 'any'); | |
if ( $purchases ) { | |
foreach ($purchases as $purchase) { | |
$licenses = edd_software_licensing()->get_licenses_of_purchase( $purchase->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 | |
add_shortcode( 'five_star_reviews', 'matt_get_give_five_stars' ); | |
function matt_get_give_five_stars( $atts ) { | |
$atts = shortcode_atts( array( | |
'slug' => 'caldera-forms', | |
), $atts, 'five_star_reviews' ); | |
$plugin_slug = $atts[ 'slug' ]; | |
// Get any existing copy of our transient data |
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
array( | |
'name' => __( 'Postive numbers', 'theme-domain' ), | |
'desc' => __( 'Numbers only', 'msft-newscenter' ), | |
'id' => $prefix . 'number', | |
'type' => 'text', | |
'attributes' => array( | |
'type' => 'number', | |
'pattern' => '\d*', | |
), | |
'sanitization_cb' => 'absint', |
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
// 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 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
/* Arc movement */ | |
.wrapper { | |
width: 500px; | |
margin: 300px 0 0; | |
transition: all 1s; | |
transform-origin: 50% 50%; | |
} | |
.inner { | |
display: inline-block; |
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 | |
// Declare paremeters of Pods | |
// Limiting by 4, and looping through the category slug called "for-parents" | |
$params = array( | |
'limit' => 4, | |
'where' => "category.slug = 'for-parents'" | |
); | |
// Create a variable called $links and assign that my pod called "link" pulling in the parameters from above | |
$links = pods('link', $params ); | |
// If there are more than 0 links, let's display them! |
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
jQuery( function () { | |
My_Object.init( params ); | |
} ); | |
(function ( $, app ) { | |
/** | |
* A variable | |
*/ | |
app.var = 42; | |
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
This is my original template: | |
<ul><a href="{@detail_url}">{@name}</a> | <?php echo str_replace( '.00', '', $obj->field( 'price' ) ); ?> | {@123} </ul> |
NewerOlder