✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.105
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/tdhomesa/tdtravelandlogistics.com/wp-content/plugins/jetpack//class.jetpack-autoupdate.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
 * Handles items that have been selected for automatic updates.
 * Hooks into WP_Automatic_Updater
 *
 * @package automattic/jetpack
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit( 0 );
}

/**
 * Handles items that have been selected for automatic updates.
 * Hooks into WP_Automatic_Updater
 */
class Jetpack_Autoupdate {

	/**
	 * Results.
	 *
	 * @var array
	 */
	private $results = array();

	/**
	 * Expected updates.
	 *
	 * @var array
	 */
	private $expected = array();

	/**
	 * Successful updates.
	 *
	 * @var array
	 */
	private $success = array(
		'plugin' => array(),
		'theme'  => array(),
	);

	/**
	 * Failed updates.
	 *
	 * @var array
	 */
	private $failed = array(
		'plugin' => array(),
		'theme'  => array(),
	);

	/**
	 * Static instance.
	 *
	 * @var self
	 */
	private static $instance = null;

	/**
	 * Initialize and fetch the static instance.
	 *
	 * @return self
	 */
	public static function init() {
		if ( self::$instance === null ) {
			self::$instance = new Jetpack_Autoupdate();
		}

		return self::$instance;
	}

	/** Constructor. */
	private function __construct() {
		if (
			/** This filter is documented in class.jetpack-json-api-endpoint.php */
			apply_filters( 'jetpack_json_manage_api_enabled', true )
		) {
			add_filter( 'auto_update_theme', array( $this, 'autoupdate_theme' ), 10, 2 );
			add_filter( 'auto_update_core', array( $this, 'autoupdate_core' ), 10, 2 );
			add_filter( 'auto_update_translation', array( $this, 'autoupdate_translation' ), 10, 2 );
			add_action( 'automatic_updates_complete', array( $this, 'automatic_updates_complete' ), 999, 1 );
		}
	}

	/**
	 * Filter function for `auto_update_translation`.
	 *
	 * @param bool|null $update Whether to update.
	 * @param object    $item  The update offer.
	 * @return bool|null Whether to update.
	 */
	public function autoupdate_translation( $update, $item ) {
		// Autoupdate all translations.
		if ( Jetpack_Options::get_option( 'autoupdate_translations', false ) ) {
			return true;
		}

		if ( ! isset( $item->slug ) || ! isset( $item->type ) ) {
			return $update;
		}

		// Themes.
		$autoupdate_themes_translations = Jetpack_Options::get_option( 'autoupdate_themes_translations', array() );
		$autoupdate_theme_list          = Jetpack_Options::get_option( 'autoupdate_themes', array() );

		if ( ( in_array( $item->slug, $autoupdate_themes_translations, true ) || in_array( $item->slug, $autoupdate_theme_list, true ) )
			&& 'theme' === $item->type
		) {
			$this->expect( $item->type . ':' . $item->slug, 'translation' );

			return true;
		}

		// Plugins.
		$autoupdate_plugin_translations = Jetpack_Options::get_option( 'autoupdate_plugins_translations', array() );
		$autoupdate_plugin_list         = (array) get_site_option( 'auto_update_plugins', array() );
		$plugin_files                   = array_unique( array_merge( $autoupdate_plugin_list, $autoupdate_plugin_translations ) );
		$plugin_slugs                   = array_map( array( __CLASS__, 'get_plugin_slug' ), $plugin_files );

		if ( in_array( $item->slug, $plugin_slugs, true )
			&& 'plugin' === $item->type
		) {
			$this->expect( $item->type . ':' . $item->slug, 'translation' );
			return true;
		}

		return $update;
	}

	/**
	 * Filter function for `auto_update_theme`.
	 *
	 * @param bool|null $update Whether to update.
	 * @param object    $item  The update offer.
	 * @return bool|null Whether to update.
	 */
	public function autoupdate_theme( $update, $item ) {
		if ( ! isset( $item->theme ) ) {
			return $update;
		}
		$autoupdate_theme_list = Jetpack_Options::get_option( 'autoupdate_themes', array() );
		if ( in_array( $item->theme, $autoupdate_theme_list, true ) ) {
			$this->expect( $item->theme, 'theme' );
			return true;
		}

		return $update;
	}

	/**
	 * Filter function for `auto_update_core`.
	 *
	 * @param bool|null $update Whether to update.
	 * @return bool|null Whether to update.
	 */
	public function autoupdate_core( $update ) {
		$autoupdate_core = Jetpack_Options::get_option( 'autoupdate_core', false );
		if ( $autoupdate_core ) {
			return $autoupdate_core;
		}

		return $update;
	}

	/**
	 * Stores the an item identifier to the expected array.
	 *
	 * @param string $item Example: 'jetpack/jetpack.php' for type 'plugin' or 'twentyfifteen' for type 'theme'.
	 * @param string $type 'plugin' or 'theme'.
	 */
	private function expect( $item, $type ) {
		if ( ! isset( $this->expected[ $type ] ) ) {
			$this->expected[ $type ] = array();
		}
		$this->expected[ $type ][] = $item;
	}

	/**
	 * On completion of an automatic update, let's store the results.
	 *
	 * @param mixed $results - Sent by WP_Automatic_Updater after it completes an autoupdate action. Results may be empty.
	 */
	public function automatic_updates_complete( $results ) {
		if ( empty( $this->expected ) ) {
			return;
		}
		$this->results = empty( $results ) ? self::get_possible_failures() : $results;

		add_action( 'shutdown', array( $this, 'bump_stats' ) );

		Jetpack::init();

		$items_to_log = array( 'plugin', 'theme', 'translation' );
		foreach ( $items_to_log as $items ) {
			$this->log_items( $items );
		}

		Jetpack::log( 'autoupdates', $this->get_log() );
	}

	/**
	 * Get log data.
	 *
	 * @return array Data.
	 */
	public function get_log() {
		return array(
			'results' => $this->results,
			'failed'  => $this->failed,
			'success' => $this->success,
		);
	}

	/**
	 * Iterates through expected items ( plugins or themes ) and compares them to actual results.
	 *
	 * @param string $items 'plugin' or 'theme'.
	 */
	private function log_items( $items ) {
		if ( ! isset( $this->expected[ $items ] ) ) {
			return;
		}

		$item_results = $this->get_successful_updates( $items );

		if ( is_array( $this->expected[ $items ] ) ) {
			foreach ( $this->expected[ $items ] as $item ) {
				if ( in_array( $item, $item_results, true ) ) {
					$this->success[ $items ][] = $item;
				} else {
					$this->failed[ $items ][] = $item;
				}
			}
		}
	}

	/**
	 * Bump stats.
	 */
	public function bump_stats() {
		$instance = Jetpack::init();
		$log      = array();
		// Bump numbers.

		if ( ! empty( $this->success['theme'] ) ) {
			$instance->stat( 'autoupdates/theme-success', is_countable( $this->success['theme'] ) ? count( $this->success['theme'] ) : 0 );
			$log['themes_success'] = $this->success['theme'];
		}

		if ( ! empty( $this->failed['theme'] ) ) {
			$instance->stat( 'autoupdates/theme-fail', is_countable( $this->failed['theme'] ) ? count( $this->failed['theme'] ) : 0 );
			$log['themes_failed'] = $this->failed['theme'];
		}

		$instance->do_stats( 'server_side' );

		// Send a more detailed log to logstash.
		if ( ! empty( $log ) ) {
			$xml            = new Jetpack_IXR_Client(
				array(
					'user_id' => get_current_user_id(),
				)
			);
			$log['blog_id'] = Jetpack_Options::get_option( 'id' );
			$xml->query( 'jetpack.debug_autoupdate', $log );
		}
	}

	/**
	 * Parses the autoupdate results generated by WP_Automatic_Updater and returns a simple array of successful items.
	 *
	 * @param string $type 'plugin' or 'theme'.
	 * @return array
	 */
	private function get_successful_updates( $type ) {
		$successful_updates = array();

		if ( ! isset( $this->results[ $type ] ) ) {
			return $successful_updates;
		}

		foreach ( $this->results[ $type ] as $result ) {
			if ( $result->result ) {
				switch ( $type ) {
					case 'theme':
						$successful_updates[] = $result->item->theme;
						break;
					case 'translation':
						$successful_updates[] = $result->item->type . ':' . $result->item->slug;
						break;
				}
			}
		}

		return $successful_updates;
	}

	/**
	 * Get possible failure codes.
	 *
	 * @return string[] Failure codes.
	 */
	public static function get_possible_failures() {
		$result = array();
		// Lets check some reasons why it might not be working as expected.
		include_once ABSPATH . '/wp-admin/includes/admin.php';
		include_once ABSPATH . '/wp-admin/includes/class-wp-upgrader.php';
		$upgrader = new WP_Automatic_Updater();

		if ( $upgrader->is_disabled() ) {
			$result[] = 'autoupdates-disabled';
		}
		if ( ! is_main_site() ) {
			$result[] = 'is-not-main-site';
		}
		if ( ! is_main_network() ) {
			$result[] = 'is-not-main-network';
		}
		if ( $upgrader->is_vcs_checkout( ABSPATH ) ) {
			$result[] = 'site-on-vcs';
		}
		if ( $upgrader->is_vcs_checkout( WP_PLUGIN_DIR ) ) {
			$result[] = 'plugin-directory-on-vcs';
		}
		if ( $upgrader->is_vcs_checkout( WP_CONTENT_DIR ) ) {
			$result[] = 'content-directory-on-vcs';
		}
		$lock = get_option( 'auto_updater.lock' );
		if ( $lock > ( time() - HOUR_IN_SECONDS ) ) {
			$result[] = 'lock-is-set';
		}
		$skin = new Automatic_Upgrader_Skin();
		include_once ABSPATH . 'wp-admin/includes/file.php';
		include_once ABSPATH . 'wp-admin/includes/template.php';
		if ( ! $skin->request_filesystem_credentials( false, ABSPATH, false ) ) {
			$result[] = 'no-system-write-access';
		}
		if ( ! $skin->request_filesystem_credentials( false, WP_PLUGIN_DIR, false ) ) {
			$result[] = 'no-plugin-directory-write-access';
		}
		if ( ! $skin->request_filesystem_credentials( false, WP_CONTENT_DIR, false ) ) {
			$result[] = 'no-wp-content-directory-write-access';
		}

		return $result;
	}

	/**
	 * Get the plugin slug.
	 *
	 * @param string $plugin_file Plugin file.
	 * @return string Slug.
	 */
	public static function get_plugin_slug( $plugin_file ) {
		$update_plugins = get_site_transient( 'update_plugins' );
		if ( isset( $update_plugins->no_update ) ) {
			if ( isset( $update_plugins->no_update[ $plugin_file ]->slug ) ) {
				$slug = $update_plugins->no_update[ $plugin_file ]->slug;
			}
		}
		if ( empty( $slug ) && isset( $update_plugins->response ) ) {
			if ( isset( $update_plugins->response[ $plugin_file ]->slug ) ) {
				$slug = $update_plugins->response[ $plugin_file ]->slug;
			}
		}

		// Try to infer from the plugin file if not cached.
		if ( empty( $slug ) ) {
			$slug = dirname( $plugin_file );
			if ( '.' === $slug ) {
				$slug = preg_replace( '/(.+)\.php$/', '$1', $plugin_file );
			}
		}
		return $slug;
	}
}

Jetpack_Autoupdate::init();


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
22 Jun 2026 6.38 AM
tdhomesa / tdhomesa
0755
3rd-party
--
11 Jun 2026 10.18 AM
tdhomesa / tdhomesa
0755
_inc
--
11 Jun 2026 10.18 AM
tdhomesa / tdhomesa
0755
css
--
11 Jun 2026 10.18 AM
tdhomesa / tdhomesa
0755
extensions
--
11 Jun 2026 10.18 AM
tdhomesa / tdhomesa
0755
images
--
11 Jun 2026 10.18 AM
tdhomesa / tdhomesa
0755
jetpack_vendor
--
11 Jun 2026 10.18 AM
tdhomesa / tdhomesa
0755
json-endpoints
--
11 Jun 2026 10.18 AM
tdhomesa / tdhomesa
0755
modules
--
11 Jun 2026 10.18 AM
tdhomesa / tdhomesa
0755
sal
--
11 Jun 2026 10.18 AM
tdhomesa / tdhomesa
0755
src
--
11 Jun 2026 10.18 AM
tdhomesa / tdhomesa
0755
vendor
--
11 Jun 2026 10.18 AM
tdhomesa / tdhomesa
0755
views
--
11 Jun 2026 10.18 AM
tdhomesa / tdhomesa
0755
.htaccess
0.124 KB
22 Jun 2026 6.39 AM
tdhomesa / tdhomesa
0444
CHANGELOG.md
785.222 KB
9 Jun 2026 8.23 PM
tdhomesa / tdhomesa
0644
LICENSE.txt
18.199 KB
22 Dec 2025 3.30 PM
tdhomesa / tdhomesa
0644
SECURITY.md
2.434 KB
1 Jun 2026 7.52 PM
tdhomesa / tdhomesa
0644
class-jetpack-connection-status.php
0.711 KB
20 Sep 2023 1.19 AM
tdhomesa / tdhomesa
0644
class-jetpack-gallery-settings.php
3.474 KB
24 Nov 2025 10.00 PM
tdhomesa / tdhomesa
0644
class-jetpack-newsletter-dashboard-widget.php
0.426 KB
24 Nov 2025 10.00 PM
tdhomesa / tdhomesa
0644
class-jetpack-pre-connection-jitms.php
2.338 KB
25 Mar 2024 10.39 PM
tdhomesa / tdhomesa
0644
class-jetpack-stats-dashboard-widget.php
7.457 KB
2 Mar 2026 5.30 PM
tdhomesa / tdhomesa
0644
class-jetpack-xmlrpc-methods.php
7.372 KB
8 Jun 2026 8.52 PM
tdhomesa / tdhomesa
0644
class.frame-nonce-preview.php
3.217 KB
24 Nov 2025 10.00 PM
tdhomesa / tdhomesa
0644
class.jetpack-admin.php
22.641 KB
8 Jun 2026 8.52 PM
tdhomesa / tdhomesa
0644
class.jetpack-autoupdate.php
9.929 KB
24 Nov 2025 10.00 PM
tdhomesa / tdhomesa
0644
class.jetpack-cli.php
74.098 KB
1 Jun 2026 7.52 PM
tdhomesa / tdhomesa
0644
class.jetpack-client-server.php
2.621 KB
27 Mar 2024 6.05 PM
tdhomesa / tdhomesa
0644
class.jetpack-gutenberg.php
45.256 KB
25 May 2026 6.51 PM
tdhomesa / tdhomesa
0644
class.jetpack-heartbeat.php
4.441 KB
10 Feb 2026 2.53 PM
tdhomesa / tdhomesa
0644
class.jetpack-modules-list-table.php
14.813 KB
24 Nov 2025 10.00 PM
tdhomesa / tdhomesa
0644
class.jetpack-network-sites-list-table.php
6.028 KB
24 Nov 2025 10.00 PM
tdhomesa / tdhomesa
0644
class.jetpack-network.php
22.678 KB
8 Jun 2026 8.52 PM
tdhomesa / tdhomesa
0644
class.jetpack-plan.php
4.094 KB
19 Jun 2023 11.16 PM
tdhomesa / tdhomesa
0644
class.jetpack-post-images.php
11.724 KB
9 Mar 2026 5.14 PM
tdhomesa / tdhomesa
0644
class.jetpack-twitter-cards.php
5.692 KB
23 Feb 2026 3.49 PM
tdhomesa / tdhomesa
0644
class.jetpack-user-agent.php
25.304 KB
20 May 2024 11.33 PM
tdhomesa / tdhomesa
0644
class.jetpack.php
208.16 KB
8 Jun 2026 8.52 PM
tdhomesa / tdhomesa
0644
class.json-api-endpoints.php
91.595 KB
8 Jun 2026 8.52 PM
tdhomesa / tdhomesa
0644
class.json-api.php
38.296 KB
19 May 2026 1.55 PM
tdhomesa / tdhomesa
0644
class.photon.php
1.736 KB
8 May 2023 8.57 PM
tdhomesa / tdhomesa
0644
composer.json
4.373 KB
9 Jun 2026 8.23 PM
tdhomesa / tdhomesa
0644
enhanced-open-graph.php
4.678 KB
25 May 2026 6.51 PM
tdhomesa / tdhomesa
0644
functions.compat.php
4.336 KB
23 Feb 2026 3.49 PM
tdhomesa / tdhomesa
0644
functions.cookies.php
2.038 KB
21 Nov 2023 5.47 PM
tdhomesa / tdhomesa
0644
functions.global.php
15.874 KB
1 Jun 2026 7.52 PM
tdhomesa / tdhomesa
0644
functions.is-mobile.php
2.47 KB
20 Sep 2023 1.19 AM
tdhomesa / tdhomesa
0644
functions.opengraph.php
30.988 KB
9 Mar 2026 5.14 PM
tdhomesa / tdhomesa
0644
functions.photon.php
3.037 KB
20 Sep 2023 1.19 AM
tdhomesa / tdhomesa
0644
jetpack.php
8.917 KB
9 Jun 2026 8.23 PM
tdhomesa / tdhomesa
0644
json-api-config.php
0.33 KB
8 Nov 2022 2.55 AM
tdhomesa / tdhomesa
0644
json-endpoints.php
6.925 KB
20 Sep 2023 1.19 AM
tdhomesa / tdhomesa
0644
load-jetpack.php
3.813 KB
25 May 2026 6.51 PM
tdhomesa / tdhomesa
0644
locales.php
0.362 KB
24 Nov 2025 10.00 PM
tdhomesa / tdhomesa
0644
readme.txt
37.17 KB
9 Jun 2026 8.24 PM
tdhomesa / tdhomesa
0644
unauth-file-upload.php
5.854 KB
3 Dec 2025 4.52 AM
tdhomesa / tdhomesa
0644
uninstall.php
1.649 KB
24 Nov 2025 10.00 PM
tdhomesa / tdhomesa
0644
wpml-config.xml
1.259 KB
8 Jun 2022 8.47 PM
tdhomesa / tdhomesa
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF