Viewing 1 replies (of 1 total)
  • Plugin Author Jason Lau

    (@jason-lau)

    You can find a complete list of short codes by clicking on the contextual help tab (User Meta Manager Help & Settings) in the upper-right corner of the plugin’s main screen.

    Here is an excerpt –

    Restrict access based on multiple meta keys and values:

    [useraccess json='{“access_level”:”gold”,”sub_level”:”silver”}’ message=”You need permission to view this content.”]Restricted content.[/useraccess]

    The json attribute is used to define a list of meta keys and values. The list must be JSON encoded, as seen in the example above. Users with matching meta keys and values will be granted access to restricted content.

    JSON formatting –

    {“meta_key”:”meta_value”, “meta_key”:”meta_value”, “meta_key”:”meta_value”}

    Additionally, you could repeat the same meta key multiple times.

    json='{“access_level”:”gold”, “sub_level”:”silver”, “sub_level”:”bronze”, “sub_level”:”aluminum-foil”}’

    Let me know if you have any problems using it.

Viewing 1 replies (of 1 total)
  • The topic ‘Restrict based on multiple meta keys’ is closed to new replies.