Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save toluaddy/e4db545c07a63e681a42e7d52a0ccd11 to your computer and use it in GitHub Desktop.

Select an option

Save toluaddy/e4db545c07a63e681a42e7d52a0ccd11 to your computer and use it in GitHub Desktop.
Register Subai Questions & Answers
/**
* Register Subai Actions.
*/
function yz_register_subai_post_actions() {
// Init Vars
$bp = buddypress();
bp_activity_set_action(
$bp->activity->id,
'new_questions',
__('posted a new question', 'youzer'),
'yz_activity_action_wall_posts',
__( 'Questions', 'youzer' ),
array( 'activity', 'member' )
);
bp_activity_set_action(
$bp->activity->id,
'new_questions_answers',
__( 'answered to question', 'youzer' ),
'yz_activity_action_wall_posts',
__( 'Answers', 'youzer' ),
array( 'activity', 'member' )
);
}
add_action( 'bp_register_activity_actions', 'yz_register_subai_post_actions' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment