Skip to content

Commit

Permalink
Apply filter to add alt text to writemore author bio image
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyfelt committed Feb 22, 2024
1 parent c63ce76 commit 3bfebee
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ vendor/
/plugins/

# The theme is probably managed in its own repo.
themes/
/themes/

# Uploads are... uploads.
uploads/
Expand Down
2 changes: 2 additions & 0 deletions mu-plugins/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
require_once __DIR__ . '/plugins/indieweb.php';
require_once __DIR__ . '/plugins/micropub.php';

require_once __DIR__ . '/themes/writemore.php';

if ( file_exists( __DIR__ . '/local/hacks.php' ) ) {
require_once __DIR__ . '/local/hacks.php';
}
19 changes: 19 additions & 0 deletions mu-plugins/themes/writemore.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* Customizations of the writemore theme.
*
* @package jeremyfelt
*/

namespace JeremyFelt\Writemore;

add_filter( 'writemore_author_avatar_alt_text', __NAMESPACE__ . '\filter_author_avatar_alt_text' );

/**
* Filter the alt text for the author avatar.
*
* @return string Modified alt text.
*/
function filter_author_avatar_alt_text(): string {
return "Jeremy's profile photo: a selfie taken while walking through Berlin.";
}

0 comments on commit 3bfebee

Please # to comment.