Skip to content

Commit d4b193c

Browse files
authored
Merge branch 'trunk' into store-quotes
2 parents b646fcb + 4bb6956 commit d4b193c

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: fixed
3+
4+
Improved Jetpack integration by initializing it during the WordPress startup process.

integration/class-jetpack.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
use Activitypub\Collection\Followers;
1111
use Activitypub\Collection\Following;
12-
use Activitypub\Comment;
1312
use Activitypub\Http;
1413
use Automattic\Jetpack\Connection\Manager;
1514

@@ -74,15 +73,14 @@ public static function add_sync_comment_meta( $allow_list ) {
7473
* Add custom comment types to the list of comment types.
7574
*
7675
* @param array $comment_types Default comment types.
77-
* @return array
76+
*
77+
* @return array The comment types with ActivityPub types added.
7878
*/
7979
public static function add_comment_types( $comment_types ) {
80-
// jetpack_sync_whitelisted_comment_types runs on plugins_loaded, before comment types are registered.
81-
if ( 'jetpack_sync_whitelisted_comment_types' === current_filter() ) {
82-
Comment::register_comment_types();
83-
}
80+
$comment_types[] = 'repost';
81+
$comment_types[] = 'like';
8482

85-
return array_unique( \array_merge( $comment_types, Comment::get_comment_type_slugs() ) );
83+
return array_unique( $comment_types );
8684
}
8785

8886
/**

local/load.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@
1111

1212
// Initialize local development tools below.
1313

14+
/*
15+
* Enables Jetpack development/debug mode.
16+
*
17+
* Setting JETPACK_DEV_DEBUG to true allows Jetpack features to run in a local development environment,
18+
* bypassing certain production checks and enabling debugging tools. This should only be enabled for local development.
19+
*/
20+
if ( ! defined( 'JETPACK_DEV_DEBUG' ) ) {
21+
define( 'JETPACK_DEV_DEBUG', true );
22+
}
23+
1424
// Load development WP-CLI commands.
1525
if ( defined( 'WP_CLI' ) && WP_CLI ) {
1626
\WP_CLI::add_command(

0 commit comments

Comments
 (0)