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 / documents / loop.php
ele-custom-skin / theme-builder / documents Last commit date
custom-grid.php 2 months ago loop.php 2 months ago
loop.php
88 lines
1 <?php
2 namespace ElementorPro\Modules\ThemeBuilder\Documents;
3 use ElementorPro\Modules\ThemeBuilder\Documents\Single;
4 use ElementorPro\Modules\ThemeBuilder\Module;
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit; // Exit if accessed directly
8 }
9
10 class Loop extends Single {
11
12 public static function get_properties() {
13 $properties = parent::get_properties();
14
15 $properties['condition_type'] = 'loop';
16 //$properties['location'] = 'archive';
17 $properties['location'] = 'single';
18 $properties['support_kit'] = true;
19 $properties['support_site_editor'] = true;
20 return $properties;
21 }
22
23 protected static function get_site_editor_type() {
24 return 'loop';
25 }
26
27 public function get_name() {
28 return 'loop';
29 }
30
31 public static function get_type() {
32 return 'loop';
33 }
34
35 protected static function get_site_editor_thumbnail_url() {
36 return ELECS_URL . 'assets/images/loop.svg';
37 }
38
39 public static function get_title() {
40 return __( 'Loop', 'ele-custom-skin' );
41 }
42
43 /*
44
45 Let's be undependable from Preview As options
46
47 */
48 public static function get_preview_as_options() {
49 $post_types = self::get_public_post_types();//Module::get_public_post_types();
50
51 $post_types['attachment'] = get_post_type_object( 'attachment' )->label;
52 $post_types_options = [];
53
54 foreach ( $post_types as $post_type => $label ) {
55 $post_types_options[ 'single/' . $post_type ] = get_post_type_object( $post_type )->labels->singular_name;
56 }
57
58 return [
59 'single' => [
60 'label' => __( 'Single', 'elementor-pro' ),
61 'options' => $post_types_options,
62 ],
63 'page/404' => __( '404', 'elementor-pro' ),
64 ];
65 }
66
67 public static function get_public_post_types(){
68 //Array ( [post] => Posts [page] => Pages )
69 $post_types_options = [];
70 $args = array(
71 'public' => true,
72 );
73 $output = 'objects'; // names or objects
74 $post_types = get_post_types( $args, $output );
75 foreach ( $post_types as $post_type ) {
76 if ('elementor_library' != $post_type->name) $post_types_options[$post_type->name]= $post_type->label ;
77 }
78 return $post_types_options;
79 }
80 /*
81
82 I want a preview like the template not default
83
84 */
85
86
87 }
88