Skip to content

Media Filters

21 unique filter hooks currently map to this category, across 32 call sites.

Hook Inventory

HookEditionCall SitesFirst Source
fluent_community/convert_image_to_webpCore2fluent-community/app/Http/Controllers/FeedsController.php:949
fluent_community/generated_upload_file_nameCore1fluent-community/app/Services/Libs/FileSystem.php:169
fluent_community/handle_remove_bulk_mediaCore2fluent-community/app/Hooks/Handlers/CleanupHandler.php:134
fluent_community/has_inline_image_uploadCore1fluent-community/app/Hooks/Handlers/PortalHandler.php:517
fluent_community/has_video_embederCore1fluent-community/app/Hooks/Handlers/PortalHandler.php:516
fluent_community/media_public_url_{this}Core1fluent-community/app/Models/Media.php:138
fluent_community/media_signed_public_url_{this}Core1fluent-community/app/Models/Media.php:143
fluent_community/media_upload_dataCore (also fired by Pro)4fluent-community-pro/app/Modules/DocumentLibrary/Http/DocumentController.php:262
fluent_community/media_upload_max_file_sizeCore2fluent-community/app/Http/Controllers/FeedsController.php:909
fluent_community/media_upload_max_file_unitCore2fluent-community/app/Http/Controllers/FeedsController.php:908
fluent_community/media_upload_max_width_{context}Core2fluent-community/app/Http/Controllers/FeedsController.php:956
fluent_community/media_upload_resizeCore2fluent-community/app/Http/Controllers/FeedsController.php:953
fluent_community/preview_metadata_pre_fetchCore1fluent-community/app/Services/RemoteUrlParser.php:184
fluent_community/rate_limit/media_upload_per_minuteCore1fluent-community/app/Hooks/Handlers/RateLimitHandler.php:67
fluent_community/space_document_title_labelPRO1fluent-community-pro/app/Modules/DocumentLibrary/DocumentModule.php:58
fluent_community/space_media_title_labelPRO1fluent-community-pro/app/Modules/MediaGallery/MediaGalleryModule.php:31
fluent_community/space_media/api_responsePRO1fluent-community-pro/app/Modules/MediaGallery/Http/MediaGalleryController.php:53
fluent_community/space_media/queryPRO1fluent-community-pro/app/Modules/MediaGallery/Services/MediaGalleryService.php:148
fluent_community/space_media/transform_itemPRO1fluent-community-pro/app/Modules/MediaGallery/Services/MediaGalleryService.php:56
fluent_community/support_attachment_typesCore2fluent-community/app/Http/Controllers/FeedsController.php:880
fluent_community/upload_folder_nameCore2fluent-community/app/Services/Libs/FileSystem.php:37

fluent_community/convert_image_to_webp

  • Type: filter
  • Edition: Core
  • Call sites: 2
  • When it fires: Filters whether an uploaded image is converted to WebP.

Defaults to true unless the request asked for disable_convert=yes. Conversion only actually happens when the image is also being resized and exceeds the width limit — the flag is read inside that branch — so returning true does not convert a small image on its own. Two call sites carry this filter, but UploadHelper::processUpload() has no callers anywhere in either plugin, so in practice only the media upload endpoint reaches it.

Parameters

#NameTypeDescription
1$willWebPConvertboolWhether conversion is permitted. True unless the request disabled it.
2$filearrayThe uploaded file descriptor: file, url, type.

Return: boolfalse keeps the original format.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/FeedsController.php:949$willWebPConvert (mixed)
$file (mixed)
Corefluent-community/app/Services/UploadHelper.php:80$willWebPConvert (mixed)
$file (mixed)

Example

php
add_filter('fluent_community/convert_image_to_webp', function ($willWebPConvert, $file) {
    return $willWebPConvert;
}, 10, 2);

Related: fluent_community/media_upload_resize · fluent_community/media_upload_max_width_{context}

fluent_community/generated_upload_file_name

  • Type: filter
  • Edition: Core
  • Call sites: 1
  • When it fires: Filters the randomised filename given to an upload before it is written to disk.

The default is the original name prefixed with fluentcom-, 32 random characters, and -fluentcom-. That sandwich is not decorative: the surrounding code relies on it to recover the original name, so removing the markers breaks download filenames. The second argument gives you the pre-prefix name. Applied to every FluentCommunity upload, including avatars, covers and lesson documents.

Parameters

#NameTypeDescription
1$namestringThe prefixed filename.
2$originalNamestringThe filename as submitted by the client.
3$filearrayThe full file descriptor being uploaded.

Return: string — the filename to write. It is not re-sanitised, so escape path separators yourself.

Call Sites

EditionSourceParameters
Corefluent-community/app/Services/Libs/FileSystem.php:169$file['name'] (array)
$originalName (mixed)
$file (mixed)

Example

php
add_filter('fluent_community/generated_upload_file_name', function ($name, $originalName, $file) {
    return $name;
}, 10, 3);

fluent_community/handle_remove_bulk_media

  • Type: filter
  • Edition: Core
  • Call sites: 2
  • When it fires: Lets a storage driver take over deletion of a whole collection of media rows.

Applied at two points in the cleanup handler — the queue path, which unlinks local files and merely deactivates remote ones, and the hard-delete path, which removes every row. Returning true short-circuits both, so your callback becomes solely responsible for deleting the rows and the underlying files; nothing else runs afterwards. It is only reached for collections, never for a single media model, and never for an empty collection.

Parameters

#NameTypeDescription
1$handledboolWhether deletion has been taken over. false by default.
2$media\FluentCommunity\Framework\Database\Orm\CollectionThe media rows to remove.

Return: booltrue to suppress the built-in deletion entirely.

Call Sites

EditionSourceParameters
Corefluent-community/app/Hooks/Handlers/CleanupHandler.php:134false (bool)
$media (mixed)
Corefluent-community/app/Hooks/Handlers/CleanupHandler.php:167false (bool)
$media (mixed)

Example

php
add_filter('fluent_community/handle_remove_bulk_media', function ($handled, $media) {
    return $handled;
}, 10, 2);

Related: fluent_community/delete_remote_media_{this} · fluent_community/comment/media_deleted

fluent_community/has_inline_image_upload

  • Type: filter
  • Edition: Core
  • Call sites: 1
  • When it fires: Filters whether images can be uploaded inline from within the editor toolbar.

A string flag, not a boolean: it surfaces as features.has_inline_image_upload and the Vue app compares it strictly against 'yes', so returning true disables the feature just as effectively as returning 'no'. It controls the in-editor upload affordance only; the separate attachment control governed by fluent_community/max_media_per_post is unaffected.

Parameters

#NameTypeDescription
1$hasInlineImageUploadstringyes to allow inline uploads, anything else to disable. yes by default.

Return: string — return the literal string 'yes' to keep the feature on.

Call Sites

EditionSourceParameters
Corefluent-community/app/Hooks/Handlers/PortalHandler.php:517'yes' (string)

Example

php
add_filter('fluent_community/has_inline_image_upload', function ($hasInlineImageUpload) {
    return $hasInlineImageUpload;
}, 10, 1);

Related: fluent_community/max_media_per_post

fluent_community/has_video_embeder

  • Type: filter
  • Edition: Core
  • Call sites: 1
  • When it fires: Filters whether the video embed control appears in the post composer.

Surfaces as features.video_embeder in portal_vars and defaults to true. The Vue app tests it for truthiness only, so return the boolean false to hide the control — the string 'no' is truthy and will leave it visible. The control is additionally gated on the composer's own videoApp config, so it only ever appears in the create-post composer, and hiding it does not block video embeds submitted through the API.

Parameters

#NameTypeDescription
1$hasVideoEmbederboolWhether the embed control is offered, true by default.

Return: bool — return a falsy value, ideally false, to hide the control.

Call Sites

EditionSourceParameters
Corefluent-community/app/Hooks/Handlers/PortalHandler.php:516true (bool)

Example

php
add_filter('fluent_community/has_video_embeder', function ($hasVideoEmbeder) {
    return $hasVideoEmbeder;
}, 10, 1);

Related: fluent_community/portal_vars · fluent_community/has_inline_image_upload

fluent_community/media_public_url_{this}

  • Type: filter
  • Edition: Core
  • Call sites: 1
  • When it fires: Filters the public URL of a media item, named after its storage driver.

The suffix is $media->driver, giving fluent_community/media_public_url_local and fluent_community/media_public_url_s3. It backs the public_url accessor, so it runs every time a media URL is read — several times per post in a feed listing — and must stay free of network calls and queries. Nothing in either plugin registers on it by default; the signed variant is the one Pro cloud storage uses.

Parameters

#NameTypeDescription
1$mediaUrlstringThe stored URL.
2$media\FluentCommunity\App\Models\MediaThe media row.

Return: string — an absolute URL.

Call Sites

EditionSourceParameters
Corefluent-community/app/Models/Media.php:138$this->media_url (mixed)
$this (mixed)

Example

php
add_filter('fluent_community/media_public_url_{this}', function ($mediaUrl, $media) {
    return $mediaUrl;
}, 10, 2);

Related: fluent_community/media_signed_public_url_{this}

fluent_community/media_signed_public_url_{this}

  • Type: filter
  • Edition: Core
  • Call sites: 1
  • When it fires: Filters the time-limited URL of a media item, named after its storage driver.

The suffix is $media->driver; Pro's cloud storage registers fluent_community/media_signed_public_url_s3 to mint a pre-signed S3 URL. Unlike the plain public URL this is only requested where a temporary link is wanted, such as document downloads. The default expiry is an hour and arrives as the third argument in seconds; with no handler the unsigned stored URL is returned unchanged, which means no expiry at all.

Parameters

#NameTypeDescription
1$mediaUrlstringThe stored URL.
2$media\FluentCommunity\App\Models\MediaThe media row.
3$timeintRequested validity in seconds, 3600 by default.

Return: string — an absolute URL.

Call Sites

EditionSourceParameters
Corefluent-community/app/Models/Media.php:143$this->media_url (mixed)
$this (mixed)
$time (mixed)

Example

php
add_filter('fluent_community/media_signed_public_url_{this}', function ($mediaUrl, $media, $time) {
    return $mediaUrl;
}, 10, 3);

Related: fluent_community/media_public_url_{this}

fluent_community/media_upload_data

  • Type: filter
  • Edition: Core (also fired by Pro)
  • Call sites: 4
  • When it fires: Filters the attributes used to create a media row just before it is written.

The last point at which an upload can be redirected or rejected — Pro's Cloud Storage module rewrites driver, media_path and media_url here to push the file offsite. Returning a WP_Error surfaces its message to the uploader, and returning anything falsy aborts the upload with a generic error, so this doubles as an upload veto. It is applied by four separate upload endpoints (feed media, generic uploads, FluentPlayer and Pro documents), which all pass the same shape.

Parameters

#NameTypeDescription
1$mediaDataarrayAttributes for the new media row: media_type, driver, media_path, media_url, settings.
2$filearrayThe processed upload, including path, url, type and a meta array of image dimensions.

Return: array — the attributes to create the media row with. Return a WP_Error to reject the upload with a message, or a falsy value to reject it generically.

Call Sites

EditionSourceParameters
PROfluent-community-pro/app/Modules/DocumentLibrary/Http/DocumentController.php:262$mediaData (mixed)
$file (mixed)
Corefluent-community/app/Http/Controllers/FeedsController.php:1049$mediaData (mixed)
$file (mixed)
Corefluent-community/app/Services/UploadHelper.php:182$mediaData (mixed)
$file (mixed)
Corefluent-community/Modules/Integrations/FluentPlayer/Http/Controllers/MediaController.php:101$mediaData (mixed)
$file (mixed)

Example

php
add_filter('fluent_community/media_upload_data', function ($mediaData, $file) {
    return $mediaData;
}, 10, 2);

Related: fluent_community/support_attachment_types · fluent_community/upload_folder_name

fluent_community/media_upload_max_file_size

  • Type: filter
  • Edition: Core
  • Call sites: 2
  • When it fires: Filters the numeric part of the upload size limit.

Paired with fluent_community/media_upload_max_file_unit, which supplies MB or GB; the two are multiplied into a kilobyte figure for the validator, so changing one without the other silently rescales the limit. The default is 100 at the media upload endpoint. A second call site in UploadHelper::processUpload() passes a caller-supplied default of 10, but that method has no callers in either plugin. This is only FluentCommunity's own check — the PHP and server upload limits still apply first.

Parameters

#NameTypeDescription
1$maxFileSizeintThe size number, 100 at the live call site.

Return: int — the size, interpreted in the unit returned by fluent_community/media_upload_max_file_unit.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/FeedsController.php:909100 (int)
Corefluent-community/app/Services/UploadHelper.php:40$options['max_size'] (array)

Example

php
add_filter('fluent_community/media_upload_max_file_size', function ($maxFileSize) {
    return $maxFileSize;
}, 10, 1);

Related: fluent_community/media_upload_max_file_unit

fluent_community/media_upload_max_file_unit

  • Type: filter
  • Edition: Core
  • Call sites: 2
  • When it fires: Filters the unit the upload size limit is expressed in.

Compared case-insensitively against MB and GB; anything else is treated as kilobytes, since the size is passed to the validator unmultiplied. The returned string is also interpolated into the error message shown to the member, so it should stay short. Defaults to MB at the live call site.

Parameters

#NameTypeDescription
1$maxFileUnitstringMB by default.

Return: stringMB, GB, or any other value to have the size read as kilobytes.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/FeedsController.php:908'MB' (string)
Corefluent-community/app/Services/UploadHelper.php:39$options['size_unit'] (array)

Example

php
add_filter('fluent_community/media_upload_max_file_unit', function ($maxFileUnit) {
    return $maxFileUnit;
}, 10, 1);

Related: fluent_community/media_upload_max_file_size

fluent_community/media_upload_max_width_{context}

  • Type: filter
  • Edition: Core
  • Call sites: 2
  • When it fires: Filters the maximum width an uploaded image is resized to, scoped to the upload context.

The suffix is the context sent with the upload request — the portal uses values such as avatar, cover_photo and feed — and the filter is skipped entirely when no context is supplied. It only takes effect when resizing is on and the source image is genuinely wider than the returned value; a width of 0 disables resizing for that context. Resized images are re-saved at quality 90.

Parameters

#NameTypeDescription
1$maxWidthintThe width from the request, often empty.
2$filearrayThe uploaded file descriptor.

Return: int — the maximum width in pixels. 0 or a falsy value skips resizing.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/FeedsController.php:956$maxWidth (mixed)
$file (mixed)
Corefluent-community/app/Services/UploadHelper.php:87$maxWidth (mixed)
$file (mixed)

Example

php
add_filter('fluent_community/media_upload_max_width_{context}', function ($maxWidth, $file) {
    return $maxWidth;
}, 10, 2);

Related: fluent_community/media_upload_resize · fluent_community/convert_image_to_webp

fluent_community/media_upload_resize

  • Type: filter
  • Edition: Core
  • Call sites: 2
  • When it fires: Filters whether an uploaded image is resized at all.

The two call sites disagree on the default, which is worth knowing before you write a callback. At the media upload endpoint the incoming value is the request's raw resize parameter, so it is falsy unless the client asked for resizing; in UploadHelper::processUpload() it is the inverse of the resize option, so it is true by default — but that method has no callers in either plugin. Resizing also requires a non-zero max width, and WebP conversion only happens as part of a resize.

Parameters

#NameTypeDescription
1$willResizemixedThe request's resize value at the live call site; not cast to bool.
2$filearrayThe uploaded file descriptor.

Return: Truthy to permit resizing. The value is only tested for truthiness, so a non-empty string works.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/FeedsController.php:953$willResize (mixed)
$file (mixed)
Corefluent-community/app/Services/UploadHelper.php:84$willResize (mixed)
$file (mixed)

Example

php
add_filter('fluent_community/media_upload_resize', function ($willResize, $file) {
    return $willResize;
}, 10, 2);

Related: fluent_community/media_upload_max_width_{context} · fluent_community/convert_image_to_webp

fluent_community/preview_metadata_pre_fetch

  • Type: filter
  • Edition: Core
  • Call sites: 1
  • When it fires: Lets a callback supply link-preview metadata instead of fetching the remote page.

Returning an array short-circuits the HTTP request entirely, and the value is written into the same object-cache entry the real fetch would have populated, for an hour by default. Only arrays are honoured: anything else, including a WP_Error, is ignored and the fetch proceeds. Use the same shape the parser produces — title, image, description, icon, type, url — since it is stored verbatim as the post's meta.media_preview. The cache is checked before this filter, so it does not run for a URL already cached.

Parameters

#NameTypeDescription
1$preemptedmixednull by default.
2$urlstringThe URL being previewed, with any trailing slash removed.

Return: An array of metadata to bypass the remote fetch, or null to let it proceed. Non-array values are ignored.

Call Sites

EditionSourceParameters
Corefluent-community/app/Services/RemoteUrlParser.php:184null (mixed)
$url (mixed)

Example

php
add_filter('fluent_community/preview_metadata_pre_fetch', function ($preempted, $url) {
    return $preempted;
}, 10, 2);

Related: fluent_community/feed_oembed_api_response

fluent_community/rate_limit/media_upload_per_minute

  • Type: filter
  • Edition: Core
  • Call sites: 1
  • When it fires: Filters how many files a member may upload in a rolling one-minute window.

Defaults to 10. The comparison is count > limit over media rows created in the last 60 seconds, so the effective allowance is one more than the number returned. It counts media rows rather than requests, and inactive draft uploads count too. Site administrators are exempt before the filter is consulted, and exceeding the limit throws rather than returning a structured error.

Parameters

#NameTypeDescription
1$limitPerMinuteintUploads allowed per rolling minute, 10 by default.

Return: int — the limit.

Call Sites

EditionSourceParameters
Corefluent-community/app/Hooks/Handlers/RateLimitHandler.php:6710 (int)

Example

php
add_filter('fluent_community/rate_limit/media_upload_per_minute', function ($limitPerMinute) {
    return $limitPerMinute;
}, 10, 1);

Related: fluent_community/check_rate_limit/media_upload · fluent_community/rate_limit/posts_per_5_minutes

fluent_community/space_document_title_label

  • Type: filter
  • Edition: PRO
  • Call sites: 1
  • When it fires: Filters the "Documents" label in a space's header navigation.

Only reached for spaces whose permissions grant can_view_documents, i.e. where the space has document_library enabled. It renames the menu entry only — the route name and the API paths are unaffected.

Parameters

#NameTypeDescription
1$labelstringMenu label, "Documents" by default.
2$space\FluentCommunity\App\Models\BaseSpaceThe space the header is being built for.

Return: The menu label string.

Call Sites

EditionSourceParameters
PROfluent-community-pro/app/Modules/DocumentLibrary/DocumentModule.php:58__('Documents', 'fluent-community-pro') (mixed)
$space (Space)

Example

php
add_filter('fluent_community/space_document_title_label', function ($label, $space) {
    return $label;
}, 10, 2);

Related: fluent_community/space_media_title_label

fluent_community/space_media_title_label

  • Type: filter
  • Edition: PRO
  • Call sites: 1
  • When it fires: Filters the "Media" label in a space's header navigation.

Only reached for spaces whose permissions grant can_view_media, i.e. where the space has media_gallery enabled. It renames the menu entry only — the route name and the API path are unaffected. The media entry is added at priority 0, ahead of the documents entry at priority 1.

Parameters

#NameTypeDescription
1$labelstringMenu label, "Media" by default.
2$space\FluentCommunity\App\Models\BaseSpaceThe space the header is being built for.

Return: The menu label string.

Call Sites

EditionSourceParameters
PROfluent-community-pro/app/Modules/MediaGallery/MediaGalleryModule.php:31__('Media', 'fluent-community-pro') (mixed)
$space (Space)

Example

php
add_filter('fluent_community/space_media_title_label', function ($label, $space) {
    return $label;
}, 10, 2);

Related: fluent_community/space_document_title_label

fluent_community/space_media/api_response

  • Type: filter
  • Edition: PRO
  • Call sites: 1
  • When it fires: Filters the media-gallery API response.

The payload always carries items, has_more and cursor; has_audio is present only on the first page (no cursor), because the audio tab visibility is resolved once rather than per page. Fires after fluent_community/space_media/viewed.

Parameters

#NameTypeDescription
1$responsearrayResponse payload: items, has_more, cursor, and has_audio on the first page.
2$space\FluentCommunity\App\Models\SpaceThe space whose gallery was listed.
3$typestringOne of photos, videos, audios.

Return: The response payload array.

Call Sites

EditionSourceParameters
PROfluent-community-pro/app/Modules/MediaGallery/Http/MediaGalleryController.php:53$response (mixed)
$space (Space)
$type (mixed)

Example

php
add_filter('fluent_community/space_media/api_response', function ($response, $space, $type) {
    return $response;
}, 10, 3);

Related: fluent_community/space_media/query · fluent_community/space_media/viewed

fluent_community/space_media/query

  • Type: filter
  • Edition: PRO
  • Call sites: 1
  • When it fires: Filters the media-gallery query builder before it is paged.

Runs after the type filter has been applied — images for "photos", fluent_player media split by an audio token in settings for "videos" and "audios" — and before the cursor and per-page limits. This is the hook for adding constraints or eager loads; returning anything that is not a query builder will break the endpoint.

Parameters

#NameTypeDescription
1$query\FluentCommunity\Framework\Database\Orm\BuilderThe Media query for this space and tab.
2$space\FluentCommunity\App\Models\SpaceThe space whose gallery is being listed.
3$typestringOne of photos, videos, audios.

Return: The query builder.

Call Sites

EditionSourceParameters
PROfluent-community-pro/app/Modules/MediaGallery/Services/MediaGalleryService.php:148$query (mixed)
$space (Space)
$type (mixed)

Example

php
add_filter('fluent_community/space_media/query', function ($query, $space, $type) {
    return $query;
}, 10, 3);

Related: fluent_community/space_media/api_response

fluent_community/space_media/transform_item

  • Type: filter
  • Edition: PRO
  • Call sites: 1
  • When it fires: Filters one media item as it is shaped into the gallery API structure.

Runs once per row on every page of the gallery, so keep callbacks cheap and avoid per-item queries — the feed and its author are already eager-loaded on the model. The kind key is the gallery's own classification (image / video / audio) and is not the raw mime type, which is carried separately as media_type. feed is null for media not attached to a post.

Parameters

#NameTypeDescription
1$itemarrayThe item payload: id, url, media_type, kind, settings, created_at, feed.
2$media\FluentCommunity\App\Models\MediaThe underlying media row.
3$space\FluentCommunity\App\Models\SpaceThe space whose gallery is being listed.

Return: The item payload array.

Call Sites

EditionSourceParameters
PROfluent-community-pro/app/Modules/MediaGallery/Services/MediaGalleryService.php:56array (7 keys: id, url, media_type, …) (array)
$m (mixed)
$space (Space)

Example

php
add_filter('fluent_community/space_media/transform_item', function ($item, $media, $space) {
    return $item;
}, 10, 3);

Related: fluent_community/space_media/query · fluent_community/space_media/api_response

fluent_community/support_attachment_types

  • Type: filter
  • Edition: Core
  • Call sites: 2
  • When it fires: Filters the MIME types accepted by FluentCommunity's image upload endpoints.

Applied at two upload entry points whose defaults are not identical: FeedsController::handleMediaUpload() includes image/heic while UploadHelper::uploadFiles() does not, so a callback that rebuilds the array instead of appending will silently change behaviour on one path. The list is also mined for extensions eligible for WebP conversion, so adding a non-image MIME type here has effects beyond validation.

Parameters

#NameTypeDescription
1$mimeTypesarrayAccepted MIME type strings, image types only by default.

Return: array — MIME type strings. They are joined into the validator's mimetypes rule, so return a flat, non-associative array.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/FeedsController.php:880array (6 items) (array)
Corefluent-community/app/Services/UploadHelper.php:28array (7 items) (array)

Example

php
add_filter('fluent_community/support_attachment_types', function ($mimeTypes) {
    return $mimeTypes;
}, 10, 1);

Related: fluent_community/media_upload_data

fluent_community/upload_folder_name

  • Type: filter
  • Edition: Core
  • Call sites: 2
  • When it fires: Filters the folder, relative to the WordPress uploads base directory, that FluentCommunity writes media into.

Defaults to the FLUENT_COMMUNITY_UPLOAD_DIR constant and is applied in two places that must agree — the directory resolver and the custom upload-dir override — so filter it unconditionally rather than for one code path. On first use the directory is created with a hardening .htaccess and an index.php; a folder you point at that already exists will not get those files. Pro's Document Library filters it temporarily to redirect document uploads.

Parameters

#NameTypeDescription
1$folderNamestringPath fragment appended to the uploads base directory, with a leading slash.

Return: string — the folder path fragment. Existing media is not migrated, so changing it orphans previously uploaded files.

Call Sites

EditionSourceParameters
Corefluent-community/app/Services/Libs/FileSystem.php:37FLUENT_COMMUNITY_UPLOAD_DIR (mixed)
Corefluent-community/app/Services/Libs/FileSystem.php:136FLUENT_COMMUNITY_UPLOAD_DIR (mixed)

Example

php
add_filter('fluent_community/upload_folder_name', function ($folderName) {
    return $folderName;
}, 10, 1);

FluentCommunity developer documentation