Advertisement
verygoodplugins

Untitled

Jul 16th, 2024
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. /**
  2.  * Filter the available tags and convert all tag labels to lowercase.
  3.  *
  4.  * @param array $tags The available tags.
  5.  * @return array The modified tags with lowercase labels.
  6.  */
  7. function my_wpf_lowercase_tags( $tags ) {
  8.     // Loop through each tag and convert the label to lowercase.
  9.     foreach ( $tags as $key => $label ) {
  10.         $tags[ $key ] = strtolower( $label );
  11.     }
  12.  
  13.     return $tags;
  14. }
  15. add_filter( 'wpf_get_setting_available_tags', 'my_wpf_lowercase_tags' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement