| Server IP : 14.225.204.176 / Your IP : 216.73.216.252 Web Server : nginx/1.24.0 System : Linux nodejs-ybgk 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64 User : root ( 0) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/php/langngon.com/wp-content/themes/langngon/class/ |
Upload File : |
<?php
/**
* Custom footer for the theme.
*
* @copyright ZiniMedia 2016
* @version Release: 1.0
* @package penguinmag\class
* @author ZiniMedia-BM
*/
if(!class_exists('ZiniFooter')){
class ZiniFooter{
private $logo = null;
private $slogan = null;
private $address_street = null;
private $address_locality = null;
private $address_region = null;
private $telephone = null;
private $fax = null;
private $email = null;
private $website = null;
private $footerBackground = null;
private $footerWidget = null;
private $footerLayout = null;
private $copyrightsText = null;
private $showNavigationMenu = null;
function __construct(){
$this->logo = get_field('zini_footer_logo', 'option');
$this->slogan = get_field('zini_footer_slogan', 'option');
$this->address_street = get_field('zini_footer_address_street', 'option');
$this->address_locality = get_field('zini_footer_address_locality', 'option');
$this->address_region = get_field('zini_footer_address_region', 'option');
$this->telephone = get_field('zini_footer_phone', 'option');
$this->fax = get_field('zini_footer_fax', 'option');
$this->email = get_field('zini_footer_email', 'option');
$this->website = get_field('zini_footer_website', 'option');
$this->footerBackground = get_field('zini_footer_background', 'option');
$this->footerWidget = get_field('zini_footer_widget', 'option');
$this->footerLayout = get_field('zini_footer_layout', 'option');
$this->copyrightsText = get_field('zini_footer_copyrights_text', 'option');
$this->showNavigationMenu = get_field('zini_footer_show_navigation_menu', 'option');
}
function __destruct(){}
/**
* Get value for logo.
* @return string
*/
public function getLogo(){
if ($this->logo) {
return $this->logo;
}
}
/**
* Set value for logo
* @param $logo
*/
public function setLogo($logo){
$this->logo = $logo;
}
/**
* Get value for slogan.
* @return string
*/
public function getSlogan(){
$locale = get_locale();
if ($this->slogan && ($locale == 'vi')) {
return $this->slogan;
}else{
if ( get_field('zini_footer_slogan_en','option') ) {
return get_field('zini_footer_slogan_en','option');
}
}
return "";
}
/**
* Set value for slogan
* @param $slogan
*/
public function setSlogan($slogan){
$this->slogan = $slogan;
}
/**
* Get value for address_street.
* @return string
*/
public function getAddressStreet(){
$locale = get_locale();
if ($this->address_street && ($locale == 'vi')) {
return $this->address_street;
}else{
if ( get_field('zini_footer_address_street_en','option') ) {
return get_field('zini_footer_address_street_en','option');
}
}
return "";
}
/**
* Set value for address_street
* @param $address_street
*/
public function setAddressStreet($address_street){
$this->address_street = $address_street;
}
/**
* Get value for address_locality.
* @return string
*/
public function getAddressLocality(){
$locale = get_locale();
if ($this->address_locality && ($locale == 'vi')) {
return $this->address_locality;
}else{
if ( get_field('zini_footer_address_locality_en','option') ) {
return get_field('zini_footer_address_locality_en','option');
}
}
return "";
}
/**
* Set value for address_locality
* @param $address_locality
*/
public function setAddressLocality($address_locality){
$this->address_locality = $address_locality;
}
/**
* Get value for address_region.
* @return string
*/
public function getAddressRegion(){
$locale = get_locale();
if ($this->address_region && ($locale == 'vi')) {
return $this->address_region;
}else{
if ( get_field('zini_footer_address_region_en','option') ) {
return get_field('zini_footer_address_region_en','option');
}
}
return "";
}
/**
* Set value for address_region
* @param $address_region
*/
public function setAddressRegion($address_region){
$this->address_region = $address_region;
}
/**
* Get value for telephone.
* @return string
*/
public function getTelephone(){
if ($this->telephone) {
return $this->telephone;
}
return "";
}
/**
* Set value for telephone
* @param $telephone
*/
public function setTelephone($telephone){
$this->telephone = $telephone;
}
/**
* Get value for fax.
* @return string
*/
public function getFax(){
if ($this->fax) {
return $this->fax;
}
return "";
}
/**
* Set value for fax
* @param $fax
*/
public function setFax($fax){
$this->fax = $fax;
}
/**
* Get value for email.
* @return string
*/
public function getEmail(){
if ($this->email) {
return $this->email;
}
return "";
}
/**
* Set value for email
* @param $email
*/
public function setEmail($email){
$this->email = $email;
}
/**
* Get value for website.
* @return string
*/
public function getWebsite(){
if ($this->website) {
return $this->website;
}
return "";
}
/**
* Set value for website
* @param $website
*/
public function setWebsite($website){
$this->website = $website;
}
/**
* Get value color footer background.
* @return string
*/
public function getFooterBackground(){
if ($this->footerBackground)
return $this->footerBackground;
return "#fff";
}
/**
* Set value for footer background.
* @param $footerBackground
*/
public function setFooterBackground($footerBackground){
$this->footerBackground = $footerBackground;
}
/**
* Check enable footer widget.
* @return boolen
*/
public function getFooterWidget(){
if ($this->footerWidget == "On") {
return true;
}
return false;
}
/**
* Set value for footer widget
* @param $footerWidget
*/
public function setFooterWidget($footerWidget){
$this->footerWidget = $footerWidget;
}
/**
* Get value footer layout.
* @return int
*/
public function getFooterLayout(){
switch ($this->footerLayout) {
case 1:
// echo "Layout have 1 widget";
return 1;
break;
case 2:
// echo "Layout have 2 widget";
return 2;
break;
case 3:
// echo "Layout have 3 widget";
return 3;
break;
case 4:
// echo "Layout have 4 widget";
return 4;
break;
case 5:
// echo "Layout have 5 widget";
return 5;
break;
default:
break;
}
}
/**
* Set value for footer layout
* @param $footerLayout
*/
public function setFooterLayout($footerLayout){
$this->footerLayout = $footerLayout;
}
/**
* Get value copyrights text.
* @return string
*/
public function getCopyrightsText(){
if ($this->copyrightsText) {
return strip_tags($this->copyrightsText);
}
return "";
}
/**
* Set value for copyrights text
* @param $copyrightsText
*/
public function setCopyrightsText($copyrightsText){
$this->copyrightsText = $copyrightsText;
}
/**
* Check enable show navigation menu.
* @return boolen
*/
public function getShowNavigationMenu(){
if ($this->showNavigationMenu == "On") {
return true;
}
return false;
}
/**
* Set value for show navigation manu
* @param $showNavigationMenu
*/
public function setShowNavigationMenu($showNavigationMenu){
$this->showNavigationMenu = $showNavigationMenu;
}
}
}
$ziniFooter = new ZiniFooter();
?>