Description
Add a child node to the simple XMLUpdate the SimpleXML with the field from plugin_data
Usage
bw_add_xml_child( $xml, $plugin_data, $src, $target );Parameters
- $xml
- ( mixed ) required –
- $plugin_data
- ( array ) required – the source of the data to be added
- $src
- ( string ) required – the field name
- $target
- ( string ) optional – the target name if different from $src
Returns
voidSource
File name: oik-bob-bing-wide/shortcodes/oik-plug.phpLines:
1 to 7 of 7
function bw_add_xml_child( &$xml, $plugin_data, $src, $target=null ) { if ( !$target ) { $target = strtolower( $src ); } $value = bw_array_get( $plugin_data, $src, null ); $xml->addChild( $target, $value ); }View on GitHub
Invoked by
Calls
Call hooks
API Letters:
