add_post_type_support when updating activitypub_support_post_types
Some checks failed
PHP Code Checker / PHP Code Checker (pull_request) Successful in 45s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Failing after 1m2s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Failing after 1m8s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Failing after 1m12s

This commit is contained in:
André Menrath 2024-10-02 18:01:20 +02:00
parent 3f7f996e10
commit 724a884738

View file

@ -272,6 +272,7 @@ class Setup {
foreach ( $this->active_event_plugins as $event_plugin ) {
if ( ! in_array( $event_plugin->get_post_type(), $activitypub_supported_post_types, true ) ) {
$activitypub_supported_post_types[] = $event_plugin->get_post_type();
add_post_type_support( $event_plugin->get_post_type(), 'activitypub' );
}
}
update_option( 'activitypub_support_post_types', $activitypub_supported_post_types );