Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > > plugins > jetpack
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
3rd-party | Directory | - | - | |
_inc | Directory | - | - | |
css | Directory | - | - | |
extensions | Directory | - | - | |
images | Directory | - | - | |
jetpack_vendor | Directory | - | - | |
json-endpoints | Directory | - | - | |
modules | Directory | - | - | |
sal | Directory | - | - | |
src | Directory | - | - | |
vendor | Directory | - | - | |
views | Directory | - | - | |
CHANGELOG.md | File | 737759 bytes | July 01 2025 19:41:26. | |
LICENSE.txt | File | 18416 bytes | May 25 2021 21:58:16. | |
SECURITY.md | File | 2506 bytes | October 24 2023 18:28:46. | |
class-jetpack-connection-status.php | File | 728 bytes | September 20 2023 01:19:10. | |
class-jetpack-gallery-settings.php | File | 3464 bytes | May 22 2023 19:04:58. | |
class-jetpack-newsletter-dashboard-widget.php | File | 389 bytes | April 14 2025 18:35:52. | |
class-jetpack-pre-connection-jitms.php | File | 2394 bytes | March 25 2024 22:39:50. | |
class-jetpack-stats-dashboard-widget.php | File | 7650 bytes | March 24 2025 20:00:02. | |
class-jetpack-xmlrpc-methods.php | File | 7569 bytes | March 03 2025 23:09:58. | |
class.frame-nonce-preview.php | File | 3294 bytes | February 04 2025 00:54:10. | |
class.jetpack-admin.php | File | 18929 bytes | January 20 2025 22:16:12. | |
class.jetpack-autoupdate.php | File | 9978 bytes | September 20 2023 01:19:10. | |
class.jetpack-cli.php | File | 73114 bytes | April 28 2025 19:38:34. | |
class.jetpack-client-server.php | File | 2684 bytes | March 27 2024 18:05:28. | |
class.jetpack-gutenberg.php | File | 46183 bytes | June 24 2025 00:56:26. | |
class.jetpack-heartbeat.php | File | 4664 bytes | September 20 2023 01:19:10. | |
class.jetpack-modules-list-table.php | File | 15150 bytes | October 26 2023 22:22:40. | |
class.jetpack-network-sites-list-table.php | File | 6126 bytes | February 06 2024 01:39:50. | |
class.jetpack-network.php | File | 21575 bytes | January 20 2025 22:16:12. | |
class.jetpack-plan.php | File | 4192 bytes | June 19 2023 23:16:28. | |
class.jetpack-post-images.php | File | 37115 bytes | June 10 2025 00:40:16. | |
class.jetpack-twitter-cards.php | File | 13230 bytes | November 25 2023 02:41:46. | |
class.jetpack-user-agent.php | File | 25911 bytes | May 20 2024 23:33:44. | |
class.jetpack.php | File | 207789 bytes | June 30 2025 22:28:24. | |
class.json-api-endpoints.php | File | 93808 bytes | June 05 2025 20:49:04. | |
class.json-api.php | File | 38218 bytes | March 13 2025 00:23:22. | |
class.photon.php | File | 1778 bytes | May 08 2023 20:57:46. | |
composer.json | File | 4174 bytes | July 01 2025 19:41:26. | |
enhanced-open-graph.php | File | 4493 bytes | May 19 2025 19:32:00. | |
functions.compat.php | File | 4415 bytes | May 26 2025 19:03:40. | |
functions.cookies.php | File | 2087 bytes | November 21 2023 17:47:06. | |
functions.global.php | File | 14247 bytes | June 16 2025 23:21:40. | |
functions.is-mobile.php | File | 2529 bytes | September 20 2023 01:19:10. | |
functions.opengraph.php | File | 21897 bytes | November 12 2024 03:13:18. | |
functions.photon.php | File | 3110 bytes | September 20 2023 01:19:10. | |
jetpack.php | File | 8779 bytes | July 01 2025 19:41:26. | |
json-api-config.php | File | 338 bytes | November 08 2022 02:55:22. | |
json-endpoints.php | File | 7091 bytes | September 20 2023 01:19:10. | |
load-jetpack.php | File | 3176 bytes | April 21 2025 18:58:58. | |
locales.php | File | 324 bytes | March 23 2022 23:49:50. | |
readme.txt | File | 34050 bytes | July 01 2025 19:42:24. | |
unauth-file-upload.php | File | 5124 bytes | June 16 2025 23:21:40. | |
uninstall.php | File | 1642 bytes | January 20 2025 22:16:12. | |
wpml-config.xml | File | 1289 bytes | June 08 2022 20:47:30. |
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Handles items that have been selected for automatic updates. * Hooks into WP_Automatic_Updater * * @package automattic/jetpack */ /** * 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; } // 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 ) { $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();
SILENT KILLER Tool