• Jay Fraser

    (@loststudios)


    I love your plugin!!!

    I make mostly advanced web applications and PWAs using WordPress (often times where wp-admin is decoupled from the the theme layer). I move the “website owner admin” stuff onto the frontend. And then use wp-admin almost exclusively as a development environment.

    I’m wondering if you are intending to expand your settings for WP Admin Cache to custom wp-admin pages. For people that build stuff with lots of CPTS, Post Relationships, Custom Tax, Custom Fields, etc… along with a lot of performance engineering – all from wp-admin, it would be nice to have the option to cache more than just the default pages you have in your settings panel.

    Do you have any type of roadmap? Or perhaps could you share ideas you may have moving forward for this sweet little plugin?

    Thanks again!

    • This topic was modified 5 years ago by Jay Fraser.
Viewing 5 replies - 1 through 5 (of 5 total)
  • I would love if this worked on custom pages

    • This reply was modified 4 years, 11 months ago by rojokuze.

    Same!

    In the index.php file there is a getPageHooks function. At the end they array_pop($a, ‘widget.php’); to add widget.php to the pre-fetch.

    I added another array_pop($a, ‘post.php’); to pre-fetch while on page/post edit. This worked for me. It adds it to the options and I can select it. It would be nice to have it in the interface but hacking their code works.

    
        function getPageHooks() {
            global $admin_page_hooks;
            $a = array();
            foreach ($admin_page_hooks as $key => $value) {
                if (strpos($key, '.php') !== false && strpos($key, '/') === false) array_push($a, $key);
            }
            $args = array('show_in_menu' => true);
            foreach (get_post_types($args) as $type) {
                if ($type != 'attachment') {
                    $url = 'edit.php?post_type=' . $type;
                    if (!in_array($url, $a)) array_push($a, $url);
                }
            }
            array_push($a, 'widgets.php');
            array_push($a, 'post.php');
            sort($a);
            return $a;
        }
    

    Thank you very much for this.

    @tomhung

    Would you mind uploading the modified file so i can overwrite the one installed in the plugin? Greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Extending WP Admin Cache’ is closed to new replies.