function wfu_prepare_message_block($params, $widths, $heights) { $sid = $params["uploadid"]; $styles = ""; if ($widths["message"] != "") { $styles .= 'width: ' . $widths["message"] . '; '; } if ($heights["message"] != "") { $styles .= 'height: ' . $heights["message"] . '; '; } if ($styles != "") { $styles = ' style="' . $styles . '"'; } $message_block = wfu_prepare_message_block_skeleton($sid, $styles, $params["testmode"] == "true"); $message_item = $message_block["msgblock"]; $message_item["title"] = 'wordpress_file_upload_message_' . $sid; $message_item["hidden"] = $params["testmode"] != "true"; return $message_item; }
function wfu_prepare_message_block($params, $additional_params, $occurrence_index) { $sid = $params["uploadid"]; $widths = $additional_params['widths']; $heights = $additional_params['heights']; $container_width = ""; $styles = ""; //for responsive plugin adjust container and container's parent widths if a % width has been defined if ($params["fitmode"] == "responsive" && strlen($widths["message"]) > 1 && substr($widths["message"], -1, 1) == "%") { $container_width = $widths["message"]; $styles .= 'width: 100%; '; } elseif ($widths["message"] != "") { $styles .= 'width: ' . $widths["message"] . '; '; } if ($heights["message"] != "") { $styles .= 'height: ' . $heights["message"] . '; '; } if ($styles != "") { $styles = ' style="' . $styles . '"'; } $message_block = wfu_prepare_message_block_skeleton($sid, $styles, $params["testmode"] == "true"); $message_item = $message_block["msgblock"]; $message_item["title"] = 'wordpress_file_upload_message_' . $sid; $message_item["hidden"] = $params["testmode"] != "true"; $message_item["width"] = $container_width; return $message_item; }