Plugin Directory

Changeset 2583704


Ignore:
Timestamp:
08/16/2021 06:25:28 PM (5 years ago)
Author:
wprequal
Message:

Commit v7.9.1

Location:
wprequal/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wprequal/trunk/app/classes/class.PostEntry.php

    r2557303 r2583704  
    4747     * Post the entry to Connect API.
    4848     *
    49      * @param $post_id
     49     * @param $lead_id
    5050     */
    5151
    52     public function post( $post_id ) {
     52    public function post( $lead_id ) {
    5353
    5454        $endpoint   = 'https://wprequal.com/wp-json/wprequal-main/1.0/integration/';
    5555        $headers    = $this->headers();
    56         $entry      = $this->get_entry( $post_id );
     56        $entry      = $this->get_entry( $lead_id );
    5757        $entry_args = array(
    5858            'body'     => array( 'entry' => $entry ),
     
    6868     * Get the entry data.
    6969     *
    70      * @param $post_id
     70     * @param $lead_id
    7171     *
    7272     * @return array
    7373     */
    7474
    75     public function get_entry( $post_id ) {
     75    public function get_entry( $lead_id ) {
    7676
    77         $entry = get_post_meta( $post_id, 'contact', TRUE );
     77        $entry = get_post_meta( $lead_id, 'contact', TRUE );
    7878
    79         if ( $terms = get_the_terms( $post_id, 'param_referrer' ) ) {
     79        if ( $terms = get_the_terms( $lead_id, 'param_referrer' ) ) {
    8080            $entry['referrer'] = $terms[0]->name;
    8181        }
    8282
    83         elseif ( $terms = get_the_terms( $post_id, 'social_referrer' ) ) {
     83        elseif ( $terms = get_the_terms( $lead_id, 'social_referrer' ) ) {
    8484            $entry['referrer'] = $terms[0]->name;
    8585        }
    8686
     87        $entry['tags'] = get_post_meta( $lead_id, 'fields', TRUE );
    8788
    88         return $entry;
     89        return apply_filters( 'wprequal_post_entry_data', $entry, $lead_id );
    8990
    9091    }
  • wprequal/trunk/readme.txt

    r2564598 r2583704  
    159159== Change Log ==
    160160
     161= 7.9.1 =
     162* Improvement - Add filter for post entry data
     163* Improvement - Add lead fields as tags for post entry
     164
    161165= 7.9.0 =
    162166* Bug fix - Allow contact form to use next slide button on survey forms
  • wprequal/trunk/wprequal.php

    r2564598 r2583704  
    44Plugin URI:  https://wprequal.com
    55Description: Mortgage and Real Estate Lead Capture System
    6 Version:     7.9.0
     6Version:     7.9.1
    77Author:      WPrequal
    88Author URI:  https://wprequal.com
     
    4444
    4545$constants = array(
    46     'WPREQUAL_VERSION'            => '7.9.0',
     46    'WPREQUAL_VERSION'            => '7.9.1',
    4747    'WPREQOAL_PLUGIN'             => plugin_basename( __FILE__ ),
    4848    'WPREQUAL_OPTIONS'            => 'wprequal_options',
Note: See TracChangeset for help on using the changeset viewer.