PluginProbe ʕ •ᴥ•ʔ
ECS – Ele Custom Skin for Elementor / 4.3.6
ECS – Ele Custom Skin for Elementor v4.3.6
4.3.6 4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.0 4.1.11 4.1.10 4.1.9 4.1.8 4.1.6 4.1.7 4.1.5 4.1.4 4.1.1 4.1.2 trunk 1.0.0 1.0.1 1.0.9 1.1.3 1.1.4 1.1.5 1.2.0 1.2.1 1.2.4 1.2.5 1.3.10 1.3.11 1.3.3 1.3.4 1.3.6 1.3.7 1.3.9 1.4.0 2.0.2 2.1.0 2.2.0 2.2.1 2.2.2 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 4.1.0
ele-custom-skin / theme-builder / conditions / loop.php
ele-custom-skin / theme-builder / conditions Last commit date
custom-grid.php 5 years ago loop.php 5 years ago
loop.php
70 lines
1 <?php
2
3
4 use ElementorPro\Modules\ThemeBuilder\Module;
5 use ElementorPro\Core\Utils;
6 use ElementorPro\Modules\ThemeBuilder\Conditions\Post;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly
10 }
11
12 class ECS_Loop_Conditions extends ElementorPro\Modules\ThemeBuilder\Conditions\Condition_Base {
13
14 protected $sub_conditions = [
15 'front_page',
16 ];
17
18 public static function get_type() {
19 return 'loop';
20 }
21
22 public function get_name() {
23 return 'loop';
24 }
25
26 public static function get_priority() {
27 return 60;
28 }
29
30 public function get_label() {
31 return __( 'Loop', 'ele-custom-skin' );
32 }
33
34 public function get_all_label() {
35 return __( 'No Conditions', 'ele-custom-skin' );
36 }
37
38 public function register_sub_conditions() {
39 $post_types = Utils::get_public_post_types();
40
41 $post_types['attachment'] = get_post_type_object( 'attachment' )->label;
42
43 foreach ( $post_types as $post_type => $label ) {
44 $condition = new Post( [
45 'post_type' => $post_type,
46 ] );
47
48 $this->register_sub_condition( $condition );
49 }
50
51 $this->sub_conditions[] = 'child_of';
52
53 $this->sub_conditions[] = 'any_child_of';
54
55 $this->sub_conditions[] = 'by_author';
56
57 // Last condition.
58 $this->sub_conditions[] = 'not_found404';
59 }
60
61 public function check( $args ) {
62 return false;
63 }
64 }
65
66 add_action( 'elementor/theme/register_conditions', function( $conditions_manager ) {
67 $conditions_manager->get_condition('general')->register_sub_condition( new ECS_Loop_Conditions() );
68
69 },100);
70