Last active
November 24, 2021 17:26
-
-
Save Auke1810/974ce82c40c16cba42d77211adb781a4 to your computer and use it in GitHub Desktop.
Uppercase the first character of each word in the title attribute
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function string_uppercase_title( $attributes, $feed_id, $product_id ) { | |
// this line changes the title data and removes the " <prompt> " string | |
$attributes['title'] = ucwords(strtolower($attributes['title'])); | |
// IMPORTANT! Always return the $attributes | |
return $attributes; | |
} | |
add_filter( 'wppfm_feed_item_value', 'string_uppercase_title', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment