Server IP : 192.64.112.168 / Your IP : 13.59.35.116 Web Server : Apache System : Linux nc-ph-2300-85.bluforrest.com 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Sat Dec 2 05:23:44 EST 2023 x86_64 User : expressoneac ( 1128) PHP Version : 8.0.30 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/expressoneac/www/wp-content/themes/woodmart/inc/modules/header-builder/ |
Upload File : |
<?php if ( ! defined('WOODMART_THEME_DIR')) exit('No direct script access allowed'); /** * ------------------------------------------------------------------------------------------------ * Wrapper for our header class instance. CRUD actions * ------------------------------------------------------------------------------------------------ */ if( ! class_exists( 'WOODMART_HB_HeaderFactory' ) ) { class WOODMART_HB_HeaderFactory { private $_elements = null; private $_list = null; public function __construct( $elements, $list ) { $this->_elements = $elements; $this->_list = $list; } public function get_header( $id ) { return new WOODMART_HB_Header( $this->_elements, $id ); } public function update_header( $id, $name, $structure, $settings ) { $header = new WOODMART_HB_Header( $this->_elements, $id ); $header->set_name( $name ); $header->set_structure( $structure ); $header->set_settings( $settings ); $header->save(); return $header; } public function create_new( $id, $name, $structure = false, $settings = false ) { $header = new WOODMART_HB_Header( $this->_elements, $id, true ); if( $structure ) { $header->set_structure( $structure ); } if( $settings ) $header->set_settings( $settings ); $header->set_name( $name ); $header->save(); return $header; } } }