Can I spit out the same JSON without a Web query? (4 posts)

  1. johngorenfeld
    Posted 3 years ago #

    Apologies if this has been asked before but:

    Since this software is modular, I have been trying to figure out how to make a request for JSON from within the WordPress PHP and not through a RESTful Web call.

    To figure this out, I have started exploring the way the Singletons are set up, but I'm still a bit confused.

    Does anyone know a good way to say, "Hey, plugin, can you please show all 200 Custom Posts of a certain type, in JSON format...but to return it as a $result I can use inside WordPress?"

    So basically I'm trying to figure out a way to intercept the JSON. Any help much appreciated.


  2. chris_mcclellan
    Posted 3 years ago #

    Any luck? I would love to bootstrap my wordpress theme without doing a separate request after the dom is ready.

  3. chris_mcclellan
    Posted 3 years ago #

    These lead me to believe it may be more difficult that one would hope.

    add_action('template_redirect', array(&$this, 'template_redirect'));
        add_action('admin_menu', array(&$this, 'admin_menu'));
        add_action('update_option_json_api_base', array(&$this, 'flush_rewrite_rules'));
        add_action('pre_update_option_json_api_controllers', array(&$this, 'update_controllers'));
  4. chris_mcclellan
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic