Changeset 3422986
- Timestamp:
- 12/18/2025 02:27:53 PM (4 weeks ago)
- Location:
- activitypub
- Files:
-
- 2 deleted
- 10 edited
- 1 copied
-
tags/7.8.1 (copied) (copied from activitypub/trunk)
-
tags/7.8.1/activitypub.php (modified) (2 diffs)
-
tags/7.8.1/includes/class-comment.php (modified) (3 diffs)
-
tags/7.8.1/includes/class-mailer.php (modified) (3 diffs)
-
tags/7.8.1/includes/handler/class-create.php (modified) (1 diff)
-
tags/7.8.1/readme.txt (modified) (2 diffs)
-
tags/7.8.1/webpack.config.js (deleted)
-
trunk/activitypub.php (modified) (2 diffs)
-
trunk/includes/class-comment.php (modified) (3 diffs)
-
trunk/includes/class-mailer.php (modified) (3 diffs)
-
trunk/includes/handler/class-create.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/webpack.config.js (deleted)
Legend:
- Unmodified
- Added
- Removed
-
activitypub/tags/7.8.1/activitypub.php
r3422091 r3422986 4 4 * Plugin URI: https://github.com/Automattic/wordpress-activitypub 5 5 * Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format. 6 * Version: 7.8. 06 * Version: 7.8.1 7 7 * Author: Matthias Pfefferle & Automattic 8 8 * Author URI: https://automattic.com/ … … 18 18 namespace Activitypub; 19 19 20 \define( 'ACTIVITYPUB_PLUGIN_VERSION', '7.8. 0' );20 \define( 'ACTIVITYPUB_PLUGIN_VERSION', '7.8.1' ); 21 21 22 22 // Plugin related constants. -
activitypub/tags/7.8.1/includes/class-comment.php
r3409851 r3422986 705 705 // Do only exclude interactions of `ap_post` post type. 706 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 } 707 $query->query_vars['post_type'] = array_diff( \get_post_types_by_support( 'comments' ), self::hide_for() ); 710 708 return; 711 709 } … … 768 766 } 769 767 770 // Auto approve reactions to an `ap_post`. 771 if ( \get_option( 'activitypub_create_posts', false ) ) { 772 $post_id = $comment_data['comment_post_ID']; 773 $post = \get_post( $post_id ); 774 775 if ( $post && Posts::POST_TYPE === $post->post_type ) { 776 return 1; 777 } 768 $post_id = $comment_data['comment_post_ID']; 769 $post = \get_post( $post_id ); 770 771 if ( $post && in_array( $post->post_type, self::hide_for(), true ) ) { 772 return 1; 778 773 } 779 774 … … 828 823 return '1' === get_option( "activitypub_allow_{$comment_type}s", '1' ); 829 824 } 825 826 /** 827 * Get post types to hide comments for in admin. 828 * 829 * These are non-public post types whose comments should not appear 830 * in the main comments list in the WordPress admin. 831 * 832 * @return string[] Array of post type names to hide comments for. 833 */ 834 public static function hide_for() { 835 $post_types = array( Posts::POST_TYPE ); 836 837 /** 838 * Filters the list of post types to hide comments for. 839 * 840 * @param string[] $post_types Array of post type names to hide comments for. 841 */ 842 return \apply_filters( 'activitypub_hide_comments_for', $post_types ); 843 } 830 844 } -
activitypub/tags/7.8.1/includes/class-mailer.php
r3422091 r3422986 9 9 10 10 use Activitypub\Collection\Actors; 11 use Activitypub\Collection\Posts;12 11 13 12 /** … … 464 463 } 465 464 466 // Only prevent if the create_posts option is enabled.467 if ( '1' !== \get_option( 'activitypub_create_posts', false ) ) {468 return $maybe_notify;469 }470 471 465 $comment = \get_comment( $comment_id ); 472 466 if ( ! $comment ) { … … 480 474 481 475 // Prevent notifications for comments on ap_post. 482 if ( Posts::POST_TYPE === $post->post_type) {476 if ( is_ap_post( $post ) ) { 483 477 return false; 484 478 } -
activitypub/tags/7.8.1/includes/handler/class-create.php
r3422091 r3422986 105 105 */ 106 106 public static function create_post( $activity, $user_ids, $activity_object = null ) { 107 if ( ! \get_option( 'activitypub_create_posts', false ) ) { 108 return false; 109 } 110 107 111 $existing_post = Posts::get_by_guid( $activity['object']['id'] ); 108 112 -
activitypub/tags/7.8.1/readme.txt
r3422091 r3422986 4 4 Requires at least: 6.5 5 5 Tested up to: 6.9 6 Stable tag: 7.8. 06 Stable tag: 7.8.1 7 7 Requires PHP: 7.2 8 8 License: MIT … … 110 110 111 111 == Changelog == 112 113 ### 7.8.1 - 2025-12-18 114 #### Added 115 - Hide comments from specific post types in the WordPress admin comments list. 116 117 #### Fixed 118 - Prevent comment email notifications for ap_post. 119 - Prevent post creation when Reader is deactivated. 112 120 113 121 ### 7.8.0 - 2025-12-17 -
activitypub/trunk/activitypub.php
r3422091 r3422986 4 4 * Plugin URI: https://github.com/Automattic/wordpress-activitypub 5 5 * Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format. 6 * Version: 7.8. 06 * Version: 7.8.1 7 7 * Author: Matthias Pfefferle & Automattic 8 8 * Author URI: https://automattic.com/ … … 18 18 namespace Activitypub; 19 19 20 \define( 'ACTIVITYPUB_PLUGIN_VERSION', '7.8. 0' );20 \define( 'ACTIVITYPUB_PLUGIN_VERSION', '7.8.1' ); 21 21 22 22 // Plugin related constants. -
activitypub/trunk/includes/class-comment.php
r3409851 r3422986 705 705 // Do only exclude interactions of `ap_post` post type. 706 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 } 707 $query->query_vars['post_type'] = array_diff( \get_post_types_by_support( 'comments' ), self::hide_for() ); 710 708 return; 711 709 } … … 768 766 } 769 767 770 // Auto approve reactions to an `ap_post`. 771 if ( \get_option( 'activitypub_create_posts', false ) ) { 772 $post_id = $comment_data['comment_post_ID']; 773 $post = \get_post( $post_id ); 774 775 if ( $post && Posts::POST_TYPE === $post->post_type ) { 776 return 1; 777 } 768 $post_id = $comment_data['comment_post_ID']; 769 $post = \get_post( $post_id ); 770 771 if ( $post && in_array( $post->post_type, self::hide_for(), true ) ) { 772 return 1; 778 773 } 779 774 … … 828 823 return '1' === get_option( "activitypub_allow_{$comment_type}s", '1' ); 829 824 } 825 826 /** 827 * Get post types to hide comments for in admin. 828 * 829 * These are non-public post types whose comments should not appear 830 * in the main comments list in the WordPress admin. 831 * 832 * @return string[] Array of post type names to hide comments for. 833 */ 834 public static function hide_for() { 835 $post_types = array( Posts::POST_TYPE ); 836 837 /** 838 * Filters the list of post types to hide comments for. 839 * 840 * @param string[] $post_types Array of post type names to hide comments for. 841 */ 842 return \apply_filters( 'activitypub_hide_comments_for', $post_types ); 843 } 830 844 } -
activitypub/trunk/includes/class-mailer.php
r3422091 r3422986 9 9 10 10 use Activitypub\Collection\Actors; 11 use Activitypub\Collection\Posts;12 11 13 12 /** … … 464 463 } 465 464 466 // Only prevent if the create_posts option is enabled.467 if ( '1' !== \get_option( 'activitypub_create_posts', false ) ) {468 return $maybe_notify;469 }470 471 465 $comment = \get_comment( $comment_id ); 472 466 if ( ! $comment ) { … … 480 474 481 475 // Prevent notifications for comments on ap_post. 482 if ( Posts::POST_TYPE === $post->post_type) {476 if ( is_ap_post( $post ) ) { 483 477 return false; 484 478 } -
activitypub/trunk/includes/handler/class-create.php
r3422091 r3422986 105 105 */ 106 106 public static function create_post( $activity, $user_ids, $activity_object = null ) { 107 if ( ! \get_option( 'activitypub_create_posts', false ) ) { 108 return false; 109 } 110 107 111 $existing_post = Posts::get_by_guid( $activity['object']['id'] ); 108 112 -
activitypub/trunk/readme.txt
r3422091 r3422986 4 4 Requires at least: 6.5 5 5 Tested up to: 6.9 6 Stable tag: 7.8. 06 Stable tag: 7.8.1 7 7 Requires PHP: 7.2 8 8 License: MIT … … 110 110 111 111 == Changelog == 112 113 ### 7.8.1 - 2025-12-18 114 #### Added 115 - Hide comments from specific post types in the WordPress admin comments list. 116 117 #### Fixed 118 - Prevent comment email notifications for ap_post. 119 - Prevent post creation when Reader is deactivated. 112 120 113 121 ### 7.8.0 - 2025-12-17
Note: See TracChangeset
for help on using the changeset viewer.