PluginProbe
Additional Terms Lite for WooCommerce / 1.6.2
Additional Terms Lite for WooCommerce v1.6.2
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 1.6.2, at src/Settings/Sections/Section.php

49 lines 781 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 * @author MyPreview (Github: @mahdiyazdani, @gooklani, @mypreview)
6 *
7 * @since 1.6.0
8 *
9 * @package woo-additional-terms
10 */
11
12 namespace Woo_Additional_Terms\Settings\Sections;
13
14 /**
15 * Class Settings sections.
16 */
17 abstract class Section {
18
19 /**
20 * Retrieve the settings fields for the section.
21 *
22 * @since 1.6.0
23 *
24 * @return array
25 */
26 abstract public function get_fields();
27
28 /**
29 * Compile a list of the available field keys.
30 *
31 * @since 1.6.0
32 *
33 * @return array
34 */
35 protected function get_field_keys() {
36
37 static $keys = array();
38
39 if ( empty( $keys ) ) {
40 $keys = array_filter(
41 array_keys( $this->get_fields() ),
42 static fn( $key) => mb_strpos( $key, 'section_' ) !== 0
43 );
44 }
45
46 return $keys;
47 }
48 }
49