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: 45: 46: 47: 48:
<?php
namespace VSP\Modules;
defined( 'ABSPATH' ) || exit;
use VSP\Base;
class WPOnion extends Base {
public function __construct( $options = array() ) {
$this->set_args( $options );
$this->wpo_load();
}
public function fields() {
$builder = wponion_builder();
$this->do_deprecated_action( 'settings_options', array( $builder ), '0.9', 'settings/fields' );
$this->do_action( 'settings/fields', $builder );
return $builder;
}
public function wpo_load() {
$assets = wponion_cast_array( $this->option( 'assets', array() ) );
$assets[] = 'vsp_load_core_assets';
$fields = ( wponion_is_version( '1.4.6', '>' ) ) ? array( &$this, 'fields' ) : $this->fields();
wponion_settings( $this->option(), $fields );
}
}