wpsharks / s2member

s2Member® Framework (membership management for WordPress®).
64 stars 36 forks source link

`wp_list_pages()` only applies during query filter itself. #372

Closed jaswrks closed 9 years ago

jaswrks commented 9 years ago

Recent tests show room for improvement when it comes to s2Member's query filtes and wp_list_pages(). I had to force the filter to get this working properly in all scenarios.

add_filter('wp_list_pages_excludes', 'c_ws_plugin__s2member_querys::_query_level_access_list_pages', 100);
wp_list_pages();

s2Member is supposed to set this automatically, and it does for the most part; but it would appear in a test just a moment ago that there may exist a bug related to the initial query; where it's possible that this filter may NOT be applied at all times. Forcing the filter before your call to wp_list_pages() should do the trick though; as a short-term solution.

jaswrks commented 9 years ago

Referencing this line of code. It looks like this needs to be bumped up higher; i.e. before the other conditionals there. Or, perhaps we need to include pages in those other conditions that wrap this block as it exists now.

jaswrks commented 9 years ago

After testing the above code, a user writes...

see: https://websharks.zendesk.com/agent/tickets/4063

jaswrks commented 9 years ago

Next Release Changelog:

jaswrks commented 9 years ago

Work from this issue went out with the release of s2Member v150102. http://www.s2member.com/changelog/#s2-changes-v150102

jeremygradisher commented 9 years ago

Jason - I have an issue - not sure if it had to do with this update (there's been one more since then) But I have a multi-site situation - utilizing Alternative View Protection - all of a sudden the links within the menu are showing - Before my updates those links would have been hidden as I have checked the options (all) Registration > Alternative View Protection > Filter All/protecting all alternative views - I can't figure it out. Nothing else has changed.

jaswrks commented 9 years ago

@jeremygradisher Thanks for the report. We are tracking progress on that issue here. Please see: https://github.com/websharks/s2member/issues/475