Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions includes/common/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ function bbp_uploader_init() {

function bbp_uploader_wp_enqueue_scripts() {

global $bbp_uploader_scripts_load;

if( !isset($bbp_uploader_scripts_load) ) {
return;
}

wp_enqueue_script('plupload'); // plupload library
wp_enqueue_script('thickbox'); // thickbox
wp_enqueue_style('thickbox'); // thickbox style
Expand Down
2 changes: 1 addition & 1 deletion includes/hooks/common-hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Add scripts and style
*/
add_action( 'wp_enqueue_scripts', 'bbp_uploader_wp_enqueue_scripts' );
add_action( 'wp_footer', 'bbp_uploader_wp_enqueue_scripts', 0 );

/**
* Once file has been added through uploader, this ajax will be called.
Expand Down
3 changes: 3 additions & 0 deletions includes/replies/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

function bbp_reply_uploader_area() {

global $bbp_uploader_scripts_load;
$bbp_uploader_scripts_load = true;

ob_start();
?>

Expand Down
3 changes: 3 additions & 0 deletions includes/topic/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

function bbp_topic_uploader_area() {

global $bbp_uploader_scripts_load;
$bbp_uploader_scripts_load = true;

ob_start(); ?>

<div class="bbp-uploader-msg">
Expand Down