rwmb_get_object_fields() not respecting advanced location rules

Support MB Blocks rwmb_get_object_fields() not respecting advanced location rules

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #45667
    Ryan LeeRyan Lee
    Participant

    I have set the advanced location rule as such:

    https://ibb.co/30CC3vt

    It works correctly and conditionally, in the meta box area of that specific post. All good.

    BUT, when I try to retrieve the fields object using rwmb_get_object_fields()

    It does not respect the advanced location rule anymore, it returns all the fields related to "the post type" not the individual post anymore.

    #45669
    PeterPeter
    Moderator

    Hello Ryan,

    The function rwmb_get_object_fields() gets the list of custom fields for a specific object. So I think it works correctly. Please read more about this function in the documentation
    https://docs.metabox.io/functions/rwmb-get-object-fields/

    If you want to get the field group (meta box) settings, please try to use the function rwmb_get_registry()
    https://docs.metabox.io/functions/rwmb-get-registry/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.