403Webshell
Server IP : 104.26.2.156  /  Your IP : 216.73.216.185
Web Server : nginx/1.27.1
System : Linux us-1 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User : vinodai ( 3134)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /storage/v1396/woofsite3/public_html/wp-content/themes/flatsome/inc/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /storage/v1396/woofsite3/public_html/wp-content/themes/flatsome/inc/classes/class-flatsome-icon.php
<?php
/**
 * Icon handling.
 *
 * @package Flatsome
 */

defined( 'ABSPATH' ) || exit;

/**
 * Class Flatsome_Icon
 */
final class Flatsome_Icon {

	/**
	 * Get a payment icon using get_template_part.
	 *
	 * @param string $icon_name The name of the payment icon.
	 * @param array  $args      Optional arguments for the icon.
	 *
	 * @return string The payment icon HTML.
	 */
	public static function get_payment_icon( $icon_name, $args = [] ) {
		$defaults = [
			'attributes' => [
				'aria-hidden' => 'true',
			],
		];

		$args = wp_parse_args( $args, $defaults );

		ob_start();
		get_template_part( 'assets/img/payment-icons/icon', $icon_name . '.svg' );
		$svg = ob_get_clean();

		if ( empty( $svg ) ) {
			return '';
		}

		$p = new WP_HTML_Tag_Processor( $svg );

		if ( $p->next_tag( 'svg' ) && ! empty( $args['attributes'] ) ) {
			foreach ( $args['attributes'] as $attribute => $value ) {
				if ( $attribute === 'class' ) {
					$existing_class = $p->get_attribute( 'class' );
					$classes        = ! empty( $existing_class )
						? $existing_class . ' ' . $value
						: $value;
					$p->set_attribute( 'class', $classes );
				} else {
					$p->set_attribute( $attribute, $value );
				}
			}
		}

		return $p->get_updated_html();
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit