Filter
rpress_file_fooditem_method
On this page
Filters the method used for file downloads of a menu item.
Runs in rpress_get_file_fooditem_method with the value of the fooditem_method setting, defaulting to 'direct'. Callbacks can return another method string. Menu items are normally not file downloads, so this filter is rarely relevant.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$method | string | The file download method. Defaults to 'direct'. |
Return value#
string. The file download method.
Example#
function my_file_fooditem_method( $method ) {
return 'direct';
}
add_filter( 'rpress_file_fooditem_method', 'my_file_fooditem_method', 10, 1 );
Source#
Applied in:
includes/fooditem-functions.php(line 714), inrpress_get_file_fooditem_method()
See also#
Was this page helpful?
