Filters whether a zip uploaded to the Media Library imports privately: each track and video Protected, each album's post private, for its uploader to publish. A host whose privacy is site-wide, such as a private site, can return false so that what the site already keeps from visitors is not hidden a second time, album by album: return ! Private_Site::on(). It answers for the import in the background, which an upload to the Media Library and POST /riff/v1/imports both start; wp riff import takes --private and --no-private. Defaults to true.
Parameters
$privatebool- Whether the import is private.
$idint- The zip's attachment ID.
$authorint- The ID of the user who uploaded it, whom the import runs as.
More Information
Usage
add_filter( 'riff_import_private', function ( $private, $id, $author ) {
return $private;
}, 10, 3 );Source
$private = (bool) apply_filters( 'riff_import_private', true, $id, $author );plugins/riff/src/class-import.phpView on GitHub
Changelog
| Version | Description |
|---|---|
| 6.8.0 | Introduced. |