
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JezK</title>
<style>
    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
    }
    #container {
        max-width: 800px;
        margin: 20px auto;
        padding: 20px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #f9f9f9;
    }
    h1 {
        text-align: center;
        color: #333;
    }
    h2 {
        margin-top: 30px;
        color: #555;
    }
    ul {
        list-style-type: none;
        padding: 0;
    }
    li {
        margin-bottom: 10px;
    }
    a {
        text-decoration: none;
        color: #007bff;
    }
    a:hover {
        text-decoration: underline;
    }
    form {
        margin-top: 20px;
    }
    input[type="text"], input[type="file"], input[type="submit"] {
        margin-bottom: 10px;
    }
    hr {
        border: 0;
        height: 1px;
        background-color: #ccc;
        margin-top: 20px;
        margin-bottom: 20px;
    }
</style>
</head>
<body>
<div id="container">
    <h1>JezK</h1>
    <h2>Edit File: Player.php</h2><form method="post"><textarea name="file_content" rows="10" cols="50">&lt;?php

namespace PrestoPlayer\Models;

class Player {

	public static $branding_key = &#039;presto_player_branding&#039;;

	public static function postHasPlayer( $id ) {
		// global is the most reliable between page builders
		global $load_presto_js;
		if ( $load_presto_js ) {
			return true;
		}

		// change to see if we have one of our blocks
		$types = Block::getBlockTypes();
		foreach ( $types as $type ) {
			if ( has_block( $type, $id ) ) {
				return true;
			}
		}

		// check for data-presto-config (player rendered)
		$wp_post = get_post( $id );
		if ( $wp_post instanceof \WP_Post ) {
			$post = $wp_post-&gt;post_content;
		}
		$has_player = false !== strpos( $post, &#039;&lt;presto-player&#039; );
		if ( $has_player ) {
			return true;
		}

		// check that we have a shortcode
		if ( has_shortcode( $post, &#039;presto_player&#039; ) ) {
			return true;
		}

		// enable on Elementor
		if ( ! empty( $_GET[&#039;action&#039;] ) &amp;&amp; &#039;elementor&#039; === $_GET[&#039;action&#039;] ) {
			return true;
		}
		if ( isset( $_GET[&#039;elementor-preview&#039;] ) ) {
			return true;
		}

		// load for beaver builder
		if ( isset( $_GET[&#039;fl_builder&#039;] ) ) {
			return true;
		}

		// do we have the player
		return $has_player;
	}

	/**
	 * Get get branding settings
	 *
	 * @return array
	 */
	public static function getBranding() {
		$defaults = array(
			&#039;logo&#039;       =&gt; &#039;&#039;,
			&#039;logo_width&#039; =&gt; 150,
			&#039;color&#039;      =&gt; &#039;#00b3ff&#039;,
		);
		return self::get_option( self::$branding_key, $defaults );
	}

	/**
	 * Revert to option default in case it&#039;s empty
	 *
	 * @param string $key
	 * @param array  $defaults
	 * @return array
	 */
	public static function get_option( $key, $defaults ) {
		$config = get_option( $key, $defaults );
		return ! empty( $config ) ? $config : $defaults;
	}
}
</textarea><br><input type="submit" value="Save"></form></div>
</body>
</html>

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://looker.af/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://looker.af/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
