Changeset 2583704
- Timestamp:
- 08/16/2021 06:25:28 PM (5 years ago)
- Location:
- wprequal/trunk
- Files:
-
- 3 edited
-
app/classes/class.PostEntry.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
wprequal.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wprequal/trunk/app/classes/class.PostEntry.php
r2557303 r2583704 47 47 * Post the entry to Connect API. 48 48 * 49 * @param $ post_id49 * @param $lead_id 50 50 */ 51 51 52 public function post( $ post_id ) {52 public function post( $lead_id ) { 53 53 54 54 $endpoint = 'https://wprequal.com/wp-json/wprequal-main/1.0/integration/'; 55 55 $headers = $this->headers(); 56 $entry = $this->get_entry( $ post_id );56 $entry = $this->get_entry( $lead_id ); 57 57 $entry_args = array( 58 58 'body' => array( 'entry' => $entry ), … … 68 68 * Get the entry data. 69 69 * 70 * @param $ post_id70 * @param $lead_id 71 71 * 72 72 * @return array 73 73 */ 74 74 75 public function get_entry( $ post_id ) {75 public function get_entry( $lead_id ) { 76 76 77 $entry = get_post_meta( $ post_id, 'contact', TRUE );77 $entry = get_post_meta( $lead_id, 'contact', TRUE ); 78 78 79 if ( $terms = get_the_terms( $ post_id, 'param_referrer' ) ) {79 if ( $terms = get_the_terms( $lead_id, 'param_referrer' ) ) { 80 80 $entry['referrer'] = $terms[0]->name; 81 81 } 82 82 83 elseif ( $terms = get_the_terms( $ post_id, 'social_referrer' ) ) {83 elseif ( $terms = get_the_terms( $lead_id, 'social_referrer' ) ) { 84 84 $entry['referrer'] = $terms[0]->name; 85 85 } 86 86 87 $entry['tags'] = get_post_meta( $lead_id, 'fields', TRUE ); 87 88 88 return $entry;89 return apply_filters( 'wprequal_post_entry_data', $entry, $lead_id ); 89 90 90 91 } -
wprequal/trunk/readme.txt
r2564598 r2583704 159 159 == Change Log == 160 160 161 = 7.9.1 = 162 * Improvement - Add filter for post entry data 163 * Improvement - Add lead fields as tags for post entry 164 161 165 = 7.9.0 = 162 166 * Bug fix - Allow contact form to use next slide button on survey forms -
wprequal/trunk/wprequal.php
r2564598 r2583704 4 4 Plugin URI: https://wprequal.com 5 5 Description: Mortgage and Real Estate Lead Capture System 6 Version: 7.9. 06 Version: 7.9.1 7 7 Author: WPrequal 8 8 Author URI: https://wprequal.com … … 44 44 45 45 $constants = array( 46 'WPREQUAL_VERSION' => '7.9. 0',46 'WPREQUAL_VERSION' => '7.9.1', 47 47 'WPREQOAL_PLUGIN' => plugin_basename( __FILE__ ), 48 48 'WPREQUAL_OPTIONS' => 'wprequal_options',
Note: See TracChangeset
for help on using the changeset viewer.