0, // number of Sliding Image Gallery XML v2 embeds ); /* end global parameters */ /* start client side functions */ function slidingimagegalleryxmlv2_get_embed_code($slidingimagegalleryxmlv2_attributes) { global $slidingimagegalleryxmlv2_params; $slidingimagegalleryxmlv2_params['count']++; $plugin_dir = get_option('slidingimagegalleryxmlv2_path'); if ($plugin_dir === false) { $plugin_dir = 'flashdo/flashblue/sliding-image-gallery-xml-v2'; } $plugin_dir = trim($plugin_dir, '/'); $xml_file_name = !empty($slidingimagegalleryxmlv2_attributes[2]) ? $slidingimagegalleryxmlv2_attributes[2] : 'xml/banner.xml'; $xml_file_path = WP_CONTENT_DIR . "/{$plugin_dir}/{$xml_file_name}"; if (function_exists('simplexml_load_file')) { if (file_exists($xml_file_path)) { $data = simplexml_load_file($xml_file_path); $width = (int)$data->globals->attributes()->width; $height = (int)$data->globals->attributes()->height; } } elseif ((int)$slidingimagegalleryxmlv2_attributes[4] > 0 && (int)$slidingimagegalleryxmlv2_attributes[6] > 0) { $width = (int)$slidingimagegalleryxmlv2_attributes[4]; $height = (int)$slidingimagegalleryxmlv2_attributes[6]; } else { return ''; } $swf_embed = array( 'width' => $width, 'height' => $height, 'text' => isset($slidingimagegalleryxmlv2_attributes[7]) ? trim($slidingimagegalleryxmlv2_attributes[7]) : '', 'component_path' => WP_CONTENT_URL . "/{$plugin_dir}/", 'swf_name' => 'banner.swf', ); $swf_embed['swf_path'] = $swf_embed['component_path'].$swf_embed['swf_name']; if (!is_feed()) { $embed_code = '