Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Mar 14th, 2013 133 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Id's die bij nieuwe installatie vervangen moeten worden:
  2. $gravity_form_id                        =       1; // ID van het formulier voor abonnementen
  3. $gravity_list_abo_field_id      =       3; // ID van het meerkeuzeveld waar de auteurs en kanalen getoond worden
  4. $abonnement_enkel_prijs =       '1,89';
  5. $abonnementen_alles_prijs       =       '4,49';
  6.  
  7. error_reporting(E_ALL);
  8. ini_set('display_errors', '1');
  9.        
  10. add_filter("gform_pre_render", "list_abonnementen");
  11. function list_abonnementen($form){
  12.    
  13.     echo '<pre>';
  14.     global $post;
  15.     global $gravity_form_id;
  16.     global $gravity_list_abo_field_id;
  17.     global $abonnement_enkel_prijs;
  18.     global $abonnementen_alles_prijs;
  19.  
  20.     if($form["id"] != $gravity_form_id)
  21.        return $form;
  22.  
  23.     foreach($form["fields"] as &$field)
  24.         if($field["id"] == $gravity_list_abo_field_id){
  25.  
  26.             $field['choices'] = array();
  27.             $auteurs_cat = get_category_by_slug( 'auteurs' );
  28.             $kanalen_cat = get_category_by_slug( 'bundels' );
  29.            
  30.             $opties = array_merge(get_categories(array('parent' => $auteurs_cat->term_id)), get_categories(array('parent' => $kanalen_cat->term_id)));
  31.            
  32.             foreach($opties as $key => $optie) {
  33.                     $field['choices'][$key]['text'] = $optie->name;
  34.                         $field['choices'][$key]['value'] = $optie->name;
  35.                         $field['choices'][$key]['isSelected'] = "";
  36.                         $field['choices'][$key]['price'] = $abonnement_enkel_prijs;  
  37.             }
  38.         }
  39.        
  40.         echo '</pre>';
  41.  
  42.     return $form;
  43. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top