| Server IP : 80.74.154.100 / Your IP : 216.73.217.0 Web Server : Apache System : Linux marissa.metanet.ch 4.18.0-553.141.2.lve.el7h.x86_64 #1 SMP Wed Jul 8 17:20:31 UTC 2026 x86_64 User : onlineadmin ( 10487) PHP Version : 8.5.7 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/httpd/vhosts/comeonline.ch/httpdocs/wp-content/plugins/wpsso/lib/json/type/ |
Upload File : |
<?php
/*
* License: GPLv3
* License URI: https://www.gnu.org/licenses/gpl.txt
* Copyright 2016-2026 Jean-Sebastien Morisset (https://wpsso.com/)
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'These aren\'t the droids you\'re looking for.' );
}
if ( ! class_exists( 'WpssoJsonTypeJobPosting' ) ) {
class WpssoJsonTypeJobPosting {
private $p; // Wpsso class object.
/*
* Instantiated by Wpsso->init_json_filters().
*/
public function __construct( &$plugin ) {
$this->p =& $plugin;
if ( $this->p->debug->enabled ) {
$this->p->debug->mark();
}
$this->p->util->add_plugin_filters( $this, array(
'json_data_https_schema_org_jobposting' => 5,
) );
}
/*
* See https://developers.google.com/search/docs/appearance/structured-data/job-posting.
*/
public function filter_json_data_https_schema_org_jobposting( $json_data, $mod, $mt_og, $page_type_id, $is_main ) {
if ( $this->p->debug->enabled ) {
$this->p->debug->mark();
}
$json_ret = array();
/*
* Add the Job.
*/
WpssoSchemaSingle::add_job_data( $json_ret, $mod, $job_id = null, $list_el = false );
/*
* See https://schema.org/datePosted.
*/
WpssoSchema::add_data_itemprop_from_assoc( $json_ret, $mt_og, array(
'datePosted' => 'article:published_time',
) );
/*
* Add media.
*
* See https://schema.org/image as https://schema.org/ImageObject.
*/
if ( $this->p->debug->enabled ) {
$this->p->debug->log( 'adding image property for jobposting (videos disabled)' );
}
WpssoSchema::add_media_data( $json_ret, $mod, $mt_og, $size_names = 'schema', $add_video = false );
if ( $this->p->debug->enabled ) {
$this->p->debug->log( 'merging json_data and json_ret arrays' );
}
return WpssoSchema::return_data_from_filter( $json_data, $json_ret, $is_main );
}
}
}