PluginProbe
Elementor Website Builder – more than just a page builder / 3.0.2
Elementor Website Builder – more than just a page builder v3.0.2
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | core/common/modules/finder/module.php +4 -17 4.2.0-dev23.0.2 View file →
@@ -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 }
@@ -112,21 +106,14 @@
112 106 foreach ( $categories as $category_name => $category ) {
113 107 $categories_data[ $category_name ] = array_merge( $category->get_settings(), [ 'name' => $category_name ] );
114 108 }
115 109
116 - /**
117 - * Finder categories.
118 - *
119 - * Filters the list of finder categories. This hook is used to manage Finder
120 - * categories - to add new categories, remove and edit existing categories.
121 - *
122 - * @since 2.3.0
123 - *
124 - * @param array $categories_data A list of finder categories.
125 - */
126 110 $categories_data = apply_filters( 'elementor/finder/categories', $categories_data );
127 111
128 112 return [
129 113 'data' => $categories_data,
114 + 'i18n' => [
115 + 'finder' => __( 'Finder', 'elementor' ),
116 + ],
130 117 ];
131 118 }
132 119 }