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-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
elementor / core / isolation / wordpress-adapter.php

wordpress-adapter.php in Elementor Website Builder – more than just a page builder 3.25.4, at core/isolation/wordpress-adapter.php

70 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Core\Isolation;
3
4 class Wordpress_Adapter implements Wordpress_Adapter_Interface {
5
6 public function get_plugins(): array {
7 return get_plugins();
8 }
9
10 public function is_plugin_active( $plugin_path ): bool {
11 return is_plugin_active( $plugin_path );
12 }
13
14 public function wp_nonce_url( $url, $action ): string {
15 return wp_nonce_url( $url, $action );
16 }
17
18 public function self_admin_url( $path ): string {
19 return self_admin_url( $path );
20 }
21
22 /**
23 * Retrieves an array of pages (or hierarchical post type items).
24 *
25 * @return WP_Post[]|false Array of pages (or hierarchical post type items). Boolean false if the
26 * specified post type is not hierarchical or the specified status is not
27 * supported by the post type.
28 */
29 public function get_pages( $args ) : ?array {
30 return get_pages( $args );
31 }
32
33 /**
34 * Creates and returns a wp query instance.
35 *
36 * @return \WP_Query
37 */
38 public function get_query( $args ) : ?\WP_Query {
39 return new \WP_Query( $args );
40 }
41
42 public function get_option( $option_key ) {
43 return get_option( $option_key );
44 }
45
46 public function update_option( $option_key, $option_value ) : void {
47 update_option( $option_key, $option_value );
48 }
49
50 public function add_option( $option_key, $option_value ) : void {
51 add_option( $option_key, $option_value );
52 }
53
54 public function add_query_arg( $args, $url ) : string {
55 return add_query_arg( $args, $url );
56 }
57
58 public function has_custom_logo() : bool {
59 return has_custom_logo();
60 }
61
62 public function current_user_can( $capability, $args ) : bool {
63 return current_user_can( $capability, $args );
64 }
65
66 public function get_post_status( $post_id ) : string {
67 return get_post_status( $post_id );
68 }
69 }
70