-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix connection assets for WPCOM Simple sites (#39201)
* Fix connection assets for WPCOM Simple sites * Fix up versions Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/10683693638 Upstream-Ref: Automattic/jetpack@3bef458
- Loading branch information
1 parent
9f1c142
commit b53af06
Showing
15 changed files
with
139 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
/** | ||
* Action Hooks for Jetpack connection assets. | ||
* | ||
* @package automattic/jetpack-connection | ||
*/ | ||
|
||
// If WordPress's plugin API is available already, use it. If not, | ||
// drop data into `$wp_filter` for `WP_Hook::build_preinitialized_hooks()`. | ||
if ( function_exists( 'add_action' ) ) { | ||
add_action( | ||
'plugins_loaded', | ||
array( Automattic\Jetpack\Connection\Connection_Assets::class, 'configure' ), | ||
1 | ||
); | ||
} else { | ||
global $wp_filter; | ||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited | ||
$wp_filter['plugins_loaded'][1][] = array( | ||
'accepted_args' => 0, | ||
'function' => array( Automattic\Jetpack\Connection\Connection_Assets::class, 'configure' ), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.