PluginProbe
Order Tracking – WordPress Status Tracking Plugin / 3.2.2
Order Tracking – WordPress Status Tracking Plugin v3.2.2
3.5.4 3.5.3 3.5.2 3.5.1 3.5.0 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.3.0 3.3.1 3.3.10 3.3.11 3.3.12 3.3.13 3.3.14 3.3.15 All 235 releases
order-tracking / views / View.Admin.class.php

View.Admin.class.php in Order Tracking – WordPress Status Tracking Plugin 3.2.2, at views/View.Admin.class.php

49 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Base class for admin views, enqueues admin files, has functions for displaying editable custom fields.
5 *
6 * @since 3.0.0
7 */
8 class ewdotpViewAdmin extends ewdotpView {
9
10 /**
11 * Prints custom fields area
12 *
13 * @since 3.0.0
14 */
15 public function print_admin_custom_field( $custom_field ) {
16 global $ewd_otp_controller;
17
18 $custom_field->field_value = $this->set_custom_field_value( $custom_field );
19
20 $this->custom_field = $custom_field;
21
22 if ( $custom_field->type == 'text' ) { $template = $this->find_template( 'admin-custom-field-text' ); }
23 elseif ( $custom_field->type == 'textarea' ) { $template = $this->find_template( 'admin-custom-field-textarea' ); }
24 elseif ( $custom_field->type == 'number' ) { $template = $this->find_template( 'admin-custom-field-number' ); }
25 elseif ( $custom_field->type == 'select' ) { $template = $this->find_template( 'admin-custom-field-select' ); }
26 elseif ( $custom_field->type == 'radio' ) { $template = $this->find_template( 'admin-custom-field-radio' ); }
27 elseif ( $custom_field->type == 'checkbox' ) { $template = $this->find_template( 'admin-custom-field-checkbox' ); }
28 elseif ( $custom_field->type == 'link' ) { $template = $this->find_template( 'admin-custom-field-link' ); }
29 elseif ( $custom_field->type == 'file' ) { $template = $this->find_template( 'admin-custom-field-file' ); }
30 elseif ( $custom_field->type == 'image' ) { $template = $this->find_template( 'admin-custom-field-image' ); }
31 elseif ( $custom_field->type == 'date' ) { $template = $this->find_template( 'admin-custom-field-date' ); }
32 elseif ( $custom_field->type == 'datetime' ) { $template = $this->find_template( 'admin-custom-field-datetime' ); }
33
34 if ( $template ) {
35 include( $template );
36 }
37 }
38
39 /**
40 * Returns the value for a specified custom field. Should be overwritten by child class.
41 *
42 * @since 3.0.0
43 */
44 public function set_custom_field_value( $custom_field ) {
45
46 return null;
47 }
48 }
49