0, // number of Accordion Menu FX embeds ); /* end global parameters */ /* start client side functions */ function accordionmenufx_get_embed_code($accordionmenufx_attributes) { global $accordionmenufx_params; $accordionmenufx_params['count']++; $plugin_dir = get_option('accordionmenufx_path'); if ($plugin_dir === false) { $plugin_dir = 'flashxml/accordion-menu-fx'; } $plugin_dir = trim($plugin_dir, '/'); $settings_file_name = !empty($accordionmenufx_attributes[2]) ? $accordionmenufx_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->componentWidth->attributes()->value; $height = (int)$data->General_Properties->componentHeight->attributes()->value; } } elseif ((int)$accordionmenufx_attributes[4] > 0 && (int)$accordionmenufx_attributes[6] > 0) { $width = (int)$accordionmenufx_attributes[4]; $height = (int)$accordionmenufx_attributes[6]; } else { return ''; } $swf_embed = array( 'width' => $width, 'height' => $height, 'text' => isset($accordionmenufx_attributes[7]) ? trim($accordionmenufx_attributes[7]) : '', 'component_path' => WP_CONTENT_URL . "/{$plugin_dir}/", 'swf_name' => 'accordionMenu.swf', ); $swf_embed['swf_path'] = $swf_embed['component_path'].$swf_embed['swf_name']; if (!is_feed()) { $embed_code = '
'; $embed_code .= ''; } else { $embed_code = '