| @@ -31,9 +31,9 @@ | ||
| 31 | 31 | use UserAccessManager\Wrapper\Wordpress; |
| 32 | 32 | |
| 33 | 33 | class UserAccessManager |
| 34 | 34 | { |
| 35 | - public const VERSION = '2.3.15'; | |
| 35 | + public const VERSION = '2.3.4'; | |
| 36 | 36 | public const DB_VERSION = '1.6.2'; |
| 37 | 37 | |
| 38 | 38 | public function __construct( |
| 39 | 39 | private Php $php, |
| @@ -468,31 +468,8 @@ | ||
| 468 | 468 | $this->wordpress->addFilter('edit_post_link', [$frontendPostController, 'showEditLink'], 10, 2); |
| 469 | 469 | $this->wordpress->addFilter('parse_query', [$frontendPostController, 'parseQuery']); |
| 470 | 470 | $this->wordpress->addFilter('getarchives_where', [$frontendPostController, 'showPostSql']); |
| 471 | 471 | $this->wordpress->addFilter('wp_count_posts', [$frontendPostController, 'showPostCount'], 10, 3); |
| 472 | - | |
| 473 | - $this->wordpress->addAction('rest_api_init', function () use ($frontendPostController) { | |
| 474 | - //Runs first, so that no access check caches the context before the guard. | |
| 475 | - $this->wordpress->addFilter( | |
| 476 | - 'rest_pre_dispatch', | |
| 477 | - [$frontendPostController, 'restrictRestRequest'], | |
| 478 | - 1, | |
| 479 | - 3 | |
| 480 | - ); | |
| 481 | - | |
| 482 | - foreach ((array) $this->objectHandler->getPostTypes() as $postType) { | |
| 483 | - $this->wordpress->addFilter( | |
| 484 | - "rest_prepare_$postType", | |
| 485 | - [$frontendPostController, 'restrictRestResponse'], | |
| 486 | - 10, | |
| 487 | - 3 | |
| 488 | - ); | |
| 489 | - $this->wordpress->addFilter( | |
| 490 | - "rest_{$postType}_query", | |
| 491 | - [$frontendPostController, 'excludeRestrictedPostsFromRestQuery'] | |
| 492 | - ); | |
| 493 | - } | |
| 494 | - }); | |
| 495 | 472 | |
| 496 | 473 | // Short code controller |
| 497 | 474 | $frontendShortCodeController = $this->controllerFactory->createFrontendShortCodeController(); |
| 498 | 475 | |