PluginProbe
Elementor Website Builder – more than just a page builder / 3.25.4
Elementor Website Builder – more than just a page builder v3.25.4
4.3.0-beta3 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 All 452 releases
← All changes | core/isolation/wordpress-adapter.php +8 -36 4.1.0-dev13.25.4 View file →
@@ -1,11 +1,7 @@
1 1 <?php
2 -
3 2 namespace Elementor\Core\Isolation;
4 3
5 -use Elementor\Core\Settings\Manager;
6 -use Elementor\Core\Upgrade\Manager as Upgrade_Manager;
7 -
8 4 class Wordpress_Adapter implements Wordpress_Adapter_Interface {
9 5
10 6 public function get_plugins(): array {
11 7 return get_plugins();
@@ -29,9 +25,9 @@
29 25 * @return WP_Post[]|false Array of pages (or hierarchical post type items). Boolean false if the
30 26 * specified post type is not hierarchical or the specified status is not
31 27 * supported by the post type.
32 28 */
33 - public function get_pages( $args ): ?array {
29 + public function get_pages( $args ) : ?array {
34 30 return get_pages( $args );
35 31 }
36 32
37 33 /**
@@ -38,9 +34,9 @@
38 34 * Creates and returns a wp query instance.
39 35 *
40 36 * @return \WP_Query
41 37 */
42 - public function get_query( $args ): ?\WP_Query {
38 + public function get_query( $args ) : ?\WP_Query {
43 39 return new \WP_Query( $args );
44 40 }
45 41
46 42 public function get_option( $option_key ) {
@@ -46,52 +42,28 @@
46 42 public function get_option( $option_key ) {
47 43 return get_option( $option_key );
48 44 }
49 45
50 - public function update_option( $option_key, $option_value ): void {
46 + public function update_option( $option_key, $option_value ) : void {
51 47 update_option( $option_key, $option_value );
52 48 }
53 49
54 - public function add_option( $option_key, $option_value ): void {
50 + public function add_option( $option_key, $option_value ) : void {
55 51 add_option( $option_key, $option_value );
56 52 }
57 53
58 - public function get_user_preferences( $preference_key ) {
59 - return Manager::get_settings_managers( 'editorPreferences' )
60 - ->get_model()
61 - ->get_settings( $preference_key );
62 - }
63 -
64 - public function set_user_preferences( $preference_key, $value ) {
65 - Manager::get_settings_managers( 'editorPreferences' )
66 - ->get_model()
67 - ->set_settings( $preference_key, $value );
68 - }
69 -
70 - public function is_new_installation() {
71 - return Upgrade_Manager::is_new_installation();
72 - }
73 -
74 - public function add_query_arg( $args, $url ): string {
54 + public function add_query_arg( $args, $url ) : string {
75 55 return add_query_arg( $args, $url );
76 56 }
77 57
78 - public function has_custom_logo(): bool {
58 + public function has_custom_logo() : bool {
79 59 return has_custom_logo();
80 60 }
81 61
82 - public function current_user_can( $capability, $args ): bool {
62 + public function current_user_can( $capability, $args ) : bool {
83 63 return current_user_can( $capability, $args );
84 64 }
85 65
86 - public function get_post_status( $post_id ): string {
66 + public function get_post_status( $post_id ) : string {
87 67 return get_post_status( $post_id );
88 - }
89 -
90 - public function get_posts( $args ): array {
91 - return get_posts( $args );
92 - }
93 -
94 - public function get_post_types( $args = [], $output = 'names', $operator = 'and' ): array {
95 - return get_post_types( $args, $output, $operator );
96 68 }
97 69 }