s && $methodExists ) { $response = call_user_func_array( [ $addonClass, $apiMethod ], [ $request, $response ] ); } } } return $response; } /** * Validates access from the routes array. * * @since 4.1.6 * * @param \WP_REST_Request $request The REST Request. * @return bool True if validated, false if not. */ public function validateAccess( $request ) { $routeData = $this->getRouteData( $request ); if ( empty( $routeData ) || empty( $routeData['access'] ) ) { return false; } // Admins always have access. if ( aioseo()->access->isAdmin() ) { return true; } switch ( $routeData['access'] ) { case 'everyone': // Any user is able to access the route. return true; case 'any': // The user has access if he has any of our capabilities. $user = wp_get_current_user(); foreach ( $user->get_role_caps() as $capability => $enabled ) { if ( $enabled && preg_match( '/^aioseo_/', $capability ) ) { return true; } } return false; default: // The user has access if he has any of the required capabilities. if ( ! is_array( $routeData['access'] ) ) { $routeData['access'] = [ $routeData['access'] ]; } foreach ( $routeData['access'] as $access ) { if ( current_user_can( $access ) ) { return true; } } return false; } } }
Fatal error: Uncaught Error: Class "AIOSEO\Plugin\Pro\Api\Api" not found in /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/AIOSEO.php:331 Stack trace: #0 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/AIOSEO.php(97): AIOSEO\Plugin\AIOSEO->load() #1 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/AIOSEO.php(76): AIOSEO\Plugin\AIOSEO->init() #2 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/AIOSEO.php(414): AIOSEO\Plugin\AIOSEO::instance() #3 /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/all_in_one_seo_pack.php(96): aioseo() #4 /home/valigeria/public_html/wp-settings.php(517): include_once('/home/valigeria...') #5 /home/valigeria/public_html/wp-config.php(111): require_once('/home/valigeria...') #6 /home/valigeria/public_html/wp-load.php(50): require_once('/home/valigeria...') #7 /home/valigeria/public_html/wp-blog-header.php(13): require_once('/home/valigeria...') #8 /home/valigeria/public_html/index.php(17): require('/home/valigeria...') #9 {main} thrown in /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/AIOSEO.php on line 331