Created
March 19, 2014 12:27
-
-
Save vajrasar/9640640 to your computer and use it in GitHub Desktop.
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 | |
/* | |
Template Name: Edit Listing | |
*/ | |
add_filter('gform_field_value_post_title', 'vg_post_title'); | |
add_filter('gform_field_value_post_content', 'vg_post_content'); | |
add_filter('gform_field_value_post_add', 'vg_post_add'); | |
add_filter('gform_field_value_post_mobile', 'vg_post_mobile'); | |
add_filter('gform_field_value_post_landline', 'vg_post_landline'); | |
add_filter('gform_field_value_post_website', 'vg_post_website'); | |
add_filter('gform_field_value_post_fbpage', 'vg_post_fbpage'); | |
add_filter('gform_field_value_post_location', 'vg_post_location'); | |
add_filter('gform_field_value_post_cat', 'vg_post_cat'); | |
function vg_post_title($value){ | |
$gravity_p_id = (int)$_GET['pid']; | |
$gravity_title = get_the_title($gravity_p_id); | |
return $gravity_title; | |
} | |
function vg_post_content($value){ | |
$gravity_p_id = (int)$_GET['pid']; | |
$gravity_content = get_post_field('post_content', $gravity_p_id); | |
return $gravity_content; | |
} | |
function vg_post_add($value){ | |
$gravity_p_id = (int)$_GET['pid']; | |
$gravity_add = get_post_meta($gravity_p_id, 'cmb_dir_add_text', true); | |
return $gravity_add; | |
} | |
function vg_post_mobile($value){ | |
$gravity_p_id = (int)$_GET['pid']; | |
$gravity_phone = get_post_meta($gravity_p_id, 'cmb_dir_phone_text', true); | |
return $gravity_phone; | |
} | |
function vg_post_landline($value){ | |
$gravity_p_id = (int)$_GET['pid']; | |
$gravity_phonefixed = get_post_meta($gravity_p_id, 'cmb_dir_phonefixed_text', true); | |
return $gravity_phonefixed; | |
} | |
function vg_post_website($value){ | |
$gravity_p_id = (int)$_GET['pid']; | |
$gravity_web = get_post_meta($gravity_p_id, 'cmb_dir_web_text', true); | |
return $gravity_web; | |
} | |
function vg_post_fbpage($value){ | |
$gravity_p_id = (int)$_GET['pid']; | |
$gravity_fb = get_post_meta($gravity_p_id, 'cmb_dir_fb_text', true); | |
return $gravity_fb; | |
} | |
function vg_post_location($value){ | |
} | |
function vg_post_cat(){ | |
} | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment