bp_forums_delete_topic

Delete a topic.

Description

bp_forums_delete_topic( (string) $args = '' ); 

Parameters (1)

0. $args — Optional. (string) => ''
The args.

Options

    ;        


    Usage

    1. if ( !function_exists( 'bp_forums_delete_topic' ) ) { 
    2. require_once '/bp-forums/bp-forums-functions.php'; 
    3.  
    4. // The args. 
    5. $args = ''; 
    6.  
    7. // NOTICE! Understand what this does before running. 
    8. $result = bp_forums_delete_topic($args); 
    9.  

    Defined (1)

    The function is defined in the following location(s).

    /bp-forums/bp-forums-functions.php  
    1. function bp_forums_delete_topic( $args = '' ) { 
    2.  
    3. /** This action is documented in bp-forums/bp-forums-screens.php */ 
    4. do_action( 'bbpress_init' ); 
    5.  
    6. $r = wp_parse_args( $args, array( 
    7. 'topic_id' => false 
    8. ) ); 
    9. extract( $r, EXTR_SKIP ); 
    10.  
    11. return bb_delete_topic( $topic_id, 1 );