PluginProbe ʕ •ᴥ•ʔ
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid / 4.2.0
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid v4.2.0
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 3 years ago layout-settings.php 3 years ago post-source.php 3 years ago sc-settings.php 3 years ago settings.php 3 years ago style.php 3 years ago
settings.php
95 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
11 // Do not allow directly accessing this file.
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit( 'This script cannot be accessed directly.' );
14 }
15 ?>
16
17 <div class="wrap rttpg-wrapper">
18 <div id="upf-icon-edit-pages" class="icon32 icon32-posts-page"><br/></div>
19 <h2><?php esc_html_e( 'The Post Grid Settings', 'the-post-grid' ); ?></h2>
20 <h3><?php esc_html_e( 'General settings', 'the-post-grid' ); ?>
21 <a style="margin-left: 15px; font-size: 15px;" href="<?php echo esc_url( rtTpg()->docLink() ); ?>" target="_blank"><?php esc_html_e( 'Documentation', 'the-post-grid' ); ?></a>
22 </h3>
23
24 <div class="rt-setting-wrapper">
25 <div class="rt-response"></div>
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 $html = null;
31 $html .= '<div id="settings-tabs" class="rt-tabs rt-tab-container">';
32
33 $html .= '<ul class="tab-nav rt-tab-nav">';
34 $html .= sprintf(
35 '<li%s><a href="#common-settings">%s</a></li>
36 <li%s><a href="#popup-fields">%s</a></li>
37 <li%s><a href="#social-share">%s</a></li>
38 <li%s><a href="#custom-script">%s</a></li>
39 <li%s><a href="#other-settings">%s</a></li>',
40 $last_tab == 'common-settings' ? ' class="active"' : '',
41 __( 'Common Settings', 'the-post-grid' ),
42 $last_tab == 'popup-fields' ? ' class="active"' : '',
43 __( 'PopUp field selection', 'the-post-grid' ),
44 $last_tab == 'social-share' ? ' class="active"' : '',
45 __( 'Social Share', 'the-post-grid' ),
46 $last_tab == 'custom-script' ? ' class="active"' : '',
47 __( 'Custom Script', 'the-post-grid' ),
48 $last_tab == 'other-settings' ? ' class="active"' : '',
49 __( 'Other Settings', 'the-post-grid' )
50 );
51
52 ob_start();
53 do_action( 'tpg_settings_tab_title', $last_tab );
54 $html .= ob_get_clean();
55
56 $html .= '</ul>';
57
58 $html .= sprintf( '<div id="common-settings" class="rt-tab-content"%s>', $last_tab == 'common-settings' ? ' style="display:block"' : '' );
59 $html .= Fns::rtFieldGenerator( Options::rtTPGSettingsCommonSettingsFields() );
60 $html .= '</div>';
61
62 $html .= sprintf( '<div id="popup-fields" class="rt-tab-content"%s>', $last_tab == 'popup-fields' ? ' style="display:block"' : '' );
63 $html .= Fns::rtFieldGenerator( Options::rtTpgSettingsDetailFieldSelection() );
64 $html .= '</div>';
65
66 $html .= sprintf( '<div id="social-share" class="rt-tab-content"%s>', $last_tab == 'social-share' ? ' style="display:block"' : '' );
67 $html .= Fns::rtFieldGenerator( Options::rtTPGSettingsSocialShareFields() );
68 $html .= '</div>';
69
70 $html .= sprintf( '<div id="custom-script" class="rt-tab-content"%s>', $last_tab == 'custom-script' ? ' style="display:block"' : '' );
71 $html .= Fns::rtFieldGenerator( Options::rtTPGSettingsCustomScriptFields() );
72 $html .= '</div>';
73
74 $html .= sprintf( '<div id="other-settings" class="rt-tab-content"%s>', $last_tab == 'other-settings' ? ' style="display:block"' : '' );
75 $html .= Fns::rtFieldGenerator( Options::rtTPGSettingsOtherSettingsFields() );
76 $html .= '</div>';
77
78 ob_start();
79 do_action( 'tpg_settings_tab_content', $last_tab );
80 $html .= ob_get_clean();
81
82 $html .= sprintf( '<input type="hidden" id="_tpg_last_active_tab" name="_tpg_last_active_tab" value="%s"/>', $last_tab );
83 $html .= '</div>';
84
85 Fns::print_html( $html, true );
86 ?>
87 <p class="submit-wrap"><input type="submit" name="submit" class="button button-primary rtSaveButton" value="Save Changes"></p>
88
89 <?php wp_nonce_field( rtTPG()->nonceText(), rtTPG()->nonceId() ); ?>
90 </form>
91
92 <div class="rt-response"></div>
93 </div>
94 </div>
95