callouts
1 year ago
upgrade
2 years ago
widgets
2 years ago
components-admin.php
2 years ago
help-addons-row.php
2 years ago
help-addons.php
2 years ago
help.php
2 years ago
postbox-header.php
2 years ago
settings-reset.php
9 months ago
settings-settings.php
11 months ago
settings-tools.php
2 years ago
settings.php
2 years ago
setup-add.php
11 months ago
setup-edit.php
2 years ago
shortcode.php
2 years ago
view.php
2 years ago
settings.php
100 lines
| 1 | <?php |
| 2 | // Don't load directly. |
| 3 | if ( ! defined( 'ABSPATH' ) || ! pods_is_admin( 'pods_settings' ) ) { |
| 4 | die( '-1' ); |
| 5 | } |
| 6 | ?> |
| 7 | <div class="wrap pods-admin<?php echo PodsAdmin::$instance->has_horizontal_callout() ? '' : ' pods-admin--flex'; ?>"> |
| 8 | <?php |
| 9 | /** |
| 10 | * Allow additional output before the container area of the Pods settings screen. |
| 11 | * |
| 12 | * @since 3.1.0 |
| 13 | */ |
| 14 | do_action( 'pods_admin_before_settings' ); |
| 15 | ?> |
| 16 | |
| 17 | <div class="pods-admin__content-container"> |
| 18 | <form action="" method="post" class="pods-submittable pods-form pods-form-settings"> |
| 19 | |
| 20 | <div id="icon-pods" class="icon32"><br /></div> |
| 21 | |
| 22 | <?php |
| 23 | $default = 'settings'; |
| 24 | |
| 25 | $tabs = [ |
| 26 | 'settings' => __( 'Settings', 'pods' ), |
| 27 | 'tools' => __( 'Tools', 'pods' ), |
| 28 | 'reset' => __( 'Cleanup & Reset', 'pods' ), |
| 29 | ]; |
| 30 | |
| 31 | /** |
| 32 | * Allow filtering of settings page tabs. |
| 33 | * |
| 34 | * @since 2.8.0 |
| 35 | * |
| 36 | * @param array $tabs List of settings page tabs. |
| 37 | */ |
| 38 | $tabs = apply_filters( 'pods_admin_settings_tabs', $tabs ); |
| 39 | |
| 40 | $current_tab = pods_v( 'tab', 'get', $default, true ); |
| 41 | |
| 42 | if ( ! isset( $tabs[ $current_tab ] ) ) { |
| 43 | $current_tab = $default; |
| 44 | } |
| 45 | ?> |
| 46 | |
| 47 | <h2 class="nav-tab-wrapper"> |
| 48 | <?php |
| 49 | foreach ( $tabs as $tab => $label ) { |
| 50 | $class = ''; |
| 51 | |
| 52 | if ( $tab === $current_tab ) { |
| 53 | $class = ' nav-tab-active'; |
| 54 | |
| 55 | $label = 'Pods ' . $label; |
| 56 | } |
| 57 | |
| 58 | $url = pods_query_arg( [ 'tab' => $tab ], [ 'page' ] ); |
| 59 | ?> |
| 60 | <a href="<?php echo esc_url( $url ); ?>" class="nav-tab<?php echo esc_attr( $class ); ?>"> |
| 61 | <?php echo $label; ?> |
| 62 | </a> |
| 63 | <?php |
| 64 | } |
| 65 | ?> |
| 66 | </h2> |
| 67 | <img src="<?php echo esc_url( PODS_URL ); ?>ui/images/pods-logo-notext-rgb-transparent.png" class="pods-leaf-watermark-right" /> |
| 68 | |
| 69 | <?php |
| 70 | wp_nonce_field( 'pods-settings' ); |
| 71 | |
| 72 | /** |
| 73 | * Allow customizations on tab page before output. |
| 74 | * |
| 75 | * @since 2.8.0 |
| 76 | */ |
| 77 | do_action( 'pods_admin_settings_page_pre_' . $current_tab ); |
| 78 | |
| 79 | pods_view( PODS_DIR . 'ui/admin/settings-' . sanitize_title( $current_tab ) . '.php' ); |
| 80 | |
| 81 | /** |
| 82 | * Allow customizations on tab page after output. |
| 83 | * |
| 84 | * @since 2.8.0 |
| 85 | */ |
| 86 | do_action( 'pods_admin_settings_page_post_' . $current_tab ); |
| 87 | ?> |
| 88 | </form> |
| 89 | </div> |
| 90 | |
| 91 | <?php |
| 92 | /** |
| 93 | * Allow additional output after the container area of the Pods settings screen. |
| 94 | * |
| 95 | * @since 2.7.17 |
| 96 | */ |
| 97 | do_action( 'pods_admin_after_settings' ); |
| 98 | ?> |
| 99 | </div> |
| 100 |