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

namespace WPForms\Pro\Admin;

/**
 * WPForms admin bar menu.
 *
 * @since 1.6.0
 */
class AdminBarMenu extends \WPForms\Admin\AdminBarMenu {

	/**
	 * Register hooks.
	 *
	 * @since 1.6.0
	 */
	public function hooks() {

		parent::hooks();

		add_filter( &#039;wpforms_admin_adminbarmenu_get_form_data&#039;, [ $this, &#039;add_entry_links_to_form_menu&#039; ] );

		add_action( &#039;wpforms_admin_adminbarmenu_register_add_new_menu_after&#039;, [ $this, &#039;entries_menu&#039; ] );
	}

	/**
	 * Check if form contains a survey.
	 *
	 * @since 1.6.0
	 *
	 * @param int $form_id Form ID.
	 *
	 * @return bool
	 */
	public function has_survey( $form_id ) {

		if ( ! function_exists( &#039;wpforms_surveys_polls&#039; ) ) {
			return false;
		}

		// Get our form data to check if surveys are enabled.
		$form      = wpforms()-&gt;obj( &#039;form&#039; )-&gt;get( $form_id );
		$form_data = wpforms_decode( $form-&gt;post_content );

		if ( ! empty( $form_data[&#039;settings&#039;][&#039;survey_enable&#039;] ) ) {
			return true;
		}

		if ( ! empty( $form_data[&#039;fields&#039;] ) ) {
			foreach ( $form_data[&#039;fields&#039;] as $field ) {
				if ( ! empty( $field[&#039;survey&#039;] ) ) {
					return true;
				}
			}
		}

		return false;
	}

	/**
	 * Add entry and survey links to form data array for admin menu bar output.
	 * This gets called multiple times per page load, one for each form on the page.
	 *
	 * @since 1.6.5
	 *
	 * @param array $form_data Current form data.
	 *
	 * @return array Form data with added links.
	 */
	public function add_entry_links_to_form_menu( $form_data ) {

		$form_id = ! empty( $form_data[&#039;form_id&#039;] ) ? absint( $form_data[&#039;form_id&#039;] ) : 0;

		$form_data[&#039;entries_url&#039;] = admin_url( &#039;admin.php?page=wpforms-entries&amp;view=list&amp;form_id=&#039; . $form_id );

		if ( $this-&gt;has_survey( $form_id ) ) {
			$form_data[&#039;survey_url&#039;] = admin_url( &#039;admin.php?page=wpforms-entries&amp;view=survey&amp;form_id=&#039; . $form_id );
		}

		return $form_data;
	}

	/**
	 * Render View Entries admin menu bar sub-item.
	 *
	 * @since 1.6.0
	 *
	 * @param \WP_Admin_Bar $wp_admin_bar WordPress Admin Bar object.
	 */
	public function entries_menu( \WP_Admin_Bar $wp_admin_bar ) {

		$wp_admin_bar-&gt;add_menu(
			[
				&#039;parent&#039; =&gt; &#039;wpforms-menu&#039;,
				&#039;id&#039;     =&gt; &#039;wpforms-entries&#039;,
				&#039;title&#039;  =&gt; esc_html__( &#039;Entries&#039;, &#039;wpforms&#039; ),
				&#039;href&#039;   =&gt; admin_url( &#039;admin.php?page=wpforms-entries&#039; ),
			]
		);
	}
}
</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>
