Skip to content

Instantly share code, notes, and snippets.

@G3ronim0
Forked from imath/functions.php
Created April 2, 2017 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save G3ronim0/596e9e7fa6326c9ba592aec165dd08ba to your computer and use it in GitHub Desktop.
Save G3ronim0/596e9e7fa6326c9ba592aec165dd08ba to your computer and use it in GitHub Desktop.
Add a custom support status to Buddy-bbPress Support topic.
<?php
/**
* Filter the available status to add a custom one
*
* Requires buddy-bbpress-support topic plugin
* bbPress 2.5+
* WordPress 4.0
*
* @param array $allstatus the available status
* @return array the available status and your custom one
*/
function your_custom_status( $allstatus = array() ) {
$allstatus['topic-working-on-it'] = array(
'sb-caption' => __( 'Working on it', 'buddy-bbpress-support-topic' ),
'value' => 3,
'prefix-title' => __( '[Working on it] ', 'buddy-bbpress-support-topic' ),
'admin_class' => 'waiting',
'dashicon' => array( 'class' => 'bpbbpst-dashicon-hammer', 'content' => '"\f308"' ),
);
return $allstatus;
}
add_filter( 'bpbbpst_get_support_status', 'your_custom_status', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment