function wordpress_file_upload_handler($incomingfrompost) { //process incoming attributes assigning defaults if required $defs_indexed = wfu_shortcode_attribute_definitions_adjusted($incomingfrompost); $incomingfrompost = shortcode_atts($defs_indexed, $incomingfrompost); //run function that actually does the work of the plugin $wordpress_file_upload_output = wordpress_file_upload_function($incomingfrompost); //send back text to replace shortcode in post return $wordpress_file_upload_output; }
function wordpress_file_upload_handler($incomingfrompost) { //process incoming attributes assigning defaults if required $defs = wfu_attribute_definitions(); $defs_indexed = array(); foreach ($defs as $def) { $defs_indexed[$def["attribute"]] = $def["value"]; } $incomingfrompost = shortcode_atts($defs_indexed, $incomingfrompost); //run function that actually does the work of the plugin $wordpress_file_upload_output = wordpress_file_upload_function($incomingfrompost); //send back text to replace shortcode in post return $wordpress_file_upload_output; }