Last active
March 31, 2018 09:04
-
-
Save Auke1810/4b6fdb976436ac17d72615e049b46b8c to your computer and use it in GitHub Desktop.
Make title attribute lowercase
This file contains 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
/** | |
* Alter Product feed item | |
* Make the title attribute lowercase | |
*/ | |
function alter_feed_item( $attributes, $feed_id, $product_id ) { | |
// lowercase | |
$title = $attributes['title']; | |
$title = strtolower($title); //make lower case | |
$title = ucfirst($title) // maken first character capitalized | |
$attributes['title'] = $title; | |
// IMPORTANT! Always return the $attributes | |
return $attributes; | |
} | |
add_filter( 'wppfm_feed_item_value', 'alter_feed_item', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment