diff --git a/.wordpress-org/screenshot-1.png b/.wordpress-org/screenshot-1.png index 7dab871..baf16d9 100644 Binary files a/.wordpress-org/screenshot-1.png and b/.wordpress-org/screenshot-1.png differ diff --git a/README.md b/README.md index aaf7bf7..b3839f2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ # Link Verification for Mastodon -[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/over-engineer/link-verification-for-mastodon/deploy-to-plugin-repository)](https://github.com/over-engineer/link-verification-for-mastodon/actions/workflows/deploy.yml) [![WordPress Plugin Version](https://img.shields.io/wordpress/plugin/v/link-verification-for-mastodon)](https://wordpress.org/plugins/link-verification-for-mastodon/) [![WordPress Plugin: Tested WP Version](https://img.shields.io/wordpress/plugin/tested/link-verification-for-mastodon)](https://wordpress.org/plugins/link-verification-for-mastodon/) [![WordPress Plugin Rating](https://img.shields.io/wordpress/plugin/stars/link-verification-for-mastodon)](https://wordpress.org/plugins/link-verification-for-mastodon/) diff --git a/admin/settings.php b/admin/settings.php index 83fb764..fe8401e 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -11,6 +11,8 @@ namespace OverEngineer\Mastodon\LinkVerification\Admin; +use const OverEngineer\Mastodon\LinkVerification\VERSION; + if ( ! defined( 'ABSPATH' ) ) { die( 'Forbidden' ); } @@ -115,5 +117,77 @@ function options_page() { id === 'settings_page_link-verification-for-mastodon'; +} + +/** + * Add a donation link to the left side of the admin footer. + * + * @param string $text The existing footer text. + * + * @return string The modified footer text including the donation link. + */ +function admin_footer_donation( $text ) { + if ( ! is_plugin_settings_page() ) { + return $text; + } + + return sprintf( + '%s', + sprintf( + /* translators: 1: Developer username, 2: Donation link. */ + __( 'Developed with ❤️ by %1$s | Want to support me? %2$s', 'link-verification-for-mastodon' ), + sprintf( + '%s', + esc_url( 'https://fosstodon.org/@overengineer' ), + esc_html( '@overengineer' ) + ), + sprintf( + '%s', + esc_url( 'https://ko-fi.com/overengineer' ), + esc_html__( 'Buy me a coffee ☕', 'link-verification-for-mastodon' ) + ) + ) + ); +} + +/** + * Add plugin version to the right side of the admin footer. + * + * @param string $content The existing content. + * + * @return string The modified content including the plugin version. + */ +function admin_footer_version( $content ) { + if ( ! is_plugin_settings_page() ) { + return $content; + } + + return sprintf( + /* translators: Plugin version. */ + __( 'Version %s', 'link-verification-for-mastodon' ), + esc_html( VERSION ) + ); +} + add_action( 'admin_menu', 'OverEngineer\Mastodon\LinkVerification\Admin\add_admin_menu' ); add_action( 'admin_init', 'OverEngineer\Mastodon\LinkVerification\Admin\settings_init' ); + +add_filter( 'admin_footer_text', 'OverEngineer\Mastodon\LinkVerification\Admin\admin_footer_donation' ); +add_filter( 'update_footer', 'OverEngineer\Mastodon\LinkVerification\Admin\admin_footer_version', 11 ); diff --git a/link-verification-for-mastodon.php b/link-verification-for-mastodon.php index fb1de2b..dfcc8a1 100644 --- a/link-verification-for-mastodon.php +++ b/link-verification-for-mastodon.php @@ -3,7 +3,7 @@ * Plugin Name: Link Verification for Mastodon * Plugin URI: https://over-engineer.com/projects/link-verification-for-mastodon * Description: A WordPress plugin to quickly verify a link on your Mastodon profile. - * Version: 1.1.0 + * Version: 1.1.1 * Author: overengineer * Author URI: https://over-engineer.com/ * Text Domain: link-verification-for-mastodon @@ -48,7 +48,7 @@ final class Plugin { /** * @var string Plugin version number. */ - private $version = '1.1.0'; + private $version = '1.1.1'; /** * @return void diff --git a/readme.txt b/readme.txt index 1d23477..13a17b0 100644 --- a/readme.txt +++ b/readme.txt @@ -4,9 +4,9 @@ Plugin URI: https://over-engineer.com/projects/link-verification-for-mastodon Contributors: overengineer Tags: mastodon, fediverse, social Requires at least: 4.4 -Tested up to: 6.1 +Tested up to: 6.2 Requires PHP: 5.6.20 -Stable Tag: 1.1.0 +Stable Tag: 1.1.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -54,12 +54,20 @@ Yes, you can. Just enter all usernames separated by a comma. If you have spotted any bugs, or would like to request additional features from the plugin, please [file an issue](https://github.com/over-engineer/link-verification-for-mastodon/issues). += How can I support the developer of this plugin? = + +Supporting me is 100% optional. The plugin is free and will always be free. However, if you’d like to support me, it would mean the world to me and help me to keep creating useful plugins. If you’d like to contribute, please consider [buying me a coffee](https://ko-fi.com/overengineer)! ❤️ + == Screenshots == 1. Plugin settings == Changelog == += 1.1.1: April 15, 2023 = + +* Add donation link to readme.txt and the plugin’s settings page + = 1.1.0: February 26, 2023 = * Add support for multiple Mastodon usernames