PluginProbe
Elementor Website Builder – more than just a page builder / 3.24.8
Elementor Website Builder – more than just a page builder v3.24.8
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 +5 -50 4.2.43.24.8 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,69 +25,28 @@
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 - /**
38 - * Creates and returns a wp query instance.
39 - *
40 - * @return \WP_Query
41 - */
42 - public function get_query( $args ): ?\WP_Query {
43 - return new \WP_Query( $args );
44 - }
45 -
46 33 public function get_option( $option_key ) {
47 34 return get_option( $option_key );
48 35 }
49 36
50 - public function update_option( $option_key, $option_value ): void {
37 + public function update_option( $option_key, $option_value ) : void {
51 38 update_option( $option_key, $option_value );
52 39 }
53 40
54 - public function add_option( $option_key, $option_value ): void {
41 + public function add_option( $option_key, $option_value ) : void {
55 42 add_option( $option_key, $option_value );
56 43 }
57 44
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 {
75 - return add_query_arg( $args, $url );
76 - }
77 -
78 - public function has_custom_logo(): bool {
79 - return has_custom_logo();
80 - }
81 -
82 - public function current_user_can( $capability, $args ): bool {
45 + public function current_user_can( $capability, $args ) : bool {
83 46 return current_user_can( $capability, $args );
84 47 }
85 48
86 - public function get_post_status( $post_id ): string {
49 + public function get_post_status( $post_id ) : string {
87 50 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 51 }
97 52 }