Plugin Directory

Changeset 2995612


Ignore:
Timestamp:
11/14/2023 08:41:06 AM (2 years ago)
Author:
joanv
Message:

v2.2.4 always add jobLocation to Google Jobs JSON

Location:
jobsearch
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • jobsearch/frontEnd/job/helper/jobHelper.php

    r2674369 r2995612  
    550550        }
    551551
     552        $script .= '"jobLocation": {';
     553        $script .= '"@type": "Place",';
     554        $script .= '"address": {';
     555        $script .= '"@type": "PostalAddress",';
     556        $script .= '"streetAddress": "",';
     557        $script .= '"addressLocality": "'.(isset($fields["city"])?$fields["city"]:'').'",';
     558        $script .= '"addressRegion": "'.(isset($fields["region"])?$fields["region"]:'').'",';
     559        $script .= '"postalCode": "'.(isset($fields["postal_code"])?$fields["postal_code"]:'').'",';
     560        $script .= '"addressCountry": "'.(isset($fields["country"])?$fields["country"]:'').'"';
     561        $script .= '},';
     562
    552563        if (isset( $fields["location"]) && $fields["location"] <> ''){
    553564            $script .= '"jobLocation": {';
     
    557568            $script .= '"addressLocality": "'.$fields["location"].'"';
    558569            $script .= '}';
    559             $script .= '},';
    560         }
     570        }
     571        $script .= '},';
    561572
    562573        if (isset( $fields["description"]) && $fields["description"] <> ''){
  • jobsearch/helper/Job.php

    r2614212 r2995612  
    182182                $this->set_condition($jobHelper->tdb_jb_get_json_value($xml->{'conditions'}));
    183183            }
    184             // selling point
     184            // selling points
    185185            if(isset($xml->{'company'}->{'selling_points'}) && !empty($param["selling_points"])) {
    186186                $this->set_selling_points($jobHelper->tdb_jb_get_json_value($xml->{'company'}->{'selling_points'}));
     
    190190                $this->set_address($xml->{'address'});
    191191            }
    192             // address
     192            // working hours
    193193            if(isset($xml->{'working_hours'}) && !empty($param["working_hours"])) {
    194194                $this->set_working_hours($jobHelper->tdb_jb_get_json_value($xml->{'working_hours'}));
  • jobsearch/trunk/frontEnd/job/helper/jobHelper.php

    r2674369 r2995612  
    550550        }
    551551
     552        $script .= '"jobLocation": {';
     553        $script .= '"@type": "Place",';
     554        $script .= '"address": {';
     555        $script .= '"@type": "PostalAddress",';
     556        $script .= '"streetAddress": "",';
     557        $script .= '"addressLocality": "'.(isset($fields["city"])?$fields["city"]:'').'",';
     558        $script .= '"addressRegion": "'.(isset($fields["region"])?$fields["region"]:'').'",';
     559        $script .= '"postalCode": "'.(isset($fields["postal_code"])?$fields["postal_code"]:'').'",';
     560        $script .= '"addressCountry": "'.(isset($fields["country"])?$fields["country"]:'').'"';
     561        $script .= '},';
     562
    552563        if (isset( $fields["location"]) && $fields["location"] <> ''){
    553564            $script .= '"jobLocation": {';
     
    557568            $script .= '"addressLocality": "'.$fields["location"].'"';
    558569            $script .= '}';
    559             $script .= '},';
    560         }
     570        }
     571        $script .= '},';
    561572
    562573        if (isset( $fields["description"]) && $fields["description"] <> ''){
  • jobsearch/trunk/helper/Job.php

    r2614212 r2995612  
    182182                $this->set_condition($jobHelper->tdb_jb_get_json_value($xml->{'conditions'}));
    183183            }
    184             // selling point
     184            // selling points
    185185            if(isset($xml->{'company'}->{'selling_points'}) && !empty($param["selling_points"])) {
    186186                $this->set_selling_points($jobHelper->tdb_jb_get_json_value($xml->{'company'}->{'selling_points'}));
     
    190190                $this->set_address($xml->{'address'});
    191191            }
    192             // address
     192            // working hours
    193193            if(isset($xml->{'working_hours'}) && !empty($param["working_hours"])) {
    194194                $this->set_working_hours($jobHelper->tdb_jb_get_json_value($xml->{'working_hours'}));
Note: See TracChangeset for help on using the changeset viewer.