. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AnonSec Shell
AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.216.168   [ Reverse IP ]
Web Server : Apache
System : Linux webm002.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User : eticmes ( 123698)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/eticmes/www/wp-content/plugins/the-events-calendar/src/Tribe/Event_Status/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home/eticmes/www/wp-content/plugins/the-events-calendar/src/Tribe/Event_Status/JSON_LD.php
<?php
/**
 * The Event Status JSON LD modifier.
 *
 * @package Tribe\Events\Event_Status
 * @since   5.11.0
 */

namespace Tribe\Events\Event_Status;

use WP_Post;

/**
 * Class JSON_LD.
 *
 * @since   5.11.0
 *
 * @package Tribe\Events\Event_Status
 */
class JSON_LD {

	/**
	 * Schema for EventScheduled event status.
	 *
	 * @since 6.0.11
	 */
	const SCHEDULED_SCHEMA = 'https://schema.org/EventScheduled';

	/**
	 * The reference schema URL for an offline event attendance mode.
	 *
	 * @since 5.11.0
	 */
	const OFFLINE_EVENT_ATTENDANCE_MODE = 'https://schema.org/OfflineEventAttendanceMode';

	/**
	 * The reference schema URL for a canceled event attendance mode.
	 *
	 * @since 5.11.0
	 */
	const CANCELED_SCHEMA = 'https://schema.org/EventCancelled';

	/**
	 * The reference schema URL for a postponed event attendance mode.
	 *
	 * @since 5.11.0
	 */
	const POSTPONED_SCHEMA = 'https://schema.org/EventPostponed';


	/**
	 * Modifiers to the JSON LD event object.
	 *
	 * @since 5.11.0
	 * @since 6.0.11 Adding a default value for eventStatus.
	 *
	 * @param object  $data The JSON-LD object.
	 * @param array   $args The arguments used to get data.
	 * @param WP_Post $post The post object.
	 *
	 * @return object JSON LD object after modifications.
	 */
	public function modify_event( $data, $args, $post ) {
		$event = tribe_get_event( $post );

		if ( ! $event instanceof \WP_Post) {
			return $data;
		}

		/**
		 * Filters the default attendance mode.
		 *
		 * @since 5.11.0
		 *
		 * @param string  $attendance_mode The default attendance mode.
		 * @param object  $data            The JSON-LD object.
		 * @param array   $args            The arguments used to get data.
		 * @param WP_Post $post            The post object.
		 */
		$attendance_mode = apply_filters( 'tec_event_status_default_single_event_online_status', static::OFFLINE_EVENT_ATTENDANCE_MODE, $data, $args, $post );

		$data->eventAttendanceMode = $attendance_mode;

		// Set event status schema.
		$data->eventStatus = static::SCHEDULED_SCHEMA;
		if ( 'canceled' === $event->event_status ) {
			$data->eventStatus = static::CANCELED_SCHEMA;
		} elseif ( 'postponed' === $event->event_status ) {
			$data->eventStatus = static::POSTPONED_SCHEMA;
		}

		return $data;
	}
}

Anon7 - 2022
AnonSec Team