Plugin Directory

Changeset 3422986


Ignore:
Timestamp:
12/18/2025 02:27:53 PM (4 weeks ago)
Author:
pfefferle
Message:

Update to version 7.8.1 from GitHub

Location:
activitypub
Files:
2 deleted
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • activitypub/tags/7.8.1/activitypub.php

    r3422091 r3422986  
    44 * Plugin URI: https://github.com/Automattic/wordpress-activitypub
    55 * Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.
    6  * Version: 7.8.0
     6 * Version: 7.8.1
    77 * Author: Matthias Pfefferle & Automattic
    88 * Author URI: https://automattic.com/
     
    1818namespace Activitypub;
    1919
    20 \define( 'ACTIVITYPUB_PLUGIN_VERSION', '7.8.0' );
     20\define( 'ACTIVITYPUB_PLUGIN_VERSION', '7.8.1' );
    2121
    2222// Plugin related constants.
  • activitypub/tags/7.8.1/includes/class-comment.php

    r3409851 r3422986  
    705705        // Do only exclude interactions of `ap_post` post type.
    706706        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() );
    710708            return;
    711709        }
     
    768766        }
    769767
    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;
    778773        }
    779774
     
    828823        return '1' === get_option( "activitypub_allow_{$comment_type}s", '1' );
    829824    }
     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    }
    830844}
  • activitypub/tags/7.8.1/includes/class-mailer.php

    r3422091 r3422986  
    99
    1010use Activitypub\Collection\Actors;
    11 use Activitypub\Collection\Posts;
    1211
    1312/**
     
    464463        }
    465464
    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 
    471465        $comment = \get_comment( $comment_id );
    472466        if ( ! $comment ) {
     
    480474
    481475        // Prevent notifications for comments on ap_post.
    482         if ( Posts::POST_TYPE === $post->post_type ) {
     476        if ( is_ap_post( $post ) ) {
    483477            return false;
    484478        }
  • activitypub/tags/7.8.1/includes/handler/class-create.php

    r3422091 r3422986  
    105105     */
    106106    public static function create_post( $activity, $user_ids, $activity_object = null ) {
     107        if ( ! \get_option( 'activitypub_create_posts', false ) ) {
     108            return false;
     109        }
     110
    107111        $existing_post = Posts::get_by_guid( $activity['object']['id'] );
    108112
  • activitypub/tags/7.8.1/readme.txt

    r3422091 r3422986  
    44Requires at least: 6.5
    55Tested up to: 6.9
    6 Stable tag: 7.8.0
     6Stable tag: 7.8.1
    77Requires PHP: 7.2
    88License: MIT
     
    110110
    111111== 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.
    112120
    113121### 7.8.0 - 2025-12-17
  • activitypub/trunk/activitypub.php

    r3422091 r3422986  
    44 * Plugin URI: https://github.com/Automattic/wordpress-activitypub
    55 * Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.
    6  * Version: 7.8.0
     6 * Version: 7.8.1
    77 * Author: Matthias Pfefferle & Automattic
    88 * Author URI: https://automattic.com/
     
    1818namespace Activitypub;
    1919
    20 \define( 'ACTIVITYPUB_PLUGIN_VERSION', '7.8.0' );
     20\define( 'ACTIVITYPUB_PLUGIN_VERSION', '7.8.1' );
    2121
    2222// Plugin related constants.
  • activitypub/trunk/includes/class-comment.php

    r3409851 r3422986  
    705705        // Do only exclude interactions of `ap_post` post type.
    706706        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() );
    710708            return;
    711709        }
     
    768766        }
    769767
    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;
    778773        }
    779774
     
    828823        return '1' === get_option( "activitypub_allow_{$comment_type}s", '1' );
    829824    }
     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    }
    830844}
  • activitypub/trunk/includes/class-mailer.php

    r3422091 r3422986  
    99
    1010use Activitypub\Collection\Actors;
    11 use Activitypub\Collection\Posts;
    1211
    1312/**
     
    464463        }
    465464
    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 
    471465        $comment = \get_comment( $comment_id );
    472466        if ( ! $comment ) {
     
    480474
    481475        // Prevent notifications for comments on ap_post.
    482         if ( Posts::POST_TYPE === $post->post_type ) {
     476        if ( is_ap_post( $post ) ) {
    483477            return false;
    484478        }
  • activitypub/trunk/includes/handler/class-create.php

    r3422091 r3422986  
    105105     */
    106106    public static function create_post( $activity, $user_ids, $activity_object = null ) {
     107        if ( ! \get_option( 'activitypub_create_posts', false ) ) {
     108            return false;
     109        }
     110
    107111        $existing_post = Posts::get_by_guid( $activity['object']['id'] );
    108112
  • activitypub/trunk/readme.txt

    r3422091 r3422986  
    44Requires at least: 6.5
    55Tested up to: 6.9
    6 Stable tag: 7.8.0
     6Stable tag: 7.8.1
    77Requires PHP: 7.2
    88License: MIT
     
    110110
    111111== 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.
    112120
    113121### 7.8.0 - 2025-12-17
Note: See TracChangeset for help on using the changeset viewer.