bp_docs_delete_folder

Delete a folder.

Description

bp_docs_delete_folder( (array) $args = array() ); 

Parameters (1)

0. $args — Optional. (array) => array()
The args.

Options

    ;        


    Usage

    1. if ( !function_exists( 'bp_docs_delete_folder' ) ) { 
    2. require_once ABSPATH . PLUGINDIR . 'buddypress-docs/includes/addon-folders.php'; 
    3.  
    4. // The args. 
    5. $args = array(); 
    6.  
    7. // NOTICE! Understand what this does before running. 
    8. $result = bp_docs_delete_folder($args); 
    9.  

    Defined (1)

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

    /includes/addon-folders.php  
    1. function bp_docs_delete_folder( $args = array() ) { 
    2. $r = wp_parse_args( $args, array( 
    3. 'folder_id' => 0,  
    4. 'delete_contents' => false,  
    5. ) ); 
    6.  
    7. if ( empty( $r['folder_id'] ) ) { 
    8. return false; 
    9.  
    10. if ( true === $r['delete_contents'] ) { 
    11. bp_docs_delete_folder_contents( $r['folder_id'] ); 
    12.  
    13. wp_trash_post( $r['folder_id'] ); 
    14.  
    15. return true;