field.php
4 months ago
form.php
4 months ago
list.php
4 months ago
single.php
4 months ago
view.php
4 months ago
view.php
62 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 | <style type="text/css"> |
| 11 | ol.pods_form_widget_form { |
| 12 | list-style: none; |
| 13 | padding-left: 0; |
| 14 | margin-left: 0; |
| 15 | } |
| 16 | |
| 17 | ol.pods_form_widget_form label { |
| 18 | display: block; |
| 19 | } |
| 20 | </style> |
| 21 | |
| 22 | <ol class="pods_form_widget_form"> |
| 23 | <li> |
| 24 | <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title', 'pods' ); ?></label> |
| 25 | |
| 26 | <input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" value="<?php echo esc_attr( $title ); ?>" /> |
| 27 | </li> |
| 28 | |
| 29 | <li> |
| 30 | <label for="<?php echo esc_attr( $this->get_field_id( 'view' ) ); ?>"><?php esc_html_e( 'File to include', 'pods' ); ?></label> |
| 31 | |
| 32 | <input class="widefat" type="text" name="<?php echo esc_attr( $this->get_field_name( 'view' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'view' ) ); ?>" value="<?php echo esc_attr( $view ); ?>" /> |
| 33 | </li> |
| 34 | |
| 35 | <li> |
| 36 | <label for="<?php echo esc_attr( $this->get_field_id( 'cache_mode' ) ); ?>"><?php esc_html_e( 'Cache Type', 'pods' ); ?></label> |
| 37 | |
| 38 | <?php |
| 39 | $cache_modes = array( |
| 40 | 'none' => __( 'Disable Caching', 'pods' ), |
| 41 | 'cache' => __( 'Object Cache', 'pods' ), |
| 42 | 'transient' => __( 'Transient', 'pods' ), |
| 43 | 'site-transient' => __( 'Site Transient', 'pods' ), |
| 44 | ); |
| 45 | ?> |
| 46 | <select id="<?php echo esc_attr( $this->get_field_id( 'cache_mode' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'cache_mode' ) ); ?>"> |
| 47 | <?php foreach ( $cache_modes as $cache_mode_option => $cache_mode_label ) : ?> |
| 48 | <?php $selected = ( $cache_mode_option === $cache_mode ) ? 'selected' : ''; ?> |
| 49 | <option value="<?php echo esc_attr( $cache_mode_option ); ?>"<?php selected( $cache_mode_option, $cache_mode ); ?>> |
| 50 | <?php echo esc_html( $cache_mode_label ); ?> |
| 51 | </option> |
| 52 | <?php endforeach; ?> |
| 53 | </select> |
| 54 | </li> |
| 55 | |
| 56 | <li> |
| 57 | <label for="<?php echo esc_attr( $this->get_field_id( 'expires' ) ); ?>"><?php esc_html_e( 'Cache Expiration (in seconds)', 'pods' ); ?></label> |
| 58 | |
| 59 | <input class="widefat" type="text" name="<?php echo esc_attr( $this->get_field_name( 'expires' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'expires' ) ); ?>" value="<?php echo esc_attr( $expires ); ?>" /> |
| 60 | </li> |
| 61 | </ol> |
| 62 |