HEX
Server: LiteSpeed
System: Linux eko108.isimtescil.net 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: uyarreklamcomtr (11202)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/lottie-player.tar
assets/banner.svg000064400000001453151540164550010045 0ustar00<svg enable-background="new 0 0 120 120" viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h120v120h-120z" fill="#1880b6"/><g stroke="#324249" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m40.3 33.6h42.1v52.6h-42.1z" fill="#8cdaf0"/><path d="m40.3 33.6v52.6" fill="none"/><path d="m29.8 83.6v-47.4c0-1.5 1.2-2.6 2.6-2.6h7.9v52.6h-7.9c-1.5 0-2.6-1.2-2.6-2.6z" fill="#f0eed5"/><path d="m40.3 75.7h-10.5m10.5-10.5h-10.5m10.5-10.6h-10.5m10.5-10.5h-10.5" fill="none"/><path d="m82.4 86.2v-52.6h7.9c1.5 0 2.6 1.2 2.6 2.6v47.3c0 1.5-1.2 2.6-2.6 2.6h-7.9z" fill="#f0eed5"/><g fill="none"><path d="m92.9 75.7h-10.5m10.5-10.5h-10.5m10.5-10.6h-10.5m10.5-10.5h-10.5"/><path d="m60.4 48.1c0 9.3-1.9 17.9-3.7 20-2.5 2.8-6.7-2.2-4.2-4.2 4.2-3.3 9.3 6.5 19.1 6.5"/></g></g></svg>assets/icon.svg000064400000002372151540164560007532 0ustar00<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m20.1709 3.88525h-16.3418c-.96484 0-1.75.78516-1.75 1.75v12.72998c0 .96484.78516 1.75 1.75 1.75h16.3418c.96484 0 1.75-.78516 1.75-1.75v-12.72998c0-.96484-.78516-1.75-1.75-1.75zm.25 10.98194h-2.09375v-2.12598h2.09375zm0-3.62598h-2.09375v-2.12549h2.09375zm0-5.60596v1.98047h-2.09375v-2.23047h1.84375c.1377 0 .25.1123.25.25zm-16.8418 3.48047h2.09375v2.12549h-2.09375zm0 3.62549h2.09375v2.12598h-2.09375zm.25-7.35596h1.84375v2.23047h-2.09375v-1.98047c0-.1377.1123-.25.25-.25zm-.25 12.97998v-1.99805h2.09375v2.24805h-1.84375c-.1377 0-.25-.1123-.25-.25zm3.59375.25v-13.22998h9.6543v13.22998zm12.99805 0h-1.84375v-2.24805h2.09375v1.99805c0 .1377-.1123.25-.25.25z"/><path d="m12.3916 8.84766h-1.5c0 1.42822-.16113 2.69971-.35645 3.62891-.52051-.17529-1.05957-.16748-1.5957.25244-.40137.3208-.5752.82471-.46484 1.34814.13379.6377.65527 1.19824 1.26758 1.36133.52539.13965 1.04102-.02051 1.42285-.44824.07227-.08398.1416-.18457.20703-.2998.86035.56641 1.98633 1.21191 3.43652 1.21191v-1.5c-1.17383 0-2.09375-.61426-2.90527-1.16113.32031-1.28613.48828-2.96582.48828-4.39355zm-2.32226 5.10644c-.02246-.01953-.0459-.04395-.06641-.06934.02832.00488.05859.0127.09277.02441-.00879.0166-.01758.03125-.02637.04492z"/></svg>lottie-player.php000064400000006121151540164560010056 0ustar00<?php
/*
Widget Name: Lottie Player
Description: Bring your content to life using interactive Lottie animations with personalized settings and links.
Author: SiteOrigin
Author URI: https://siteorigin.com
Documentation: https://siteorigin.com/widgets-bundle/lottie-player-widget/
*/

class SiteOrigin_Widget_Lottie_Player_Widget extends SiteOrigin_Widget {
	public function __construct() {
		parent::__construct(
			'sow-lottie-player',
			__( 'SiteOrigin Lottie Player', 'so-widgets-bundle' ),
			array(
				'description' => __( 'Bring your content to life using interactive Lottie animations with personalized settings and links.', 'so-widgets-bundle' ),
				'help' => 'https://siteorigin.com/widgets-bundle/lottie-player-widget/',
			),
			array(),
			false,
			plugin_dir_path( __FILE__ )
		);
	}

	public function initialize() {
		$this->register_frontend_scripts(
			array(
				array(
					'sow-lottie-player',
					plugin_dir_url( SOW_BUNDLE_BASE_FILE ) . 'js/lib/lottie-player' . SOW_BUNDLE_JS_SUFFIX . '.js',
					array(),
					'1.6.1',
				),
			)
		);

		add_filter( 'upload_mimes', array( $this, 'add_json_mime' ) );
	}

	public function add_json_mime( $types ) {
		$types['json'] = 'text/plain';

		return $types;
	}

	public function get_widget_form() {
		$global_settings = $this->get_global_settings();

		return array(
			'file' => array(
				'type' => 'media',
				'label' => __( 'Lottie File', 'so-widgets-bundle' ),
				'library' => 'application',
			),

			'autoplay' => array(
				'type' => 'checkbox',
				'default' => false,
				'label' => __( 'Autoplay', 'so-widgets-bundle' ),
			),

			'controls' => array(
				'type' => 'checkbox',
				'default' => true,
				'label' => __( 'Controls', 'so-widgets-bundle' ),
			),

			'loop' => array(
				'type' => 'checkbox',
				'default' => true,
				'label' => __( 'Loop', 'so-widgets-bundle' ),
			),

			'url' => array(
				'type' => 'link',
				'label' => __( 'Destination URL', 'so-widgets-bundle' ),
			),

			'new_window' => array(
				'type' => 'checkbox',
				'default' => false,
				'label' => __( 'Open in new window', 'so-widgets-bundle' ),
			),
		);
	}

	public function get_template_variables( $instance, $args ) {
		return array(
			'file' => ! empty( $instance['file'] ) ? wp_get_attachment_url( $instance['file'] ) : '',
			'attributes' => array(
				'autoplay' => ! empty( $instance['autoplay'] ),
				'controls' => ! empty( $instance['controls'] ),
				'loop' => ! empty( $instance['loop'] ),
			),
			'url' => ! empty( $instance['url'] ) ? $instance['url'] : '',
			'new_window' => ! empty( $instance['new_window'] ) ? $instance['new_window'] : false,
		);
	}

	public function get_form_teaser() {
		if ( class_exists( 'SiteOrigin_Premium' ) ) {
			return false;
		}

		return array(
			sprintf(
				__( 'Customize and enhance your Lottie Player with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
				'<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/lottie-player" target="_blank" rel="noopener noreferrer">',
				'</a>'
			),
		);
	}
}
siteorigin_widget_register( 'sow-lottie-player', __FILE__, 'SiteOrigin_Widget_Lottie_Player_Widget' );
tpl/default.php000064400000001754151540164560007516 0ustar00<?php
if ( empty( $file ) ) {
	esc_html_e( 'Unable to display Lottie Player.', 'so-widgets-bundle' );

	return;
}
?>

<div class="sow-lottie-player" <?php if ( ! empty( $url ) ) { ?>style="position: relative;"<?php } ?>>
	<?php if ( ! empty( $url ) ) { ?>
		<?php $bottom = ! empty( $attributes['controls'] ) ? '35px' : 0; ?>
		<a
			href="<?php echo sow_esc_url( $url ); ?>"
			style="position: absolute; top: 0; right: 0; left: 0; bottom: <?php echo $bottom; ?>; z-index: 1;"
			<?php echo $new_window ? 'target="_blank" rel="noopener noreferrer"' : ''; ?>
		>
			&nbsp;
		</a>
	<?php } ?>
	<lottie-player
		class="sow-lottie-player"
		<?php
		foreach ( $attributes as $name => $value ) {
			if ( ! empty( $value ) ) {
				if ( $value === true ) {
					echo siteorigin_sanitize_attribute_key( $name ) . ' ';
				} else {
					echo siteorigin_sanitize_attribute_key( $name ) . '="' . esc_attr( $value ) . '" ';
				}
			}
		}
		?>
		src="<?php echo sow_esc_url( $file ); ?>"
	>
	</lottie-player>
</div>