Skip to content

Commit

Permalink
encode emails in navigation menus
Browse files Browse the repository at this point in the history
  • Loading branch information
tillkruss committed Jul 8, 2019
1 parent c8b65b3 commit 1067591
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion email-address-encoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@

/**
* Register filters to encode plain email addresses in posts, pages, excerpts,
* comments and text widgets.
* comments, text widgets and nav menus.
*/
if ( get_option( 'eae_search_in', 'filters' ) !== 'void' ) {
foreach ( array( 'the_content', 'the_excerpt', 'widget_text', 'comment_text', 'comment_excerpt' ) as $filter ) {
add_filter( $filter, 'eae_encode_emails', EAE_FILTER_PRIORITY );
}

add_filter( 'walker_nav_menu_start_el', 'eae_encode_emails', EAE_FILTER_PRIORITY );
}

/**
Expand Down
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ You can use the "Page Scanner" found under _Settings -> Email Encoder_ to see wh

== Changelog ==

= 1.0.20 =

* Encode emails in navigation menus

= 1.0.19 =

* Defer loading of email detector script
Expand Down

0 comments on commit 1067591

Please sign in to comment.