Last active
June 10, 2020 11:15
-
-
Save Auke1810/e0e3933af36e87bde4e90f961fb55c1a to your computer and use it in GitHub Desktop.
Filternaam: wppfm_xml_element_attribute Drie parameters: attribute_value: dit is de standaard waarde die dus gewijzigd kan worden. Is standaard een empty string. xml_key: dit is de naam van het xml element, dus deze parameter kan worden gebruikt om het gewenste xml element te vinden xml_value: de waarde van het xml element. Dus om een attribute …
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
Function add_attribute_to_xml_tag( $attribute_value, $xml_key, $xml_value ) { | |
if ( 'bottles' === $xml_key ) { | |
return 'size=”750 ml”'; | |
} else { | |
return $attribute_value; | |
} | |
} | |
add_filter( 'wppfm_xml_element_attribute', 'add_attribute_to_xml_tag', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment