コード例 #1
0
function custom_post_type_onomies_gform_post_submission_save_taxonomies($entry, $form)
{
    // Check if the class exists and the submission contains a WordPress post
    if (class_exists('GFCPTAddon1_5') && isset($entry['post_id'])) {
        $GFCPTAddon1_5 = new GFCPTAddon1_5();
        foreach ($form['fields'] as &$field) {
            if ($taxonomy = $GFCPTAddon1_5->get_field_taxonomy($field)) {
                custom_post_type_onomies_gform_post_submission_save_taxonomy_field($field, $entry, $taxonomy);
            }
        }
    }
}
コード例 #2
0
ファイル: gfcptaddon.php プロジェクト: hansstam/makerfaire
 public static function init()
 {
     if (self::is_gravityforms_installed()) {
         global $gf_cpt_addon;
         //include the base class
         require_once self::get_base_path() . '/gfcptaddonbase.php';
         //only supports 1.5 and over
         require_once self::get_base_path() . '/gfcptaddon_1-5.php';
         $gf_cpt_addon = new GFCPTAddon1_5();
         //start me up!
         $gf_cpt_addon->init(__FILE__);
     }
 }