PluginProbe
Elementor Website Builder – more than just a page builder / 3.1.0-beta1
Elementor Website Builder – more than just a page builder v3.1.0-beta1
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 3.1.0-beta1, at modules/compatibility-tag/module.php

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