Skip to content

[Resolved] Weird functionality with get_categories

Home Forums Developer Support Weird functionality with get_categories

This topic contains 1 reply, has 2 voices, and was last updated by 3 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #20966 Reply


    I noticed a weird functionality with Press PermitĀ 2.2.1 and a category query. I had enabled the ‘Modify permissions for these Taxonomies:’ -setting for categories on a production site. There were no custom settings for any of the categories, but it turned out that get_categories -function with the parameter ‘child_of’ and a category id returned different results for logged in users and non-logged in users. As I took a dive to the WordPress core I noticed that get_terms function did not work recursively f0r non-logged users and therefore all the subcategories were missing from the listing.

    Could you please enlighten this matter and describe how to prevent this from happening in the future?

    Thanks in advance!

    #20968 Reply

    [ login required ]

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Registered members have full access to Pro support forums here.

Feel free to log in or purchase a support key.