Skip to content

Conversation

obenland
Copy link
Member

Proposed changes:

  • Moved activation, deactivation, and uninstall hook registration to use class references directly.
  • Consolidated and reordered 'init' actions in Activitypub::init() for better clarity and maintainability.
  • Fixed import order in class-activitypub.php and ensured Embed::init() is called via an 'init' action in activitypub.php.

Moved activation, deactivation, and uninstall hook registration to use class references directly. Consolidated and reordered 'init' actions in Activitypub::init() for better clarity and maintainability. Fixed import order in class-activitypub.php and ensured Embed::init() is called via an 'init' action in activitypub.php.
@obenland obenland requested a review from pfefferle August 21, 2025 14:16
@obenland obenland self-assigned this Aug 21, 2025
@Copilot Copilot AI review requested due to automatic review settings August 21, 2025 14:16
@obenland obenland added the Skip Changelog Disables the "Changelog Updated" action for PRs where changelog entries are not necessary. label Aug 21, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the ActivityPub plugin initialization by consolidating hook registrations and improving code organization. The changes focus on moving lifecycle hooks to use class references directly and reordering initialization actions for better maintainability.

  • Moved activation, deactivation, and uninstall hook registrations to use class references directly
  • Consolidated and reordered 'init' actions in Activitypub::init() method
  • Fixed import order and ensured Embed::init() is called via an 'init' action

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
includes/class-activitypub.php Reordered imports, consolidated init actions, and moved post type support registration
activitypub.php Simplified hook registrations using class references and added Embed::init() to plugin_init()

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@obenland obenland merged commit 289c6c9 into trunk Aug 25, 2025
13 checks passed
@obenland obenland deleted the fix/ocd branch August 25, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog Disables the "Changelog Updated" action for PRs where changelog entries are not necessary.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants