itthinx / groups

Groups provides group-based user membership management, group-based capabilities and content access control. It integrates standard WordPress capabilities and application-specific capabilities along with an extensive API.
GNU General Public License v3.0
49 stars 35 forks source link

Don't run checks on AJAX calls #74

Closed WarrenMoore closed 7 years ago

WarrenMoore commented 7 years ago

Fixes #73

WarrenMoore commented 7 years ago

@c2t-webmaster what are you calling? The issue I was experiencing specifically revolved around making AJAX requests to wp-admin/admin-ajax.php - you're doing the same thing?

c2t-webmaster commented 7 years ago

Problem occurs when going to WordPress pages where the nested pages plugin https://wordpress.org/plugins/wp-nested-pages/ is installled.

proaktion commented 7 years ago

@WarrenMoore Thanks for the suggested fix, unfortunately it won’t help as the issue will persist because the code misses to treat a post_type that comes in as an array correctly. Instead of checking whether this is DOING_AJAX, we'll need to have it treat the array correctly (it assumes what comes in as post_type is always a string).