PluginProbe ʕ •ᴥ•ʔ
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid / trunk
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid vtrunk
7.9.3 7.9.2 trunk 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.2.0 4.2.1 4.2.2 4.2.3 5.0.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 6.0.0 7.0.0 7.0.1 7.0.2 7.1.0 7.2.0 7.2.1 7.2.10 7.2.11 7.2.2 7.2.3 7.2.4 7.2.5 7.2.6 7.2.7 7.2.8 7.2.9 7.3.0 7.3.1 7.4.0 7.4.1 7.4.2 7.4.3 7.5.0 7.6.0 7.6.1 7.7.0 7.7.1 7.7.10 7.7.11 7.7.12 7.7.13 7.7.14 7.7.15 7.7.16 7.7.17 7.7.18 7.7.19 7.7.2 7.7.20 7.7.21 7.7.22 7.7.3 7.7.4 7.7.5 7.7.6 7.7.7 7.7.8 7.7.9 7.8.0 7.8.1 7.8.2 7.8.3 7.8.4 7.8.5 7.8.6 7.8.7 7.8.8 7.8.9 7.9.0 7.9.1
the-post-grid / app / Abstracts / AbstractDivi.php
the-post-grid / app / Abstracts Last commit date
AbstractDivi.php 1 year ago
AbstractDivi.php
87 lines
1 <?php
2
3 namespace RT\ThePostGrid\Abstracts;
4
5 use \ET_Builder_Module;
6
7 abstract class AbstractDivi extends ET_Builder_Module {
8
9 public $vb_support = 'on';
10 protected $video_id = 'PLeKWXbEok0';
11 public $icon_path;
12
13 public function init() {
14 $this->name = $this->get_module_name();
15 $this->icon_path = $this->get_icon_path();
16 $this->folder_name = 'et_pb_the_post_grid_module';
17 $this->settings_modal_toggles = $this->get_settings_modal_toggles();
18 $this->help_videos = $this->help_videos();
19 }
20
21 protected function get_module_name() {
22 return esc_html__( 'The Post Grid Module Name', 'the-post-grid' );
23 }
24
25 protected function get_icon_path() {
26 return trailingslashit( RT_THE_POST_GRID_PLUGIN_PATH ) . "/assets/images/gutenberg/grid-layout.svg";
27 }
28
29 protected function help_videos() {
30 return [
31 [
32 'id' => $this->video_id,
33 'name' => $this->name,
34 ],
35 ];
36 }
37
38 public function get_settings_modal_toggles() {
39 $general = [
40 'tpg_layout' => esc_html__( 'Layout', 'the-post-grid' ),
41 'tpg_query' => esc_html__( 'Query Builder', 'the-post-grid' ),
42 'tpg_filter' => esc_html__( 'Filter (Front-end)', 'the-post-grid' ),
43 'tpg_pagination' => esc_html__( 'Pagination', 'the-post-grid' ),
44 'tpg_links' => esc_html__( 'Post Link', 'the-post-grid' ),
45 'tpg_selection' => esc_html__( 'Field Selection', 'the-post-grid' ),
46 'tpg_section_title' => esc_html__( 'Section Title', 'the-post-grid' ),
47 'tpg_post_title' => esc_html__( 'Post title', 'the-post-grid' ),
48 'tpg_thumbnail' => esc_html__( 'Thumbnail', 'the-post-grid' ),
49 'tpg_excerpt' => esc_html__( 'Excerpt / Content', 'the-post-grid' ),
50 'tpg_meta_data' => esc_html__( 'Meta Data', 'the-post-grid' ),
51 'tpg_acf' => esc_html__( 'ACF Settings', 'the-post-grid' ),
52 'tpg_read_more' => esc_html__( 'Read More', 'the-post-grid' ),
53 ];
54
55 $advanced = [
56 'tpg_section_title_style' => esc_html__( 'Section Title', 'the-post-grid' ),
57 'tpg_post_title_style' => esc_html__( 'Post Title', 'the-post-grid' ),
58 'tpg_thumbnail_style' => esc_html__( 'Thumbnail', 'the-post-grid' ),
59 'tpg_excerpt_style' => esc_html__( 'Excerpt / Content', 'the-post-grid' ),
60 'tpg_meta_data_style' => esc_html__( 'Meta Data', 'the-post-grid' ),
61 'tpg_social_share_style' => esc_html__( 'Social Share', 'the-post-grid' ),
62 'tpg_read_more_style' => esc_html__( 'Read More', 'the-post-grid' ),
63 'tpg_filter_style' => esc_html__( 'Front-End Filter', 'the-post-grid' ),
64 'tpg_pagination_style' => esc_html__( 'Pagination / Load More', 'the-post-grid' ),
65 'tpg_acf_style' => esc_html__( 'Advanced Custom Field (ACF)', 'the-post-grid' ),
66 'tpg_card_style' => esc_html__( 'Card (Post Item)', 'the-post-grid' ),
67 ];
68
69 // Let child filter the array if needed
70 $general = $this->filter_general_toggles( $general );
71 $advanced = $this->filter_advanced_toggles( $advanced );
72
73 return [
74 'general' => [ 'toggles' => $general ],
75 'advanced' => [ 'toggles' => $advanced ],
76 ];
77 }
78
79 protected function filter_general_toggles( $toggles ) {
80 return $toggles;
81 }
82
83 protected function filter_advanced_toggles( $toggles ) {
84 return $toggles;
85 }
86
87 }