From 45110cc4036c6616ab7470bc8142e3dce6213e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20S=C3=B8derlind?= Date: Fri, 10 Sep 2021 00:51:53 +0200 Subject: [PATCH 1/3] Add filter amf/local_provider/name. With the filter you can change the name of the local provider. --- inc/LocalProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/LocalProvider.php b/inc/LocalProvider.php index 6d490cd..bdc3d35 100644 --- a/inc/LocalProvider.php +++ b/inc/LocalProvider.php @@ -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 { From 8702c5475182ee5eb614add88677d0a4db06299e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20S=C3=B8derlind?= Date: Fri, 10 Sep 2021 00:53:59 +0200 Subject: [PATCH 2/3] Version 0.10.3 --- package.json | 2 +- plugin.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 16c19df..4131ee2 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/plugin.php b/plugin.php index e8b08f6..9846875 100644 --- a/plugin.php +++ b/plugin.php @@ -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/ From 87dbbab555cae0a025a7281060fe3585800162ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20S=C3=B8derlind?= Date: Mon, 13 Sep 2021 22:56:36 +0200 Subject: [PATCH 3/3] Add information about amf/local_provider/name filter. --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index 1586392..551ed19 100644 --- a/readme.md +++ b/readme.md @@ -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.