| @@ -6,13 +6,11 @@ | ||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | namespace Activitypub\Integration; |
| 9 | 9 | |
| 10 | -use Activitypub\Autoloader; | |
| 11 | - | |
| 12 | 10 | use function Activitypub\site_supports_blocks; |
| 13 | 11 | |
| 14 | -Autoloader::register_path( __NAMESPACE__, __DIR__ ); | |
| 12 | +\Activitypub\Autoloader::register_path( __NAMESPACE__, __DIR__ ); | |
| 15 | 13 | |
| 16 | 14 | /** |
| 17 | 15 | * Initialize the ActivityPub integrations. |
| 18 | 16 | */ |
| @@ -138,9 +136,9 @@ | ||
| 138 | 136 | * |
| 139 | 137 | * @see https://wordpress.org/plugins/seriously-simple-podcasting/ |
| 140 | 138 | */ |
| 141 | 139 | if ( \defined( 'SSP_VERSION' ) ) { |
| 142 | - \add_filter( | |
| 140 | + add_filter( | |
| 143 | 141 | 'activitypub_transformer', |
| 144 | 142 | static function ( $transformer, $data, $object_class ) { |
| 145 | 143 | if ( |
| 146 | 144 | 'WP_Post' === $object_class && |
| @@ -181,8 +179,19 @@ | ||
| 181 | 179 | * |
| 182 | 180 | * @see https://wordpress.org/plugins/webfinger/ |
| 183 | 181 | */ |
| 184 | 182 | Webfinger::init(); |
| 183 | + | |
| 184 | + /** | |
| 185 | + * Adds WP REST Cache support. | |
| 186 | + * | |
| 187 | + * This class handles the compatibility with the WP REST Cache plugin. | |
| 188 | + * | |
| 189 | + * @see https://wordpress.org/plugins/wp-rest-cache/ | |
| 190 | + */ | |
| 191 | + if ( \class_exists( 'WP_Rest_Cache_Plugin\Includes\Plugin' ) ) { | |
| 192 | + WP_Rest_Cache::init(); | |
| 193 | + } | |
| 185 | 194 | |
| 186 | 195 | /** |
| 187 | 196 | * Adds WPML Multilingual CMS (plugin) support. |
| 188 | 197 | * |