[resolved] Check a given post? (2 posts)

  1. Martin
    Posted 2 years ago #

    On v1.30 there's an addition:
    Added: badgeos_is_achievement() to check if a given $post or $post_id is a BadgeOS achievement.

    What exactly does this mean and how is it used?


  2. Michael Beckwith
    Posted 2 years ago #

    without actually looking at the code, I imagine it's just a validation helper to make sure the post/ID that is passed in has a post type of one of your registered achievement types.

    Remember all the achievement types are custom post types. It'd return false if you still had the "sample page" page in your install, which defaults to ID 2. Pass that in, it'd return false.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BadgeOS
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.