PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 3.3.6
Pods – Custom Content Types and Fields v3.3.6
trunk 1.14.8 2.7.31.3 2.8.23.3 2.9.19.3 3.0.10.3 3.1.4.1 3.2.0 3.2.1 3.2.1.1 3.2.2 3.2.4 3.2.5 3.2.6 3.2.7 3.2.7.1 3.2.8 3.2.8.1 3.2.8.2 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9
pods / ui / admin / settings.php
pods / ui / admin Last commit date
callouts 4 months ago upgrade 4 months ago widgets 4 months ago components-admin.php 4 months ago help-addons-row.php 4 months ago help-addons.php 4 months ago help.php 4 months ago postbox-header.php 4 months ago settings-reset.php 4 months ago settings-settings.php 4 months ago settings-tools.php 4 months ago settings.php 4 months ago setup-add.php 4 months ago setup-edit.php 4 months ago shortcode.php 4 months ago view.php 4 months ago
settings.php
108 lines
1 <?php
2
3 // Don't load directly.
4 if ( ! defined( 'ABSPATH' ) ) {
5 die( '-1' );
6 }
7
8 // phpcs:ignoreFile WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
9
10 // Prevent non-admins.
11 if ( ! pods_is_admin( 'pods_settings' ) ) {
12 die( '-1' );
13 }
14 ?>
15 <div class="wrap pods-admin<?php echo PodsAdmin::$instance->has_horizontal_callout() ? '' : ' pods-admin--flex'; ?>">
16 <?php
17 /**
18 * Allow additional output before the container area of the Pods settings screen.
19 *
20 * @since 3.1.0
21 */
22 do_action( 'pods_admin_before_settings' );
23 ?>
24
25 <div class="pods-admin__content-container">
26 <form action="" method="post" class="pods-submittable pods-form pods-form-settings">
27
28 <div id="icon-pods" class="icon32"><br /></div>
29
30 <?php
31 $default = 'settings';
32
33 $tabs = [
34 'settings' => __( 'Settings', 'pods' ),
35 'tools' => __( 'Tools', 'pods' ),
36 'reset' => __( 'Cleanup & Reset', 'pods' ),
37 ];
38
39 /**
40 * Allow filtering of settings page tabs.
41 *
42 * @since 2.8.0
43 *
44 * @param array $tabs List of settings page tabs.
45 */
46 $tabs = apply_filters( 'pods_admin_settings_tabs', $tabs );
47
48 $current_tab = pods_v( 'tab', 'get', $default, true );
49
50 if ( ! isset( $tabs[ $current_tab ] ) ) {
51 $current_tab = $default;
52 }
53 ?>
54
55 <h2 class="nav-tab-wrapper">
56 <?php
57 foreach ( $tabs as $tab => $label ) {
58 $class = '';
59
60 if ( $tab === $current_tab ) {
61 $class = ' nav-tab-active';
62
63 $label = 'Pods ' . $label;
64 }
65
66 $url = pods_query_arg( [ 'tab' => $tab ], [ 'page' ] );
67 ?>
68 <a href="<?php echo esc_url( $url ); ?>" class="nav-tab<?php echo esc_attr( $class ); ?>">
69 <?php echo esc_html( $label ); ?>
70 </a>
71 <?php
72 }
73 ?>
74 </h2>
75 <img src="<?php echo esc_url( PODS_URL ); ?>ui/images/pods-logo-notext-rgb-transparent.png" class="pods-leaf-watermark-right" />
76
77 <?php
78 wp_nonce_field( 'pods-settings' );
79
80 /**
81 * Allow customizations on tab page before output.
82 *
83 * @since 2.8.0
84 */
85 do_action( 'pods_admin_settings_page_pre_' . $current_tab );
86
87 pods_view( PODS_DIR . 'ui/admin/settings-' . sanitize_title( $current_tab ) . '.php' );
88
89 /**
90 * Allow customizations on tab page after output.
91 *
92 * @since 2.8.0
93 */
94 do_action( 'pods_admin_settings_page_post_' . $current_tab );
95 ?>
96 </form>
97 </div>
98
99 <?php
100 /**
101 * Allow additional output after the container area of the Pods settings screen.
102 *
103 * @since 2.7.17
104 */
105 do_action( 'pods_admin_after_settings' );
106 ?>
107 </div>
108