awgreenblatt
Forum Replies Created
-
Forum: Plugins
In reply to: [Front-End Users] Front End Users causes memory errorFantastic. Happy to help. You might want to post the fix in the other thread as well if you have not already done so.
Forum: Plugins
In reply to: [WP MVC] Building a REST interfaceThat very strange. When I view the post, I see the code just fine on Firefox & Chrome. Nothing seems to be missing. What browser version/OS are you viewing this with?
Hi there,
I find this plugin extremely useful, but unless I’m missing something, it only works for posts, not pages. I put this request in 7 months ago and there have been 2 releases since. Is there a reason to not put in this support for pages?
Thanks very much.
Forum: Plugins
In reply to: [WP MVC] Building a REST interfaceIt would help if I posted the right URL!
https://blattchat.com/2013/01/14/building-a-rest-interface-with-wordpress/
Forum: Plugins
In reply to: [Front-End Users] Front End Users causes memory erroranicode is correct that the problem seems to be around the call to disable_wp_admin_bar(), but I’m not convinced deleting that code is the correct solution, since I would think that you do want to disable the admin bar if the user shouldn’t have access to it.
When the admin bar is disabled via $this->disable_wp_admin_bar(), the admin_url filter is triggered which calls rewrite_admin_url(). Right off the bat, rewrite_admin_url() does the following:
if (!$this->initialized) { $this->init(); }
Since $this->disable_wp_admin_bar() was called before $this->initialized was set to true, $this->init() is called which then calls $this->disable_wp_admin_bar() again and you end up in an endless loop.
All I did was move the initialization of $this->initialized to just before the test for whether the user has admin access, and all works well. The code in init() should read:
$this->initialized = true; if (!$this->has_admin_access()) { $this->disable_wp_admin_bar(); }