| Server IP : 213.186.33.4 / Your IP : 216.73.216.222 Web Server : Apache System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : karinebmkh ( 644538) PHP Version : 8.4.22 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/karinebmkh/www/wp-content/plugins/divi-pixel/admin/ |
Upload File : |
<?php
namespace DiviPixel;
abstract class DIPI_Settings_Base
{
private $settings_api;
private $tabs;
private $sections;
private $toggles;
private $fields;
public function __construct()
{
$this->settings_api = DIPI_Settings_API::instance();
$this->register_settings();
}
private function register_settings(){
$this->settings_api->add_tabs($this->get_tabs());
$this->settings_api->add_sections($this->get_sections());
$this->settings_api->add_toggles($this->get_toggles());
$this->settings_api->add_fields($this->get_fields());
}
public function get_tabs(){
if(null === $this->tabs) {
$this->tabs = $this->create_tabs();
}
return $this->tabs;
}
public function get_sections(){
if(null === $this->sections) {
$this->sections = $this->create_sections();
}
return $this->sections;
}
public function get_toggles(){
if(null === $this->toggles) {
$this->toggles = $this->create_toggles();
}
return $this->toggles;
}
public function get_fields(){
if(null === $this->fields) {
$this->fields = $this->create_fields();
}
return $this->fields;
}
abstract protected function create_tabs();
abstract protected function create_sections();
abstract protected function create_toggles();
abstract protected function create_fields();
protected function open_customize_url($type, $panel, $url) {
$args = array(
"autofocus[$type]" => $panel,
'url' => rawurlencode( esc_url( $url ) ),
);
return add_query_arg( $args, admin_url( 'customize.php' ) );
}
}
do_action("dipi_settings_base_ready");