• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Jetpack a2z

Jetpack a2z

Jetpack a2z

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / Actions::cleanup_on_upgrade() – Perform maintenance when a plugin upgrade occurs.

You appear to be a bot. Output may be restricted

Description

Perform maintenance when a plugin upgrade occurs.

Usage

Actions::cleanup_on_upgrade( $new_version, $old_version );

Parameters

$new_version
( string ) optional – New version of the plugin.
$old_version
( string ) optional – Old version of the plugin.

Returns

void

Source

File name: jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php
Lines:

1 to 17 of 17
  public static function cleanup_on_upgrade( $new_version = '', $old_version = '' ) {
    if ( wp_next_scheduled( 'jetpack_sync_send_db_checksum' ) ) {
      wp_clear_scheduled_hook( 'jetpack_sync_send_db_checksum' );
    }

    $is_new_sync_upgrade = version_compare( $old_version, '4.2', '>=' );
    if ( ! empty( $old_version ) && $is_new_sync_upgrade && version_compare( $old_version, '4.5', '<' ) ) {
      self::clear_sync_cron_jobs();
      Settings::update_settings(
        array(
          'render_filtered_content' => Defaults::$default_render_filtered_content,
        )
      );
    }

    Health::on_jetpack_upgraded();
  }
 

 View on GitHub View on Trac

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Pinterest (Opens in new window)

Related

Published: 27 November 2019 | Last updated: 26 January 2022

Primary Sidebar

Information

Function name: Actions::cleanup_on_upgrade
Class ref: Actions
Plugin ref: Jetpack
Version: 11.0
Sourcefile: jetpack_vendor/automattic/jetpack-sync/src/class-actions.php
File ref: jetpack_vendor/automattic/jetpack-sync/src/class-actions.php
Deprecated?: No
API Letters: A,C,O,U

Footer

Jetpack a2z
Jetpack a2z
Jetpack a2z
WordPress 6.0
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  jetpack.wp-a2z.org
© Copyright Jetpack a2z 2014-2022. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites