0, // number of Analog Clock FX embeds ); /* end global parameters */ /* start client side functions */ function analogclockfx_get_embed_code($analogclockfx_attributes) { global $analogclockfx_params; $analogclockfx_params['count']++; $plugin_dir = get_option('analogclockfx_path'); if ($plugin_dir === false) { $plugin_dir = 'flashxml/analog-clock-fx'; } $plugin_dir = trim($plugin_dir, '/'); $settings_file_name = !empty($analogclockfx_attributes[2]) ? $analogclockfx_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)$analogclockfx_attributes[4] > 0 && (int)$analogclockfx_attributes[6] > 0) { $width = (int)$analogclockfx_attributes[4]; $height = (int)$analogclockfx_attributes[6]; } else { return ''; } $swf_embed = array( 'width' => $width, 'height' => $height, 'text' => isset($analogclockfx_attributes[7]) ? trim($analogclockfx_attributes[7]) : '', 'component_path' => WP_CONTENT_URL . "/{$plugin_dir}/", 'swf_name' => 'AnalogClockFX.swf', ); $swf_embed['swf_path'] = $swf_embed['component_path'].$swf_embed['swf_name']; if (!is_feed()) { $embed_code = '
'.$swf_embed['text'].'
'; $embed_code .= ''; } else { $embed_code = ''; $embed_code .= ''; $embed_code .= ''; $embed_code .= ''; $embed_code .= ''; $embed_code .= ''; $embed_code .= ''; $embed_code .= ''; $embed_code .= ''; $embed_code .= ' $settings_xml_path, 7 => $div_text, 4 => $width, 6 => $height)); } function analogclockfx_load_swfobject_lib() { wp_enqueue_script('swfobject'); } /* end client side functions */ /* start admin section functions */ function analogclockfx_admin_menu() { add_options_page('Analog Clock FX Options', 'Analog Clock FX', 'manage_options', 'analogclockfx', 'analogclockfx_admin_options'); } function analogclockfx_admin_options() { if (!current_user_can('manage_options')) { wp_die(__('You do not have sufficient permissions to access this page.')); } $analogclockfx_default_path = get_option('analogclockfx_path'); if ($analogclockfx_default_path === false) { $analogclockfx_default_path = 'flashxml/analog-clock-fx'; } ?>

Analog Clock FX

SWF and assets path is /