sanitizer = $sanitizer; $this->settings = $settings; $this->assets = betterdocs()->assets; } public function set_customizer( $customizer, $defaults ) { $this->customizer = $customizer; $this->defaults = $defaults; } public function section() { $this->customizer->add_section( $this->get_id(), [ 'title' => $this->get_title(), 'priority' => $this->priority, 'panel' => $this->panel_id ] ); } public function register( $customizer, $defaults ) { $this->set_customizer( $customizer, $defaults ); $_methods = get_class_methods( $this ); if ( ! empty( $_methods ) ) { $this->section(); foreach ( $_methods as $method ) { if ( in_array( $method, [ 'get_id', 'section', 'get_title', 'register', 'set_customizer', '__construct' ] ) ) { continue; } $this->{$method}(); } } } }