function update($id, $title = '')
{
/* Action to perform before updating the album */
do_action('rtmedia_before_update_album', $this);
if (empty($title) && empty($id)) {
return false;
} else {
$args = array('ID' => $id, 'post_title' => $title);
$status = wp_insert_post($args);
if (is_wp_error($status) || 0 === $status) {
return false;
} else {
/* Action to perform after updating the album */
do_action('rtmedia_after_update_album', $this);
return true;
}
}
}