| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | use Elementor\Core\Common\Modules\Ajax\Module as Ajax; |
| 7 | 7 | use Elementor\Plugin; |
| 8 | 8 | |
| 9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | - exit; // Exit if accessed directly. | |
| 10 | + exit; // Exit if accessed directly | |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * Finder Module |
| @@ -82,16 +82,10 @@ | ||
| 82 | 82 | * |
| 83 | 83 | * @param array $data |
| 84 | 84 | * |
| 85 | 85 | * @return array |
| 86 | - * | |
| 87 | - * @throws \Exception If finder category registration fails or validation errors occur. | |
| 88 | 86 | */ |
| 89 | 87 | public function ajax_get_category_items( array $data ) { |
| 90 | - if ( ! current_user_can( 'manage_options' ) ) { | |
| 91 | - throw new \Exception( 'Access denied.' ); | |
| 92 | - } | |
| 93 | - | |
| 94 | 88 | $category = $this->categories_manager->get_categories( $data['category'] ); |
| 95 | 89 | |
| 96 | 90 | return $category->get_category_items( $data ); |
| 97 | 91 | } |