Skip to content

Commit

Permalink
Merge pull request #48 from soderlind/master
Browse files Browse the repository at this point in the history
Add filter for local provider name
  • Loading branch information
roborourke authored Sep 14, 2021
2 parents 58d08f1 + 87dbbab commit 380c215
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inc/LocalProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function get_id() : string {
}

public function get_name() : string {
return __( 'Local Media', 'asset-manager-framework' );
return apply_filters( 'amf/local_provider/name', __( 'Local Media', 'asset-manager-framework' ) );
}

protected function request( array $args ) : MediaList {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "asset-manager-framework",
"version": "0.10.2",
"version": "0.10.3",
"description": "A framework for overriding the WordPress media library with an external asset provider.",
"author": "Human Made",
"license": "GPL-2.0-or-later",
Expand Down
2 changes: 1 addition & 1 deletion plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* Plugin Name: Asset Manager Framework
* Description: A framework for overriding the WordPress media library with an external asset provider.
* Version: 0.10.2
* Version: 0.10.3
* Plugin URI: https://github.com/humanmade/asset-manager-framework
* Author: Human Made
* Author URI: https://humanmade.com/
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ Local media is supported by default and can be used side by side with any additi

1. Defining the `AMF_ALLOW_LOCAL_MEDIA` constant as a boolean
2. Use the `amf/allow_local_media` filter to return a boolean
3. Use the `amf/local_provider/name` filter to change the `Local Media` label.

The filter will take precedence over the constant.

Expand Down

0 comments on commit 380c215

Please sign in to comment.