HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/lipovac/wp-content/plugins/the-events-calendar/src/Tribe/REST/V1/System.php
<?php


/**
 * Class Tribe__Events__REST__V1__System
 *
 * Handles scanning and asserting the current WordPress installation support of
 * TEC REST API.
 */
class Tribe__Events__REST__V1__System extends Tribe__REST__System {

	/**
	 * @var string The name of the option that enables or disables the TEC REST API support.
	 */
	protected static $disable_option_name = 'rest-v1-disabled';

	/**
	 * Whether TEC REST API is supported by the WP installation or not.
	 *
	 * @return bool
	 */
	public function supports_tec_rest_api() {
		return $this->supports_wp_rest_api();
	}

	/**
	 * Whether The Events Calendar REST API is enabled or not for the WP installation.
	 *
	 * @return bool
	 */
	public function tec_rest_api_is_enabled() {
		$enabled = $this->supports_tec_rest_api() && false == tribe_get_option( self::$disable_option_name );

		/**
		 * Filters whether TEC REST API is enabled or not for the WP installation.
		 *
		 * @param bool $enabled
		 */
		return apply_filters( 'tribe_events_rest_api_enabled', $enabled );
	}


	/**
	 * Returns the name of the option used to indicate whether TEC REST API is enabled or not for
	 * the WP installation.
	 *
	 * The option is stored in The Events Calendar options database record: use `tribe_get_option()`
	 * to get it.
	 *
	 * @return string
	 */
	public static function get_disable_option_name() {
		return self::$disable_option_name;
	}
}