0, // number of 3D Carousel Menu FX embeds ); /* end global parameters */ /* start client side functions */ function carouselmenufx_get_embed_code($carouselmenufx_attributes) { global $carouselmenufx_params; $carouselmenufx_params['count']++; $plugin_dir = get_option('carouselmenufx_path'); if ($plugin_dir === false) { $plugin_dir = 'flashxml/3d-carousel-menu-fx'; } $plugin_dir = trim($plugin_dir, '/'); $settings_file_name = !empty($carouselmenufx_attributes[2]) ? $carouselmenufx_attributes[2] : 'settings.xml'; $settings_file_path = WP_CONTENT_DIR . "/{$plugin_dir}/{$settings_file_name}"; if (function_exists('simplexml_load_file')) { if (file_exists($settings_file_path)) { $data = simplexml_load_file($settings_file_path); $width = (int)$data->General_Properties->carouselWidth->attributes()->value; $height = (int)$data->General_Properties->carouselHeight->attributes()->value; } } elseif ((int)$carouselmenufx_attributes[4] > 0 && (int)$carouselmenufx_attributes[6] > 0) { $width = (int)$carouselmenufx_attributes[4]; $height = (int)$carouselmenufx_attributes[6]; } else { return ''; } $swf_embed = array( 'width' => $width, 'height' => $height, 'text' => isset($carouselmenufx_attributes[7]) ? trim($carouselmenufx_attributes[7]) : '', 'component_path' => WP_CONTENT_URL . "/{$plugin_dir}/", 'swf_name' => 'carousel.swf', ); $swf_embed['swf_path'] = $swf_embed['component_path'].$swf_embed['swf_name']; if (!is_feed()) { $embed_code = '
'; $embed_code .= ''; } else { $embed_code = '