Skip to content

Commit

Permalink
Jetpack: remove deprecated hooks and methods on Jetpack admin pages (…
Browse files Browse the repository at this point in the history
…#40457)

Get rid of excessive `jetpack_loaded` hook callbacks by methods and properties deprecated in Jetpack 13.9

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12180859198

Upstream-Ref: Automattic/jetpack@f86bb18
  • Loading branch information
sergeymitr authored and matticbot committed Dec 5, 2024
1 parent 33198ea commit 328ff6b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 49 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ This is an alpha version! The changes listed here are not final.
- Jetpack AI: remove dead and deprecated code
- Newsletter sidebar: fix no space under toggle
- register_block_metadata_collection: Silence path validation notices
- Remove deprecated hooks and methods on Jetpack admin pages.
- Testing: Remove old instructions.
- Updated package dependencies.

Expand Down
39 changes: 0 additions & 39 deletions _inc/lib/admin-pages/class.jetpack-admin-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
* Shared logic between Jetpack admin pages.
*/
abstract class Jetpack_Admin_Page {
/**
* Jetpack Object.
*
* @var Jetpack
* @deprecated 13.9 Use `Jetpack::init()` instead.
*/
public $jetpack;

/**
* Add page specific actions given the page hook.
*
Expand Down Expand Up @@ -53,30 +45,6 @@ abstract public function page_render();
*/
public function additional_styles() {}

/**
* The constructor.
*/
public function __construct() {
/**
* Keeping it for backward compatibility in case the `$jetpack` property is still in use.
* To be removed.
*
* @deprecated 13.9
*/
add_action( 'jetpack_loaded', array( $this, 'on_jetpack_loaded' ) );
}

/**
* Runs on Jetpack being ready to load its packages.
*
* @deprecated 13.9
*
* @param Jetpack $jetpack object.
*/
public function on_jetpack_loaded( $jetpack ) {
$this->jetpack = $jetpack;
}

/**
* Add common page actions and attach page-specific actions.
*/
Expand Down Expand Up @@ -142,13 +110,6 @@ public function render() {
self::wrap_ui( array( $this, 'page_render' ), $args );
}

/**
* Doesn't do anything anymore.
*
* @deprecated 13.9 No longer used.
*/
public function admin_help() {}

/**
* Call the existing admin page events.
*/
Expand Down
10 changes: 0 additions & 10 deletions class.jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -3487,16 +3487,6 @@ public function upload_handler( $update_media_item = false ) {
return $uploaded_files;
}

/**
* Doesn't do anything anymore.
*
* @deprecated 13.9 We no longer show the "Help" button.
*
* @since Jetpack (1.2.3)
* @return void
*/
public function admin_help() {}

/**
* Add action links for the Jetpack plugin.
*
Expand Down

0 comments on commit 328ff6b

Please sign in to comment.