PluginProbe
Email Log / 2.63
Email Log v2.63
2.63 2.4.8 2.4.9 2.6 2.61 2.62 trunk 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.8.1 0.9 0.9.1 0.9.2 1.1 1.5 1.5.1 1.5.2 1.5.3 1.5.4 All 61 releases
email-log / include / Core / UI / Setting / SettingSection.php

SettingSection.php in Email Log 2.63, at include/Core/UI/Setting/SettingSection.php

68 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace EmailLog\Core\UI\Setting;
2
3 defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
4
5 /**
6 * A Section used in Email Log Settings page.
7 * Ideally each add-on may have a different setting section.
8 *
9 * @see add_settings_section()
10 * @since 2.0.0
11 */
12 class SettingSection {
13
14 public $id;
15 public $title;
16 public $callback;
17
18 /**
19 * Each section will have a single option name and the value will be array.
20 * All individual fields will be stored as an element in the value array.
21 *
22 * @var string
23 */
24 public $option_name;
25
26 /**
27 * Sanitize callback for the setting.
28 * An array will be passed to this callback.
29 *
30 * @var callable
31 */
32 public $sanitize_callback;
33
34 /**
35 * List of fields for this section.
36 *
37 * @var SettingField[]
38 */
39 public $fields = array();
40
41 /**
42 * Default value of the fields.
43 *
44 * @var array
45 *
46 * @since 2.1.0
47 */
48 public $default_value = array();
49
50 /**
51 * Field labels.
52 *
53 * @var array
54 *
55 * @since 2.1.0
56 */
57 public $field_labels = array();
58
59 /**
60 * Add a field to the section.
61 *
62 * @param \EmailLog\Core\UI\Setting\SettingField $field Field to add.
63 */
64 public function add_field( SettingField $field ) {
65 $this->fields[] = $field;
66 }
67 }
68