- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 170.150.155.74  /  Your IP : 3.128.201.196
Web Server : Apache/2.4.53 (Debian)
System : Linux b22bf132354b 5.4.0-162-generic #179-Ubuntu SMP Mon Aug 14 08:51:31 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.4.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/html/wp-content/themes/neve/inc/compatibility/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/themes/neve/inc/compatibility/header_footer_beaver.php
<?php
/**
 * Compatibility with Header Footer for Beaver Builder plugin.
 *
 * @package Neve\Compatibility
 */

namespace Neve\Compatibility;

/**
 * Class Header_Footer_Beaver
 *
 * @package Neve\Compatibility
 */
class Header_Footer_Beaver {


	/**
	 * Init function.
	 */
	public function init() {
		if ( ! $this->should_load() ) {
			return false;
		}
		$this->add_theme_builder_hooks();
	}

	/**
	 * Check if plugin is installed.
	 */
	private function should_load() {
		if ( ! defined( 'FL_BUILDER_VERSION' ) ) {
			return false;
		}
		if ( ! class_exists( '\BB_Header_Footer', false ) ) {
			return false;
		}

		return true;
	}

	/**
	 * Replace theme hooks with the one from the plugin.
	 */
	private function add_theme_builder_hooks() {
		add_action( 'neve_do_header', array( $this, 'do_header' ), 0 );
		add_action( 'neve_do_footer', array( $this, 'do_footer' ), 0 );
	}

	/**
	 * Replace Header hooks.
	 */
	public function do_header() {
		$header_id = \BB_Header_Footer::get_settings( 'bb_header_id', '' );
		if ( empty( $header_id ) ) {
			return false;
		}
		remove_all_actions( 'neve_do_top_bar' );
		remove_all_actions( 'neve_do_header' );

		echo '<header id="nv-beaver-header">';
		\BB_Header_Footer::get_header_content();
		echo '</header>';

		return true;
	}

	/**
	 * Replace Footer hooks.
	 */
	public function do_footer() {
		$footer_id = \BB_Header_Footer::get_settings( 'bb_footer_id', '' );
		if ( empty( $footer_id ) ) {
			return false;
		}
		remove_all_actions( 'neve_do_footer' );
		echo '<footer id="nv-beaver-footer">';
		\BB_Header_Footer::get_footer_content();
		echo '</footer>';

		return true;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit