403Webshell
Server IP : 167.99.224.18  /  Your IP : 216.73.216.136
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux wordpress-ubuntu-s-1vcpu-1gb-nyc1-01 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.0.25
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/wp-content/plugins-old/simple-lightbox/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins-old/simple-lightbox/includes/class.component.php
<?php

/**
 * Component
 * @package Simple Lightbox
 * @subpackage Base
 * @author Archetyped
 */
class SLB_Component extends SLB_Base_Object {
	/* Properties */

	/**
	 * Pretty name
	 * @var string
	 */
	protected $name = '';

	protected $props_required = array();

	private $props_required_base = array( 'id' );

	/* Get/Set */

	/**
	 * Set name
	 * @param string $name Name
	 * @return Current instance
	 */
	public function set_name( $name ) {
		if ( is_string( $name ) ) {
			$name = trim( $name );
			if ( ! empty( $name ) ) {
				$this->name = $name;
			}
		}
		return $this;
	}

	public function get_name() {
		return $this->name;
	}

	public function set_scripts( $scripts ) {
		$this->add_files( 'scripts', $scripts );
	}

	public function set_styles( $styles ) {
		$this->add_files( 'styles', $styles );
	}

	/* Assets */

	/**
	 * Get formatted handle for file
	 * @param string $base_handle Base handle to format
	 * @return string Formatted handle
	 */
	public function get_handle( $base_handle ) {
		return $this->add_prefix( array( 'asset', $this->get_id(), $base_handle ), '-' );
	}

	/**
	 * Enqueue files in client
	 * @param string $type (optional) Type of file to load (singular) (Default: All client file types)
	 */
	public function enqueue_client_files( $type = null ) {
		if ( empty( $type ) ) {
			$type = array( 'script', 'style' );
		}
		if ( ! is_array( $type ) ) {
			$type = array( $type );
		}
		foreach ( $type as $t ) {
			$m           = (object) array(
				'get'     => $this->m( 'get_' . $t . 's' ),
				'enqueue' => 'wp_enqueue_' . $t,
			);
			$v           = $this->util->get_plugin_version();
			$files       = call_user_func( $m->get );
			$param_final = ( 'script' === $t ) ? true : 'all';
			foreach ( $files as $f ) {
				$f = (object) $f;
				// Format handle
				$handle = $this->get_handle( $f->handle );

				// Format dependencies
				$deps = array();
				foreach ( $f->deps as $dep ) {
					if ( $this->util->has_wrapper( $dep ) ) {
						$dep = $this->get_handle( $this->util->remove_wrapper( $dep ) );
					}
					$deps[] = $dep;
				}
				call_user_func( $m->enqueue, $handle, $f->uri, $deps, $v, $param_final );
			}
			unset( $files, $f, $param_final, $handle, $deps, $dep );
		}
	}

	/**
	 * Enqueue scripts
	 */
	public function enqueue_scripts() {
		$this->enqueue_client_files( 'script' );
	}

	/**
	 * Enqueue styles
	 */
	public function enqueue_styles() {
		$this->enqueue_client_files( 'style' );
	}

	/* Helpers */

	/**
	 * Validate instance
	 * @see `Base_Object::is_valid()`
	 * @return bool Valid (TRUE) / Invalid (FALSE)
	 */
	public function is_valid() {
		$ret = parent::is_valid();
		if ( $ret ) {
			// Check required component properties
			$props = array_merge( $this->props_required_base, $this->props_required );
			foreach ( $props as $prop ) {
				if ( ! isset( $this->{$prop} ) || empty( $this->{$prop} ) ) {
					$ret = false;
					break;
				}
			}
		}
		return $ret;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit