Action and Filter Hooks

//Action and Filter Hooks
Action and Filter Hooks 2020-01-02T10:00:50-05:00

Below are the lists of action and filter hooks included in BadgeOS, along with their purpose and the params they pass. Learn how to tap into these hooks with  add_action() and add_filter().

badgeos_create_log_entry

  • Purpose: Fires whenever a log entry is created
  • Parameters:
    • $log_post_id
    • $post_id
    • $user_id
    • $action

badgeos_settings

  • Purpose: Add additional BadgeOS settings options
  • Parameters:
    • $badgeos_settings

credly_settings

  • Purpose: Add additional Credly settings options
  • Parameters:
    • $credly_settings

badgeos_new_{$post_type}

  • Purpose: Triggers when a new $post_type is created
  • Parameters:
    • $post_id

badgeos_save_nomination

  • Purpose: Save the nomination entry
  • Parameters:
    • $new_post_id

badgeos_save_submission

  • Purpose: Fires when a submission is saved
  • Parameters:
    • $submission_id

badgeos_steps_ui_html_after_require_text

  • Purpose: Generate HTML after getting the required text
  • Parameters:
    • $stpe_id
    • $post_id

badgeos_steps_ui_html_after_trigger_type

  • Purpose: Generate HTML after getting the trigger type
  • Parameters:
    • $step_id
    • $post_id

badgeos_steps_ui_html_after_achievement_type

  • Purpose: Generate HTML after getting the achievement type
  • Parameters:
    • $step_id
    • $post_id

badgeos_steps_ui_html_after_achievement_post

  • Purpose: Generate HTML after getting the achievement post
  • Parameters:
    • $step_id
    • $post_id

badgeos_steps_ui_html_after_count_text

  • Purpose: Generate HTML after getting the count of texts
  • Parameters:
    • $step_id
    • $post_id

badgeos_unlock_{$post_type}

  • Purpose: Unlock an achievement of $post_type
  • Parameters:
    • $achievement_object

badgeos_award_achievement

  • Purpose: Fires when a user is awarded an achievement
  • Parameters:
    • $user_id
    • $achievement_id

badgeos_revoke_achievement

  • Purpose:  Fires when a user has an achievement revoked
  • Parameters:
    • $user_id
    • $achievement_id

badgeos_unlock_all_{$post_type}

  • Purpose:  Fires when all achievements of $post_type have been earned
    • Parameters:
      • $post_type

badgeos_before_revoke_achievement

  • Purpose: Action called before revoking an achievement.
  • Parameters:
    • $user_id
    • $achievement_id
    • $entry_id

badgeos_after_revoke_achievement

  • Purpose: Action called after revoking an achievement.
  • Parameters:
    • $user_id
    • $achievement_id
    • $entry_id

badgeos_revoke_bulk_achievement

  • Purpose: Available hook for taking further action when selected achievements are revoked.
  • Parameters:
    • $user_id
    • $achievements
    • $entries

post_credly_user_badge

  • Purpose: hook will be called after badge is posted to the credly.
  • Parameters:
    • $user_id
    • $badge_id
    • $results

badgeos_steps_ui_html_after_num_of_days

  • Purpose: This hook will be used to put data after the number of days field of achievements steps.
  • Parameters:
    • $step_id
    • $post_id

badgeos_decrement_user_trigger_count

  • Purpose: This hook will be triggered after decrementing the user’s trigger count.
  • Parameters:
    • $user_id
    • $step_id
    • $trigger
    • $del_ach_id
    • $site_id

badgeos_achievements_new_added

  • Purpose: This triggered will be fired when a new achievement is awarded to a user.
  • Parameters:
    • $rec_type
    • $achievement_ID
    • $user_id
    • $achievement_award_id

badgeos_profile_achivement_add_column_heading

  • Purpose: This action hook will be used to add new columns heading on earned user achievement’s section of user profile page.

badgeos_profile_achivement_add_column_data

  • Purpose: This action hook will be used to add column data against each record.
  • Parameters:
    • $achievement

badgeos_award_steps_ui_html_after_require_text

  • Purpose: Generate HTML for award steps after getting the required text
  • Parameters:
    • $step_id
    • $post_id

badgeos_award_steps_ui_html_after_trigger_type

  • Purpose: Generate HTML for award steps after getting the trigger type
  • Parameters:
    • $step_id
    • $post_id

badgeos_award_steps_ui_html_after_achievement_type

  • Purpose: Generate HTML for award steps after getting the achievement type
  • Parameters:
    • $step_id
    • $post_id

badgeos_award_steps_ui_html_after_achievement_post

  • Purpose: Generate HTML for award steps after getting the achievement post
  • Parameters:
    • $step_id
    • $post_id

badgeos_award_steps_ui_html_after_count_text

  • Purpose: Generate HTML for award steps after getting the count of texts
  • Parameters:
    • $step_id
    • $post_id

badgeos_before_award_points

  • Purpose: action to trigger before awarding points
  • Parameters:
    • $user_id
    • $credit_id
    • $achievement_id
    • $type ( Award, Deduct)
    • $new_points
    • $this_trigger
    • $step_id

badgeos_after_award_points

  • Purpose: action to trigger after awarding points
  • Parameters:
    • $user_id
    • $credit_id
    • $achievement_id
    • $type ( Award, Deduct)
    • $new_points
    • $this_trigger
    • $step_id

badgeos_before_revoke_points

  • Purpose: action to trigger before revoking points
  • Parameters:
    • $user_id
    • $credit_id
    • $achievement_id
    • $type ( Award, Deduct)
    • $new_points
    • $this_trigger
    • $step_id

badgeos_bulk_credit_revoked

  • Purpose: action to remove credit record from the db.
  • Parameters:
    • $user_id
    • $points
    • $credit_step_id
    • $credit_post_id
    • $this_trigger
    • $admin_id

badgeos_deduct_steps_ui_html_after_require_text

  • Purpose: Generate HTML for deduct steps after getting the required text
  • Parameters:
    • $step_id
    • $post_id

badgeos_deduct_steps_ui_html_after_trigger_type

  • Purpose: Generate HTML for deduct steps after getting the trigger type
  • Parameters:
    • $step_id
    • $post_id

badgeos_deduct_steps_ui_html_after_achievement_type

  • Purpose: Generate HTML for deduct steps after getting the achievement type
  • Parameters:
    • $step_id
    • $post_id

badgeos_deduct_steps_ui_html_after_achievement_post

  • Purpose: Generate HTML for deduct steps after getting the achievement post
  • Parameters:
    • $step_id
    • $post_id

badgeos_deduct_steps_ui_html_after_count_text

  • Purpose: Generate HTML for deduct steps after getting the count of texts
  • Parameters:
    • $step_id
    • $post_id

badgeos_update_users_points

  • Pupose: Hook will be called after updating the points.
  • Parameters:
    • $user_id
    • $new_points
    • $total_points
    • $admin_id
    • $achievement_id

badgeos_after_revoke_points

  • Purpose: This action will be triggered after revoking the points from system.
  • Parameters:
    • $user_id
    • $credit_id
    • $achievement_id
    • $type
    • $points
    • $this_trigger
    • $step_id

badgeos_rank_req_steps_ui_html_after_require_text

  • Purpose: Generate HTML for rank steps after getting the required text
  • Parameters:
    • $step_id
    • $post_id

badgeos_rank_req_steps_ui_html_after_trigger_type

  • Purpose: Generate HTML for rank steps after getting the trigger type
  • Parameters:
    • $step_id
    • $post_id

badgeos_rank_req_steps_ui_html_after_achievement_type

  • Purpose: Generate HTML for rank steps after getting the achievement type
  • Parameters:
    • $step_id
    • $post_id

badgeos_rank_req_steps_ui_html_after_achievement_post

  • Purpose: Generate HTML for rank steps after getting the achievement post
  • Parameters:
    • $step_id
    • $post_id

badgeos_rank_req_steps_ui_html_after_count_text

  • Purpose: Generate HTML for rank steps after getting the count of texts
  • Parameters:
    • $step_id
    • $post_id

badgeos_unlock_user_rank

  • Purpose: To unlock user rank based on award and deduct points.
  • Parameters:
    • $step_id
    • $type ( Award, Deduct )
    • $points_earned
    • $credit_step_id
    •  $credit_parent_id
    •  $this_trigger
    • $achievement_id

badgeos_revoke_rank_from_user_account

  • Purpose: Action to revoke rank from user account
  • Parameters:
    • $user_id
    • $rank_id

badgeos_update_user_rank

  • Purpose: Action to update user rank
  • Parameters:
    • $user_id
    • $new_rank
    • $old_rank
    • $admin_id
    • $achievement_id

badgeos_update_rank_type

  • Purpose: Action to update rank type
  • Parameters:
    • $original_type
    • $new_type

badgeos_before_award_rank

  • Purpose: Action to hook before awarding rank
  • Parameters:
    • $user_id
    • $rank_id
    • $rank_post_type
    • $credit_step_id
    • $credit_amount(points)
    • $admin_id
    • $current_trigger

badgeos_after_award_rank

  • Purpose: Action to hook after awarding a rank
  • Parameters:
    • $user_id
    • $rank_id
    • $rank_post_type
    • $credit_step_id
    • $credit_amount(points)
    • $admin_id
    • $current_trigger

badgeos_before_revoke_rank

  • Purpose: Action for before revoking rank
  • Parameters:
    • $user_id
    • $rank_id
    • $entry_id(achievement_primary_key)

badgeos_after_revoke_rank

  • Purpose: Action for after revoking rank
  • Parameters:
    • $user_id
    • $rank_id
    • $entry_id( achievement primary key )

badgeos_user_deserves_trigger

  • Purpose: To determine if user should have access to a trigger
  • Parameters:
    • $user_id
    • $this_trigger

badgeos_activity_triggers

  • Purpose: Override or extend the core activity triggers
  • Parameters:
    • $triggers

badgeos_nomination_notify_email

  • Purpose: Set the admin email address for nomination
  • Parameters:
    • $adminI_email

badgeos_nomination_notify_subject

  • Purpose: Set the subject of the email for nomination
  • Parameters:
    • $subject

badgeos_nomination_notify_message

  • Purpose: Set the content of the message for nomination
  • Parameters:
    • $message

badgeos_submission_notify_email

  • Purpose: Set the admin email address for submission
  • Parameters:
    • $admin_email

badgeos_submission_notify_subject

  • Purpose: Set the subject of the email for submission
  • Parameters:
    • $subject

badgeos_submission_notify_message

  • Purpose: Set the content of the message for submission
  • Parameters:
    • $message

badgeos_submission_form_language

  • Purpose: Filter the submission form texts
  • Parameters:
    • $defaults

badgeos_comment_form_language

  • Purpose: Filter the comment form texts
  • Parameters:
    • $defaults

badgeos_get_comment_form

  • Purpose: Set the id for the comment form
  • Parameters:
    • $sub_form
    • $post_id

badgeos_get_comments_for_submission

  • Purpose: Get the comments for a submission
  • Parameters:
    • $output
    • $submission_id
    • $comments

badgeos_get_nomination_form

  • Purpose: Display nomination form
  • Parameters:
    • $sub_form

badgeos_get_submission_form

  • Purpose: Display the submission form
  • Parameters:
    • $sub_form

badgeos_get_submissions

  • Purpose: Get the submissions for the current user
  • Parameters:
    • $submissions

badgeos_get_user_submissions

  • Purpose: Override submissions from a specific user for a specific achievement
  • Parameters:
    • $submissions
    • $achievement_id
    • $user_id

badgeos_get_submission_attachments

  • Purpose: Get achievement specific attachments
  • Parameters:
    • $output
    • $submission_id
    • $attachments

badgeos_steps_ui_title

  • Purpose: Get the title for the steps ui meta box
  • Parameters:
    • $title

badgeos_steps_ui_add_new

  • Purpose: Add new step to the meta box
  • Parameters:
    • $step

badgeos_steps_ui_save_all

  • Purpose: Save all of the steps in the meta box
  • Parameters:
    • $steps

badgeos_steps_ui_html_require_text

  • Purpose: Filter requirement text for steps UI
  • Parameters:
    • $output

badgeos_steps_ui_html_count_text

  • Purpose: Filter the the html count for steps UI
  • Parameters:
    • $output

badgeos_get_step_requirements

  • Purpose: Get the requirements of a given step
  • Parameters:
    • $requirements
    • $step_id

badgeos_save_step

  • Purpose: Save given step
  • Parameters:
    • $custom_title
    • $step_id
    • $step

user_has_access_to_achievement

  • Purpose: Checks if the current user can access a specific achievement
  • Parameters:
    • $return
    • $user_id
    • $achievement_id

badgeos_step_activity

  • Purpose:  Gets the current step activity toward an achievement
  • Parameters:
    • $activities
    • $user_id
    • $step_id

user_deserves_achievement

  • Purpose: Checks to see if user fulfils the requirements for a given achievement
  • Parameters:
    • $return
    • $user_id
    • $achievement_id

badgeos_public_steps

  • Purpose: Set steps posts to public (expects bool)
  • Parameters:
    • $public

badgeos_public_submissions

  • Purpose: Set submissions posts to public (expects bool)
  • Parameters:
    • $public

badgeos_public_nominations

  • Purpose: Set nominations posts to public (expects bool)
  • Parameters:
    • $public

badgeos_achievement_data_meta_box

  • Purpose: Filters the achievement data (expects array)
  • Parameters:
    • $achievement_data

badgeos_achievement_data_meta_box_fields

  • Purpose: Sets the metadata for the fields type (expects array)
  • Parameters:
    • $fields

badgeos_achievement_earned_by

  • Purpose: Sets the metadata for the options field (expects array)
  • Parameters:
    • $options

badgeos_step_class

  • Purpose: Overrides the CSS class specific to the step
  • Parameters:
    • $earned_status
    • $step

badgeos_step_title_display

  • Purpose: Filter the output of the title specific to achievements
  • Parameters:
    • $display

badgeos_steps_heading

  • Purpose: Filter the heading for each step specific to achievements
  • Parameters:
    • $count
    • $post_type_object
    • $steps

badgeos_earned_achievement_message

  • Purpose: Returns message for earning achievements
  • Parameters:
    • $earned_message

badgeos_render_achievement’

  • Purpose: Return rendered filterable achievement
  • Parameters:
    • $output
    • $achievement

badgeos_render_feedback

  • Purpose: Returns rendered filterable feedback
  • Parameters:
    • $output
    • $atts

badgeos_render_nomination

  • Purpose: Returns rendered nomination information
  • Parameters:
    • $output
    • $nomination

badgeos_render_submission

  • Purpose: Returns rendered submission information
  • Parameters:
    • $output
    • $submission

badgeos_render_submission_attachment

  • Purpose: Return rendered submission attachment
  • Parameters:
    • $output
    • $attachment

badgeos_render_submission_comment

  • Purpose: Return rendered comment submission
  • Parameters:
    • $output
    • $comment
    • $odd_even

badgeos_render_feedback_buttons

  • Purpose: Return rendered approve or deny button for given feedback
  • Parameters:
    • $output
    • $feedback_id

achievement_object

  • Purpose: Return the achievement object, for extension elsewhere
  • Parameters:
    • $achievement_object

badgeos_dependent_achievements

  • Purpose: Returns earnable achievements once an achievement is earned
  • Parameters:
    • $achievements
    • $achievement_id

badgeos_default_achievement_post_thumbnail

  • Purpose: Returns a proper image thumbnail source
  • Parameters:
    • $thumbnail

badgeos_earners_heading

  • Purpose: Returns a filtered heading for people who have earned a specific achievement
  • Parameters:
    • $achievement_earners

badgeos_get_achievement_earners_list_user

  • Purpose: Return the information of each user who earned a specific achievement
  • Parameters:
    • $user_content
    • $user

badgeos_get_achievement_earners_list

  • Purpose: Return a list of all users who earned a specific achievement
  • Parameters:
    • $output
    • $achievement_id

badgeos_log_entry_title

  • Purpose: Override the post title for a log entry
  • Parameters:
    • $default_title
    • $post_id
    • $user_id
    • $action
    • $achievement
    • $achievement_types

badgeos_is_achievement

  • Purpose: Checks if a current post is an achievement
  • Parameters:
    • $return
    • $post

badgeos_user_update_active_achievement

  • Purpose: Available filter for manipulating the achievement object
  • Parameters:
    • $achievement
    • $user_id
    • $achievement_id

credly_badge_builder_render_link_defaults:

  • Purpose: Override the default parameters of credly render link.
  • Parameters:
    • $parameter_array

credly_render_badge_builder

  • Purpose: User can override the credly markup.
  • Parameters:
    • $output
    • $width
    • $height

badgeos_profile_achivement_image

  • Purpose: User profile image can be manipulated with this filter.
  • Parameters:
    • $image
    • $achievement

badgeos_has_user_earned_achievement:

  • Purpose: Check if user has earned a given achievement.
  • Parameters:
    • $earned_achievement
    • $achievement_id
    • $user_id

badgeos_credly_field_map

  • Purpose: Generate the available fields to map to
  • Parameters:
    • $fields

credly_is_achievement_giveable

  • Purpose: check if user is allowed to send to credly
  • Parameters:
    • $is_giveable
    • $achievement_id
    • $user_id

badgeos_{submission_type}_args

  • Purpose: User can override the arguments of badgeos_set_submission_status() function.
  • Parameters:
    • $args

badgeos_notifications_{submission type}_{old_status}_to_{new_status}_messages

  • Purpose: Can override the email content parameters.
  • Parameters:
    • $email_messages
    • $args

badgeos_user_has_access_to_submission_form

  • Purpose: Check if a user has access to the submission form for an achievement.
  • Parameters:
    • $has_access
    • $user_id
    • $achievement_id

badgeos_get_feedback_args

  • Purpose: User can override the feedback list args of badgeos_parse_feedback_args() function().
  • Parameters:
    • $args

badgeos_user_deserves_trigger

  • Purpose: Filter Checks if a person deserves the achievement trigger.
  • Parameters:
    • $allowed
    • $user_id
    • $this_trigger
    • $site_id
    • $args

badgeos_trigger_get_user_id

  • Purpose: Can Override the user id for a given trigger action.
  • Parameters:
    • $user_id
    • $trigger
    • $args

badgeos_get_user_trigger_name

  • Purpose: User can override the trigger name.
  • Parameters:
    • $trigger
    • $user_id
    • $site_id
    • $args

badgeos_update_user_trigger_count

  • Purpose: User can override the badgeos achievements trigger count.
  • Parameters:
    • $allowed
    • $user_id
    • $trigger
    • $site_id
    • $args

badgeos_decrement_user_trigger_count

  • Purpose: Overrides the decrement count of trigger after revoking the achievements.
  • Parameters:
    • $times
    • $user_id
    • $step_id
    • $trigger
    • $site_id
    • $args

badgeos_achievements_record_type

  • Purpose: Overrides the record type of achievements before saving achievements to database.
  • Parameters:
    • $rec_type
    • $achievement_id
    • $user_id

credly_badge_builder_generate_link_defaults

  • Purpose: Sets the default credly url parameters.
  • Parameters:
    • $default_args

badgeos_notifications_{submission_type}_{new status}_messages:

  • Purpose: Override the email content.
  • Parameters:
    • $email_messages
    • $args

badgeos_notifications_{submission_type}_messages:

  • Purpose: Override the email content.
  • Parameters:
    • $email_messages
    • $args

badgeos_is_rank

  • Purpose: Filter to check is this a valid rank (with filter to override)
  • Parameter: 
    • $return
    • $post
    • $post_type

badgeos_get_user_rank

  • Purpose: Filter to over ride or get user rank
  • Parameter: 
    • $rank
    • $user_id
    • $current_rank_id

badgeos_get_next_user_rank

  • Purpose: Filter to over ride or get next user rank
  • Parameter: 
    • $next_rank_id
    • $user_id
    • $rank_type
    • $current_rank_id

badgeos_get_next_user_rank_id

  • Purpose: Filter to over ride or get next user rank id
  • Parameter: 
    • $next_rank_id
    • $rank_id

badgeos_get_ranks_by_unlock_points

  • Purpose: Filter to unlock rank by points
  • Parameter: 
    • $unlockable_ranks
    • $points
    • $point_type

badgeos_get_next_rank

  • Purpose: Filter to unlock rank based on another rank (priority based)
  • Parameter: 
    • $rank
    • $next_rank_id
    • $rank_id

badgeos_get_prev_rank_id

  • Purpose: Filter to return previous rank id based of given rank priority
  • Parameter: 
    • $prev_rank_id
    • $rank_id

badgeos_get_prev_rank

  • Purpose: Filter to return previous rank  based of given rank priority
  • Parameter: 
    • $rank
    • $prev_rank_id
    • $rank_id

badgeos_get_prev_user_rank_id

  • Purpose: Filter to over ride get previous user rank id
  • Parameter: 
    • $prev_user_rank_id
    • $user_id
    • $rank_type

badgeos_get_lowest_priority_rank_id

  • Purpose: Filter to over ride or get lowest priority rank id
  • Parameter: 
    • $rank_id
    • $rank_type

rank_object

  • Purpose: Filter to Return our rank object, available filter so we can extend it elsewhere
  • Parameter: 
    • $_object
    • $rank_id

badgeos_default_rank_post_thumbnail

  • Purpose: Filter to Return or override rank post thumbnail
  • Parameter: 
    • $image_url
    • $rank
    • $image_sizes

badgeos_get_rank_earners_list

  • Purpose: Filter to Return or override rank earners list
  • Parameter: 
    • $output
    • $rank_id
    • $earners

badgeos_rank_req_steps_ui_html_require_text

  • Purpose: Filter requirement text for rank steps UI
  • Parameter:
    • $step_id
    • $post_id

badgeos_rank_req_steps_ui_html_count_text

  • Purpose:  Filter for the html count for rank steps UI
  • Parameter:
    • $step_id
    • $post_id

badgeos_get_rank_step_requirements

  • Purpose: Get the requirements of a given rank step
  • Parameter:
    • $requirements
    • $step_id

badgeos_user_deserves_rank_award

  • Purpose: Available filter to support custom earning rules. Check if user has completed a rank award
  • Parameter:
    • $completed
    • $step_id
    • $rank_id
    • $user_id
    • $this_trigger
    • $site_id
    • $args

badgeos_ranks_update_user_trigger_count

  • Purpose: Override or check if trigger count don’t needs to be update
  • Parameter:
    • $increment
    • $user_id
    • $step_id
    • $rank_id
    • $this_trigger
    • $site_id
    • $args

badgeos_user_has_access_to_rank

  • Purpose: Available filter for custom overrides user access to a rank
  • Parameter:
    • $return
    • $credit_step_id
    • $credit_parent_id
    • $user_id
    • $this_trigger
    • $site_id
    • $args

badgeos_rank_req_activity_triggers

  • Purpose: Override or extend the core rank activity triggers
  • Parameter:
    • $triggers()

badgeos_user_rank_deserves_trigger

  • Purpose: Override or check If the user doesn’t satisfy the rank trigger requirements
  • Parameter:
    • true/false
    • $user_id
    • $this_trigger
    • $site_id
    • $args

rank_get_user_trigger_name

  • Purpose: Override or get rank based user trigger name
  • Parameter:
    • $trigger
    • $point_step_id
    • $user_id
    • $site_id
    • $args

badgeos_rank_update_user_trigger_count

  • Purpose: Override or get rank based user trigger count
  • Parameter:
    • $increment
    • $user_id
    • $step_id
    • $rank_id
    • $trigger
    • $site_id
    • $args

badgeos_get_user_rank_id

  • Purpose: User can override the current user rank id.
  • Parameters:
    • $current_rank_id
    • $user_id

badgeos_get_next_rank_id

  • Purpose: User can override the next user rank id.
  • Parameters:
    • $next_rank_id
    • $user_id

badgeos_get_rank_earners_list_user

  • Purpose: Can override the earner user content.
  • Parameters:
    • $user_content
    • $user_id

badgeos_rank_req_steps_ui_title

  • Purpose: User can change the rank step meta box title with this filter
  • Parameters:
    • $default_title

badgeos_rank_req_steps_ui_add_new

  • Purpose: User can override the Add New button text of the rank step meta box.
  • Parameters:
    • $default_title

badgeos_rank_req_steps_ui_save_all

  • Purpose: User can override the Save All Steps text of the rank step metabox.
  • Parameters:
    • $default_text

badgeos_get_rank_req_step_requirements

  • Purpose: User can override the step requirements of ranks.
  • Parameters:
    • $requirements
    • $step_id

badgeos_user_deserves_rank_step

  • Purpose: Checks if the user deserve a rank step.
  • Parameters:
    • $allowed
    • $step_id
    • $rank_id
    • $user_id
    • $this_trigger
    • $site_id
    • $args

badgeos_user_deserves_rank_step_count

  • Purpose: Check if rank requirement has been earned.
  • Parameters:
    • $completed
    • $step_ID
    • $rank_id
    • $user_id
    • $this_trigger
    • $site_id
    • $args

badgeos_ranks_req_activity_triggers

  • Purpose: User can override the ranks activity triggers.
  • Parameters:
    • $activity_triggers

ranks_get_user_trigger_name

  • Purpose: User can override the rank activity trigger name.
  • Parameters:
    • $trigger
    • $user_id
    • $site_id
    • $step_id
    • $args

badgeos_award_steps_ui_html_require_text

  • Purpose: Filter requirement text for award steps UI
  • Parameter:
    • $step_id
    • $post_id

badgeos_award_steps_ui_html_count_text

  • Purpose:  Filter the the html count for award steps UI
  • Parameter:
    • $step_id
    • $post_id

badgeos_get_award_step_requirements

  • Purpose: Get the requirements of a given award step
  • Parameter:
    • $requirements
    • $step_id

badgeos_user_deserves_credit_award

  • Purpose: Available filter to support custom earning rules. Check if user has completed a credit award
  • Parameter:
    • $return
    • $credit_step_id
    • $credit_parent_id
    • $user_id
    • $this_trigger
    • $site_id
    • $args

badgeos_user_has_access_to_points

  • Purpose: Available filter for custom overrides. Can be used for both credit award & credit deduct.
  • Parameter:
    • $return
    • $credit_step_id
    • $credit_parent_id
    • $user_id
    • $this_trigger
    • $site_id
    • $args

credit_update_user_trigger_count

  • Purpose: Update User trigger count
  • Parameter:
    • $return
    • $credit_step_id
    • $credit_parent_id
    • $user_id

badgeos_award_points_activity_triggers

  • Purpose: Override or extend the core award activity triggers
  • Parameter:
    • $triggers()

user_deserves_point_award_trigger

  • Purpose: Override or check If the user doesn’t satisfy the award trigger requirements
  • Parameter:
    • true/false
    • $user_id
    • $this_trigger
    • $site_id
    • $args

points_get_user_trigger_name

  • Purpose: Override or get user trigger name
  • Parameter:
    • $trigger
    • $point_step_id
    • $user_id
    • $site_id
    • $type(Award/Deduct)
    • $args

point_update_user_trigger_count

  • Purpose: Override or get user trigger count
  • Parameter:
    • $increment
    • $user_id
    • $trigger
    • $site_id
    • $type(Award/Deduct)
    • $args

badgeos_deduct_steps_ui_html_require_text

  • Purpose: Filter requirement  text for deduct steps UI
  • Parameter:
    • $step_id
    • $post_id

badgeos_deduct_steps_ui_html_count_text

  • Purpose:  Filter the the html count for deduct steps UI
  • Parameter:
    • $step_id
    • $post_id

badgeos_get_deduct_step_requirements

  • Purpose: Get the requirements of a given deduct step
  • Parameter:
    • $requirements
    • $step_id

badgeos_user_deserves_credit_deduct

  • Purpose: Available filter to support custom earning rules. Check if user has completed a credit deduct
  • Parameter:
    • $return
    • $credit_step_id
    • $credit_parent_id
    • $user_id
    • $this_trigger
    • $site_id
    • $args

badgeos_deduct_points_activity_triggers

  • Purpose: Override or extend the core deduct activity triggers
  • Parameter:
    • $triggers()

user_deserves_point_deduct_trigger

  • Purpose: Override or check If the user doesn’t satisfy the deduct trigger requirements
  • Parameter:
    • true/false
    • $user_id
    • $this_trigger
    • $site_id
    • $args

badgeos_deduct_points_activity_triggers

  • Purpose: Override or extend the core deduct activity triggers
  • Parameter:
    • $triggers()

badgeos_award_steps_ui_title

  • Purpose: User can change the point award step meta box title with this filter
  • Parameters:
    • $default_title

badgeos_award_steps_ui_add_new

  • Purpose: User can override the Add New button text.
  • Parameters:
    • $default_title

badgeos_award_steps_ui_save_all

  • Purpose: User can override the Save All Steps
  • Parameters:
    • $default_text

badgeos_deduct_steps_ui_title

  • Purpose: User can change the point deduct step meta box title with this filter.
  • Parameters:
    • $default_title

badgeos_deduct_steps_ui_add_new

  • Purpose: User can override the Add New button text of deduct metabox.
  • Parameters:
    • $default_title

badgeos_deduct_steps_ui_save_all

  • Purpose: User can override the Save All Steps text of deduct metabox.
  • Parameters:
    • $default_text

badgeos_settings_validate

  • Purpose: Allow BadgesOS add-on settings to be sanitized
  • Parameters:
    • $input array

badgeos_help_support_page_about

  • Purpose: User can add help text in the about section of help/support.

badgeos_help_support_page_help

  • Purpose: User can add text at the end of help/support section of help/support.

badgeos_help_support_page_shortcodes

  • Purpose: User can add text in short code section of help/support.

badgeos_specific_new_comment

  • Purpose: This action hook will be triggered when a new comment is posted against a specific comment badge.
  • Parameters:
    • $comment_ID
    • $user_id
    • $comment_post_ID
    • $comment

badgeos_new_comment

  • Purpose: This action hook will be triggered when a new comment is posted
  • Parameters:
    • $comment_ID
    • $user_id
    • $comment_post_ID
    • $comment

badgeos_wp_not_login

  • Purpose: This trigger is fired when user is not login for X days.
  • Parameters:
    • $user_login
    • $user

badgeos_wp_login

  • Purpose: This trigger is fired when user is logged into the system. This trigger will award the login badge(s)/point(s)/rank to the user if all of the conditions are met.
  • Parameters:
    • $user_login
    • $user

badgeos_daily_visit

  • Purpose: This trigger will award daily visit badge(s)/point(s)/rank to the current user if there is daily visit badge(s)/point(s)/rank in system after completing all other conditions for that achievement.
  • Parameters:
    • $user_login
    • $user

badgeos_licensed_addons

  • Purpose: Add new licenses on the badgeos setting page.
  • Parameters:
    • $licenses_array

badgeos_tools_sections

  • Purpose: Add a new tab on the tools page.
  • Parameters:
    • $badgeos_tools_sections

badgeos_render_feedback_search

  • Purpose: Render feedback search input
  • Parameters:
    • $output
    • $atts
    • $search

badgeos_post_log_entry

  • Purpose: Write log entry via filter so it can be modified by third-parties.
  • Parameters:
    • $status
    • $args

badgeos_render_feedback_filters

  • Purpose: Render feedback filter inputs.
  • Parameters:
    • $output
    • $atts

badgeos_shortcodes

  • Purpose: Get all registered BadgeOS shortcodes.
  • Parameters:
    • $shortcodes_array

Open Source License Information

Credly, LLC licenses BadgeOS™ to you under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation.

There is NO WARRANTY for this software, express or implied, including the implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License, version 3, at http://www.gnu.org/licenses/agpl-3.0.html for more details.