PluginProbe
Additional Terms Lite for WooCommerce / trunk
Additional Terms Lite for WooCommerce vtrunk
1.7.3 1.7.2.1 trunk 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.6.0 1.6.1 1.6.2 1.6.3 All 35 releases
woo-additional-terms / src / Settings / Sections / Section.php

Section.php in Additional Terms Lite for WooCommerce trunk, at src/Settings/Sections/Section.php

47 lines 710 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The plugin settings sections.
4 *
5 * @since 1.6.0
6 *
7 * @package woo-additional-terms
8 */
9
10 namespace Woo_Additional_Terms\Settings\Sections;
11
12 /**
13 * Class Settings sections.
14 */
15 abstract class Section {
16
17 /**
18 * Retrieve the settings fields for the section.
19 *
20 * @since 1.6.0
21 *
22 * @return array
23 */
24 abstract public function get_fields();
25
26 /**
27 * Compile a list of the available field keys.
28 *
29 * @since 1.6.0
30 *
31 * @return array
32 */
33 protected function get_field_keys() {
34
35 static $keys = array();
36
37 if ( empty( $keys ) ) {
38 $keys = array_filter(
39 array_keys( $this->get_fields() ),
40 static fn( $key) => mb_strpos( $key, 'section_' ) !== 0
41 );
42 }
43
44 return $keys;
45 }
46 }
47