bp_media_import_reset_topic_media()

Reset all media related data in topics

Description

Source

File: bp-media/bp-media-functions.php

function bp_media_import_reset_topic_media() {
	global $wpdb;

	$bp_media_table = $wpdb->prefix . 'bp_media';

	$medias = get_option( 'bp_media_import_topic_media_ids', array() );

	if ( ! empty( $medias ) ) {

		$medias = implode( ',', $medias );
		$wpdb->query( "DELETE FROM {$bp_media_table} WHERE id IN ({$medias})" );
	}

	update_option( 'bp_media_import_status', 'reset_reply' );
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.10 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.