Filter: cloudinary_task_capability_{task}

apply_filters( 'cloudinary_task_capability_{task}', $capability, $context, $args ) → {string}

Filter the capability required for a specific Cloudinary task.
Parameters:
Name Type Description
$capability string The capability.
$context string The context for the task.
$args mixed The optional arguments.
Since:
  • 2.7.6. In 3.0.6 $context and $args added.
Default Value:
  • 'manage_options'
Source:
Returns:
Type
string
Example
<?php

// Enforce `manage_options` to download an asset from Cloudinary.
add_filter(
    'cloudinary_task_capability_manage_assets',
    function( $task, $context ) {
        if ( 'download' === $context ) {
            $capability = 'manage_options';
        }
        return $capability;
    },
    10,
    2
);