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/common/src/Tribe/Editor/Configuration.php
<?php

/**
 * Class Tribe__Editor__Configuration
 *
 * setup the configuration variables used on the editor
 *
 * @since 4.8
 */
class Tribe__Editor__Configuration implements Tribe__Editor__Configuration_Interface {
	/**
	 * Localize variables that are part of common
	 *
	 * @since 4.8
	 *
	 * @return array
	 */
	public function localize() {
		$editor_config = array(
			'common' => array(
				'adminUrl'     => admin_url(),
				'timeZone'     => array(
					'showTimeZone' => false,
					'label'        => $this->get_timezone_label(),
				),
				'rest'         => array(
					'url'        => get_rest_url(),
					'nonce'      => array(
						'wp_rest' => wp_create_nonce( 'wp_rest' ),
					),
					'namespaces' => array(
						'core' => 'wp/v2',
					),
				),
				'dateSettings' => $this->get_date_settings(),
				'constants'    => array(
					'hideUpsell' => ( defined( 'TRIBE_HIDE_UPSELL' ) && TRIBE_HIDE_UPSELL ),
				),
				'countries'    => tribe( 'languages.locations' )->get_countries(),
				'usStates'     => Tribe__View_Helpers::loadStates(),
			),
		);

		/**
		 * Filter the default configuration used to localize variables
		 *
		 * @since 4.8
		 *
		 * array $editor_config An associative array with the configuration to be send into the client
		 */
		return apply_filters( 'tribe_editor_config', $editor_config );
	}


	/**
	 * Returns the site timezone as a string
	 *
	 * @since 4.8
	 *
	 * @return string
	 */
	public function get_timezone_label() {
		return class_exists( 'Tribe__Timezones' )
			? Tribe__Timezones::wp_timezone_string()
			: get_option( 'timezone_string', 'UTC' );
	}

	/**
	 * Get Localization data for Date settings
	 *
	 * @since 4.8
	 *
	 * @return array
	 */
	public function get_date_settings() {
		global $wp_locale;

		return array(
			'l10n'     => array(
				'locale'        => get_user_locale(),
				'months'        => array_values( $wp_locale->month ),
				'monthsShort'   => array_values( $wp_locale->month_abbrev ),
				'weekdays'      => array_values( $wp_locale->weekday ),
				'weekdaysShort' => array_values( $wp_locale->weekday_abbrev ),
				'meridiem'      => (object) $wp_locale->meridiem,
				'relative'      => array(
					/* translators: %s: duration */
					'future' => __( '%s from now', 'default' ),
					/* translators: %s: duration */
					'past'   => __( '%s ago', 'default' ),
				),
			),
			'formats'  => array(
				'time'       => get_option( 'time_format', __( 'g:i a', 'default' ) ),
				'date'       => get_option( 'date_format', __( 'F j, Y', 'default' ) ),
				'dateNoYear' => __( 'F j', 'default' ),
				'datetime'   => get_option( 'date_format', __( 'F j, Y', 'default' ) ) . ' ' . get_option( 'time_format', __( 'g:i a', 'default' ) ),
			),
			'timezone' => array(
				'offset' => get_option( 'gmt_offset', 0 ),
				'string' => $this->get_timezone_label(),
			),
		);
	}
}