Skip to content

Commit 382fcbc

Browse files
authored
Merge branch 'trunk' into add/reader
2 parents 51b2bda + 083c8d2 commit 382fcbc

File tree

17 files changed

+674
-16
lines changed

17 files changed

+674
-16
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: changed
3+
4+
Store comments and reactions from followed actors on reader posts, and keep them separate from your site's comments in wp-admin.
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+
Fix make_clickable corrupting existing anchor tags in ActivityPub content

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
name: Deploy to WP.org
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v5
10+
- uses: actions/checkout@v6
1111
- name: Install SVN
1212
run: |
1313
sudo apt-get update

.github/workflows/extract-wp-hooks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
permissions:
1515
contents: write # Required to push to wiki repository
1616
steps:
17-
- uses: actions/checkout@v5
17+
- uses: actions/checkout@v6
1818
- uses: akirk/extract-wp-hooks@1.3.0
1919
with:
2020
namespace: 'Activitypub'

.github/workflows/gardening.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v5
26+
uses: actions/checkout@v6
2727

2828
- name: Setup Node
2929
uses: actions/setup-node@v6

.github/workflows/jest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
steps:
3232
- name: Checkout
33-
uses: actions/checkout@v5
33+
uses: actions/checkout@v6
3434

3535
- name: Setup Node.js
3636
uses: actions/setup-node@v6

.github/workflows/phpcs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@v5
28+
uses: actions/checkout@v6
2929
- name: Setup PHP
3030
uses: shivammathur/setup-php@v2
3131
with:

.github/workflows/phpunit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
sudo apt-get update
4747
sudo apt-get install subversion
4848
- name: Checkout
49-
uses: actions/checkout@v5
49+
uses: actions/checkout@v6
5050

5151
- name: Setup PHP
5252
uses: shivammathur/setup-php@v2
@@ -84,7 +84,7 @@ jobs:
8484
sudo apt-get update
8585
sudo apt-get install subversion
8686
- name: Checkout
87-
uses: actions/checkout@v5
87+
uses: actions/checkout@v6
8888

8989
- name: Setup PHP with Xdebug
9090
uses: shivammathur/setup-php@v2

.github/workflows/playwright.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v5
30+
uses: actions/checkout@v6
3131

3232
- name: Setup Node.js
3333
uses: actions/setup-node@v6

includes/class-comment.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
namespace Activitypub;
99

1010
use Activitypub\Collection\Actors;
11+
use Activitypub\Collection\Posts;
1112

1213
/**
1314
* ActivityPub Comment Class.
@@ -701,8 +702,16 @@ public static function comment_query( $query ) {
701702
return;
702703
}
703704

704-
// Do not exclude likes and reposts on admin pages or on non-singular pages.
705-
if ( is_admin() || ! is_singular() ) {
705+
// Do only exclude interactions of `ap_post` post type.
706+
if ( \is_admin() ) {
707+
if ( \get_option( 'activitypub_create_posts', false ) ) {
708+
$query->query_vars['post_type'] = array_diff( \get_post_types_by_support( 'comments' ), array( Posts::POST_TYPE ) );
709+
}
710+
return;
711+
}
712+
713+
// Do not exclude likes and reposts on non-singular pages.
714+
if ( ! \is_singular() ) {
706715
return;
707716
}
708717

0 commit comments

Comments
 (0)