PluginProbe
Elementor Website Builder – more than just a page builder / 4.0.7
Elementor Website Builder – more than just a page builder v4.0.7
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 / modules / compatibility-tag / module.php

module.php in Elementor Website Builder – more than just a page builder 4.0.7, at modules/compatibility-tag/module.php

79 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\Modules\CompatibilityTag;
3
4 use Elementor\Plugin;
5 use Elementor\Core\Utils\Version;
6 use Elementor\Core\Utils\Collection;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly.
10 }
11
12 /**
13 * Inspired By WooCommerce.
14 *
15 * @link https://github.com/woocommerce/woocommerce/blob/master/includes/admin/plugin-updates/class-wc-plugin-updates.php
16 */
17 class Module extends Base_Module {
18 /**
19 * This is the header used by extensions to show testing.
20 *
21 * @var string
22 */
23 const PLUGIN_VERSION_TESTED_HEADER = 'Elementor tested up to';
24
25 /**
26 * @return string
27 */
28 protected function get_plugin_header() {
29 return static::PLUGIN_VERSION_TESTED_HEADER;
30 }
31
32 /**
33 * @return string
34 */
35 protected function get_plugin_label() {
36 return esc_html__( 'Elementor', 'elementor' );
37 }
38
39 /**
40 * @return string
41 */
42 protected function get_plugin_name() {
43 return ELEMENTOR_PLUGIN_BASE;
44 }
45
46 /**
47 * @return string
48 */
49 protected function get_plugin_version() {
50 return ELEMENTOR_VERSION;
51 }
52
53 /**
54 * @return Collection
55 */
56 protected function get_plugins_to_check() {
57 return parent::get_plugins_to_check()
58 ->merge( $this->get_plugins_with_plugin_title_in_their_name() );
59 }
60
61 /**
62 * Get all the plugins that has the name of the current plugin in their name.
63 *
64 * @return Collection
65 */
66 private function get_plugins_with_plugin_title_in_their_name() {
67 return Plugin::$instance->wp
68 ->get_plugins()
69 ->except( [
70 'elementor/elementor.php',
71 'elementor-beta/elementor-beta.php',
72 'block-builder/block-builder.php',
73 ] )
74 ->filter( function ( array $data ) {
75 return false !== strpos( strtolower( $data['Name'] ), 'elementor' );
76 } );
77 }
78 }
79