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/style/class-style-contents.php
<?php

/**
 * Style data of Contents
 *
 * @since 3.0.0
 */
class Fixedtoc_Style_Data_Contents extends Fixedtoc_Style_Data {

	/**
	 * Create data
	 *
	 * @since 3.0.0
	 * @access protected
	 */
	protected function create_data() {
		$this->fixed_to_post();

		// In post
		if ( fixedtoc_is_true( 'in_post' ) ) {
			$this->in_post();
		}
	}

	/**
	 * Fixed to post
	 *
	 * @since 3.0.0
	 * @access private
	 */
	private function fixed_to_post() {
//		$font_size = (int) fixedtoc_get_val( 'contents_font_size' );
		$width  = (int) fixedtoc_get_val( 'contents_fixed_width' );
		$height = (int) fixedtoc_get_val( 'contents_fixed_height' );
		$this->add_datum( '#ftwp-container.ftwp-wrap #ftwp-contents', array(
			'width'  => $width ? $width . 'px' : 'auto',
			'height' => $height ? $height . 'px' : 'auto'
//			'font-size' => $font_size . 'px'
		) );
	}

	/**
	 * In post
	 *
	 * @since 3.0.0
	 * @access private
	 */
	private function in_post() {
		$height = (int) fixedtoc_get_val( 'contents_height_in_post' );
		$height = $height && ! fixedtoc_is_true( 'contents_collapse_init' ) ? $height . 'px' : 'auto';
		if ( fixedtoc_amp_is_request() ) {
			$height = 'auto';
		}
		$this->add_datum( '.ftwp-in-post#ftwp-container-outer #ftwp-contents', array(
			'height' => $height
		) );

		$width = (int) fixedtoc_get_val( 'contents_width_in_post' );
		$width = $width ? $width . 'px' : 'auto';
		$side  = fixedtoc_get_val( 'contents_float_in_post' );
		$this->add_datum( ".ftwp-in-post#ftwp-container-outer.ftwp-float-$side #ftwp-contents", array(
			'width' => $width
		) );
	}

}