-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
44 lines (33 loc) · 1.24 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
defined('ABSPATH') or die();
if ( ! function_exists( 'tangible_fields' ) ) :
function tangible_fields( $arg = false ) {
static $o;
return $arg === false ? $o : ( $o = $arg );
}
endif;
(include __DIR__ . '/module-loader.php')(new class extends StdClass {
public $name = 'tangible_fields';
// Remember to update the version - Expected format: YYYYMMDD
public $version = '20250122';
// Dynamic methods
function __call( $method = '', $args = [] ) {
if ( isset( $this->$method ) ) {
return call_user_func_array( $this->$method, $args );
}
$caller = current( debug_backtrace() );
trigger_error("Undefined method \"$method\" for {$this->name}, called from <b>{$caller['file']}</b> in <b>{$caller['line']}</b><br>", E_USER_WARNING);
}
function load() {
// Parent plugin is expected to load framework
if (!class_exists('tangible\\framework')) return;
$fields = $this;
tangible_fields( $fields );
require_once __DIR__ . '/dynamic-values/index.php';
require_once __DIR__ . '/fields/index.php';
require_once __DIR__ . '/elements/index.php';
require_once __DIR__ . '/enqueue.php';
require_once __DIR__ . '/context.php';
do_action('tangible_fields_loaded', $fields);
}
});