403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.195
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/rhodeworks/wp-content/plugins/nextgen-gallery/src/Display/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/rhodeworks/wp-content/plugins/nextgen-gallery/src/Display/StaticAssets.php
<?php

namespace Imagely\NGG\Display;

class StaticAssets {

	public static $default_plugin_root    = NGG_PLUGIN_DIR;
	public static $new_override_path_name = 'nextgen-gallery-static-overrides';

	/**
	 * @param string       $filename
	 * @param false|string $legacy_module_id
	 * @return string
	 */
	public static function get_url( $filename, $legacy_module_id = false ) {
		$retval = self::get_abspath( $filename, $legacy_module_id );

		// Allow for overrides from WP_CONTENT/ngg/.
		if ( \strpos( $retval, \path_join( WP_CONTENT_DIR, 'ngg' ) ) !== false ) {
			$retval = \str_replace( \wp_normalize_path( WP_CONTENT_DIR ), WP_CONTENT_URL, $retval );
		}

		// Normal plugin distributed files.
		$retval = \str_replace( \wp_normalize_path( WP_PLUGIN_DIR ), WP_PLUGIN_URL, $retval );

		return \is_ssl() ? \str_replace( 'http:', 'https:', $retval ) : $retval;
	}

	/**
	 * @param string       $filename
	 * @param false|string $legacy_module_id
	 * @return string
	 */
	public static function get_abspath( $filename, $legacy_module_id = false ) {
		static $cache = [];

		$key = $filename . (string) $legacy_module_id;

		if ( ! isset( $cache[ $key ] ) ) {
			$cache[ $key ] = static::get_computed_abspath( $filename, $legacy_module_id );
		}

		return $cache[ $key ];
	}

	/**
	 * @param string       $filename
	 * @param false|string $legacy_module_id
	 * @return string
	 */
	public static function get_computed_abspath( $filename, $legacy_module_id = false ) {
		$files = [
			'new_paths' => \path_join( WP_CONTENT_DIR, static::$new_override_path_name . DIRECTORY_SEPARATOR . $filename ),
			'default'   => \path_join( static::$default_plugin_root, 'static' . DIRECTORY_SEPARATOR . $filename ),
		];

		if ( ! empty( $legacy_module_id ) ) {
			$files['legacy'] = StaticPopeAssets::get_computed_abspath( $filename, $legacy_module_id );
		}

		$retval = '';

		foreach ( $files as $label => $filename ) {
			if ( @\stream_resolve_include_path( $filename ) ) {
				$retval = $filename;
				break;
			}
		}

		if ( is_string( $retval ) ) {
			// Adjust for windows paths.
			return \wp_normalize_path( $retval );
		} else {
			return $retval;
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit