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 | |
| /** | |
| * Attach images uploaded through Gravity Form to ACF Gallery Field | |
| * | |
| * @author Joshua David Nelson, [email protected] | |
| * @return void | |
| */ | |
| $gravity_form_id = 1; // gravity form id, or replace {$gravity_form_id} below with this number | |
| add_filter( "gform_after_submission_{$gravity_form_id}", 'jdn_set_post_acf_gallery_field', 10, 2 ); | |
| function jdn_set_post_acf_gallery_field( $entry, $form ) { | 
  
    
      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 count on the repeater field | |
| // mabye use get_sub_field() instead of get_field() if it's nested | |
| $count = count( get_sub_field( 'the_field' ) ); | |
| // begin $count conditions | |
| if ( $count > 1 ) { ?> | |
| // greater than 1 | |
| <?php the_field( 'great_than_1' ); ?> | |
| <?php } else { ?> | 
  
    
      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 //* Mind this opening PHP tag | |
| /** | |
| * Send an email to the invoice_client_email custom field in the Invoice post type | |
| * The acf/save_post hook is specific to the Advanced Custom Fields plugin | |
| * | |
| * @author Ren Ventura | |
| * @link http://www.engagewp.com/create-invoices-gravty-forms-wordpress | |
| */ | 
  
    
      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
    
  
  
    
  | @{ | |
| var media = product.GetPropertyValue<string>("MainProductImage"); | |
| var mediaSource = umbracoHelper.TypedMedia(media); | |
| } | |
| <img src="@mediaSource.GetCropUrl("umbracoFile", "store-product-medium")" class="main-image" /> | 
OlderNewer