New function to update media entries

This commit is contained in:
Michael 2024-11-20 07:22:36 +00:00
parent 15904332b3
commit 6b360858ec

View file

@ -846,7 +846,7 @@ class Media
}
/**
* Update post-media entries
* Update post-media entries by id
*
* @param array $fields
* @param int $id
@ -857,6 +857,18 @@ class Media
return DBA::update('post-media', $fields, ['id' => $id]);
}
/**
* Update post-media entries
*
* @param array $fields
* @param array $condition
* @return boolean
*/
public static function update(array $fields, array $condition): bool
{
return DBA::update('post-media', $fields, $condition);
}
/**
* Checks if media attachments are associated with the provided item ID.
*