HEX
Server: LiteSpeed
System: Linux 111n6.sieutocviet.page 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
User: nhathuocat (1048)
PHP: 7.4.30
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/nhathuocat/public_html/wp-content/plugins/fixed-toc/frontend/html/class-element-container.php
<?php

/**
 * Container element
 *
 * @since 3.0.0
 * @see Fixedtoc_Element
 */
class Fixedtoc_Element_Container extends Fixedtoc_Element {

	/**
	 * Data of TOC.
	 *
	 * @since 3.0.0
	 * @access protected
	 * @var array
	 */
	protected $data;

	/**
	 * Constructor.
	 *
	 * @since 3.0.0
	 * @access public
	 *
	 * @param array $data Data of TOC
	 */
	public function __construct( $data ) {
		$this->data = $data;
		parent::__construct();
	}

	/**
	 * Set the tag name.
	 *
	 * @since 3.0.0
	 * @see Fixedtoc_Element
	 *
	 * @return void
	 */
	protected function set_tagname() {
		$this->tagname = 'div';
	}

	/**
	 * Set the attributes array.
	 *
	 * @since 3.0.0
	 * @see Fixedtoc_Element
	 *
	 * @return void
	 */
	protected function set_attrs() {
		$this->attrs = array(
			'id'    => 'ftwp-container',
			'class' => $this->get_cls()
		);
	}

	/**
	 * Get the class property value.
	 *
	 * @since 3.0.0
	 * @access private
	 *
	 * @return string
	 */
	private function get_cls() {
		$class = 'ftwp-wrap';

		// Initial set to hidden state.
		if ( ! fixedtoc_amp_is_request() ) { // Don't add if it is AMP request
			$class .= ' ftwp-hidden-state';
		}

		// Minimize/maximize
		if ( 'hide' == fixedtoc_get_val( 'trigger_initial_visibility' ) ) {
			$class .= ' ftwp-maximize';
		} else {
			$class .= ' ftwp-minimize';
		}

		// Fixed to post
//		if ( ! fixedtoc_is_true( 'in_post' ) && ! fixedtoc_is_true( 'in_widget' ) ) {
//			$class .= ' ftwp-fixed-to-post';
//		}

		// Fixed Position
		$class .= ' ftwp-' . fixedtoc_get_val( 'location_fixed_position' );

		// Minimize/Maximize effect
//		$class .= ' ftwp-animate-' . Fixedtoc_get_val( 'effects_in_out' );

		return $class;
	}

	/**
	 * Set the Content inner tags.
	 *
	 * @since 3.0.0
	 * @see Fixedtoc_Element
	 *
	 * @return void
	 */
	protected function set_content() {
		// Trigger
		if ( ! fixedtoc_amp_is_request() ) {
			require_once 'class-element-trigger.php';
			$obj_trigger   = new Fixedtoc_Dom( new Fixedtoc_Element_Trigger() );
			$this->content = $obj_trigger->get_html();
		}

		// Contents
		require_once 'class-element-contents.php';
		$obj_contents  = new Fixedtoc_Dom( new Fixedtoc_Element_Contents( $this->data ) );
		$this->content .= $obj_contents->get_html();
	}

}