Documentation

Folder
in package
implements IOverrideFolder Uses UtilsProvider, Folder

Enables the /folders REST for all creatable items.

Table of Contents

Interfaces

IOverrideFolder

Methods

applyContentSortables()  : WP_REST_Response|WP_Error
See API docs.
applyFolderSortables()  : WP_REST_Response|WP_Error
See API docs.
createItem()  : mixed
deleteItem()  : WP_REST_Response|WP_Error
See API docs.
getContentCounts()  : WP_REST_Response|WP_Error
See API docs.
getMetaHTML()  : WP_REST_Response|WP_Error
See API docs.
getPluginConstantPrefix()  : string
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
permission_callback()  : mixed
Check if user is allowed to call this service requests.
rest_api_init()  : mixed
Register endpoints.
updateItem()  : WP_REST_Response|WP_Error
See API docs.
updateMeta()  : WP_REST_Response|WP_Error
See API docs.

Methods

applyContentSortables()

See API docs.

public applyContentSortables(WP_REST_Request $request) : WP_REST_Response|WP_Error
APIYes
Parameters
$request : WP_REST_Request
Tags
apiParam

{string} id The sortable id. Pass "original" to reset the folder, pass "deactivate" to deactive the automatic order, pass "reindex" to reindex the order indexes, pass "last" to try to to reset to the last available order

apiParam

{boolean} [automatically] Automatically use this order when new files are added to the folder

apiName

ApplyFolderContentSorting

apiGroup

Folder

apiVersion

1.0.0

apiPermission

upload_files

apiPermission

Pro only

since
4.4

The old API /folders/content/sortables is deleted

Return values
WP_REST_Response|WP_Error

applyFolderSortables()

See API docs.

public applyFolderSortables(WP_REST_Request $request) : WP_REST_Response|WP_Error
APIYes
Parameters
$request : WP_REST_Request
Tags
apiParam

{string} id The sortable id. Pass "original" to reset the folder, pass "deactivate" to deactive the automatic order, pass "reindex" to reindex the order indexes, pass "last" to try to to reset to the last available order

apiParam

{boolean} [automatically] Automatically use this order when new subfolders are added to the folder

apiName

ApplyFolderSorting

apiGroup

Folder

apiVersion

1.0.0

apiPermission

upload_files

apiPermission

Pro only

since
4.4
Return values
WP_REST_Response|WP_Error

createItem()

public createItem(mixed $request) : mixed
Parameters
$request : mixed

deleteItem()

See API docs.

public deleteItem(WP_REST_Request $request) : WP_REST_Response|WP_Error
APIYes
Parameters
$request : WP_REST_Request
Tags
apiName

DeleteFolder

apiGroup

Folder

apiVersion

1.0.0

apiPermission

upload_files

Return values
WP_REST_Response|WP_Error

getContentCounts()

See API docs.

public getContentCounts(WP_REST_Request $request) : WP_REST_Response|WP_Error
APIYes
Parameters
$request : WP_REST_Request
Tags
apiName

GetFolderContentCounts

apiGroup

Folder

apiVersion

1.0.0

apiPermission

upload_files

Return values
WP_REST_Response|WP_Error

getMetaHTML()

See API docs.

public getMetaHTML(WP_REST_Request $request) : WP_REST_Response|WP_Error
APIYes
Parameters
$request : WP_REST_Request
Tags
apiName

GetFolderMeta

apiGroup

Folder

apiVersion

1.0.0

apiPermission

upload_files

Return values
WP_REST_Response|WP_Error

getPluginConstantPrefix()

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

public getPluginConstantPrefix() : string
Tags
codeCoverageIgnore

It only returns a string with the constant prefix

Return values
string

permission_callback()

Check if user is allowed to call this service requests.

public permission_callback() : mixed

rest_api_init()

Register endpoints.

public rest_api_init() : mixed

updateItem()

See API docs.

public updateItem(WP_REST_Request $request) : WP_REST_Response|WP_Error
APIYes
Parameters
$request : WP_REST_Request
Tags
apiParam

{string} name The new name for the folder

apiName

UpdateFolder

apiGroup

Folder

apiVersion

1.0.0

apiPermission

upload_files

Return values
WP_REST_Response|WP_Error

updateMeta()

See API docs.

public updateMeta(WP_REST_Request $request) : WP_REST_Response|WP_Error
APIYes
Parameters
$request : WP_REST_Request
Tags
apiDescription

Send a key value map of form data so Meta implementations (IMetadata) can handle it

apiName

UpdateFolderMeta

apiGroup

Folder

apiVersion

1.0.0

apiPermission

upload_files

Return values
WP_REST_Response|WP_Error

        
On this page

Search results