PluginProbe ʕ •ᴥ•ʔ
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid / 7.8.8
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid v7.8.8
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 / resources / settings / settings.php
the-post-grid / resources / settings Last commit date
item-fields.php 9 months ago layout-settings.php 9 months ago post-source.php 9 months ago sc-settings.php 9 months ago settings.php 9 months ago style.php 9 months ago
settings.php
155 lines
1 <?php
2 /**
3 * Settings Page
4 *
5 * @package RT_TPG
6 */
7
8 use RT\ThePostGrid\Helpers\Fns;
9 use RT\ThePostGrid\Helpers\Options;
10 use RT\ThePostGrid\Helpers\Svg;
11
12 // Do not allow directly accessing this file.
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit( 'This script cannot be accessed directly.' );
15 }
16 ?>
17
18 <div class=" rttpg-wrapper">
19 <div id="upf-icon-edit-pages" class="icon32 icon32-posts-page"><br/></div>
20
21 <?php require_once trailingslashit( RT_THE_POST_GRID_PLUGIN_PATH ) . 'resources/parts/settings-header.php'; ?>
22
23 <div class="rt-setting-wrapper">
24 <div class="rt-response"></div>
25 <div class="settings-container">
26 <form id="rt-tpg-settings-form">
27 <?php
28 $settings = get_option( rtTPG()->options['settings'] );
29 $last_tab = isset( $settings['_tpg_last_active_tab'] ) ? trim( $settings['_tpg_last_active_tab'] ) : 'common-settings';
30 $last_tab = ! empty( $_GET['section'] ) ? sanitize_text_field( $_GET['section'] ) : $last_tab;
31 ?>
32 <div id="settings-tabs" class="rt-tabs rt-tab-container">
33 <div class="rt-settings-sidebar">
34 <ul class="tab-nav rt-tab-nav">
35 <?php
36 $tabs = [
37 'common-settings' => [
38 'label' => __( 'Common Settings', 'the-post-grid' ),
39 'icon' => 'settings',
40 'size' => 16,
41 ],
42 'popup-fields' => [
43 'label' => __( 'PopUp field selection', 'the-post-grid' ),
44 'icon' => 'popup',
45 ],
46 'social-share' => [
47 'label' => __( 'Social Share', 'the-post-grid' ),
48 'icon' => 'share',
49 ],
50 'custom-script' => [
51 'label' => __( 'Custom Script', 'the-post-grid' ),
52 'icon' => 'code',
53 ],
54 'ai-integration-settings' => [
55 'label' => __( 'AI Integration', 'the-post-grid' ),
56 'icon' => 'ai',
57 'size' => 18
58 ],
59 'myaccount-settings' => [
60 'label' => __( 'My Account', 'the-post-grid' ),
61 'icon' => 'user',
62 ],
63 'event-settings' => [
64 'label' => __( 'Event Settings', 'the-post-grid' ),
65 'icon' => 'calender',
66 ],
67 'other-settings' => [
68 'label' => __( 'Other Settings', 'the-post-grid' ),
69 'icon' => 'tools',
70 ],
71 ];
72 ?>
73
74 <?php foreach ( $tabs as $tab_id => $tab ) : ?>
75 <li class="<?php echo $last_tab === $tab_id ? 'active' : ''; ?>">
76 <a href="#<?php echo esc_attr( $tab_id ); ?>">
77 <?php Svg::get_svg( $tab['icon'], $tab['size'] ?? '15' ); ?>
78
79 <?php echo esc_html( $tab['label'] ); ?>
80 </a>
81 </li>
82 <?php endforeach; ?>
83 <?php do_action( 'tpg_settings_tab_title', $last_tab ); ?>
84 </ul>
85 </div>
86 <div class="rt-settings-content">
87 <!-- Common Settings -->
88 <div id="common-settings" class="rt-tab-content" <?php echo $last_tab === 'common-settings' ? 'style="display:block"' : ''; ?>>
89 <?php echo Fns::rtFieldGenerator( Options::rtTPGSettingsCommonSettingsFields() ); ?>
90 </div>
91
92 <!-- Popup Fields -->
93 <div id="popup-fields" class="rt-tab-content" <?php echo $last_tab === 'popup-fields' ? 'style="display:block"' : ''; ?>>
94 <?php echo Fns::rtFieldGenerator( Options::rtTpgSettingsDetailFieldSelection() ); ?>
95 </div>
96
97 <!-- Social Share -->
98 <div id="social-share" class="rt-tab-content" <?php echo $last_tab === 'social-share' ? 'style="display:block"' : ''; ?>>
99 <?php echo Fns::rtFieldGenerator( Options::rtTPGSettingsSocialShareFields() ); ?>
100 </div>
101
102 <!-- Custom Script -->
103 <div id="custom-script" class="rt-tab-content" <?php echo $last_tab === 'custom-script' ? 'style="display:block"' : ''; ?>>
104 <?php echo Fns::rtFieldGenerator( Options::rtTPGSettingsCustomScriptFields() ); ?>
105 </div>
106
107 <!-- Other Settings -->
108 <div id="other-settings" class="rt-tab-content" <?php echo $last_tab === 'other-settings' ? 'style="display:block"' : ''; ?>>
109 <?php echo Fns::rtFieldGenerator( Options::rtTPGSettingsOtherSettingsFields() ); ?>
110 </div>
111
112 <!-- AI Integration -->
113 <div id="ai-integration-settings" class="rt-tab-content" <?php echo $last_tab === 'ai-integration-settings' ? 'style="display:block"' : ''; ?>>
114 <?php echo Fns::rtFieldGenerator( Options::rtTPGAiIntegrationSettings() ); ?>
115
116 <div class="rt-ai-integration-settings-chatgpt" style="display:none;">
117 <?php echo Fns::rtFieldGenerator( Options::rtTPGChatGPGSettings() ); ?>
118 </div>
119
120 <div class="rt-ai-integration-settings-gemini" style="display:none;">
121 <?php echo Fns::rtFieldGenerator( Options::rtTPGGeminiSettings() ); ?>
122 </div>
123 </div>
124
125 <!-- My Account -->
126 <div id="myaccount-settings" class="rt-tab-content" <?php echo $last_tab === 'myaccount-settings' ? 'style="display:block"' : ''; ?>>
127 <?php echo Fns::rtFieldGenerator( Options::rtTPGMyAccountSettings() ); ?>
128 </div>
129
130 <!-- Event Settings -->
131 <div id="event-settings" class="rt-tab-content" <?php echo $last_tab === 'event-settings' ? 'style="display:block"' : ''; ?>>
132 <?php echo Fns::rtFieldGenerator( Options::rtTPGEventSettings() ); ?>
133 </div>
134
135 <?php do_action( 'tpg_settings_tab_content', $last_tab ); ?>
136
137 <input type="hidden" id="_tpg_last_active_tab" name="_tpg_last_active_tab" value="<?php echo esc_attr( $last_tab ); ?>"/>
138
139 <div class="content-footer">
140 <p class="submit-wrap">
141 <input type="submit" name="submit" class="button button-primary rtSaveButton" value="Save Changes">
142 </p>
143
144 <?php wp_nonce_field( rtTPG()->nonceText(), rtTPG()->nonceId() ); ?>
145 </div>
146 </div>
147
148 <?php require_once trailingslashit( RT_THE_POST_GRID_PLUGIN_PATH ) . 'resources/parts/settings-promo.php'; ?>
149 </div>
150 </form>
151
152 </div>
153 </div>
154 </div>
155