/** * Add the SlideDeck TinyMCE plugin to the TinyMCE plugins list * * @param object $plugin_array The TinyMCE options array * * @uses slidedeck_is_plugin() * @uses slidedeck_url() * * @return object $plugin_array The modified TinyMCE options array */ function slidedeck_add_tinymce_plugin($plugin_array) { if (!slidedeck_is_plugin()) { $plugin_array['slidedeck'] = slidedeck_url('/lib/tinymce3/editor-plugin.js'); } return $plugin_array; }
/** * Load SlideDeck support CSS files for skins used by SlideDecks on a page * * @uses slidedeck_get_skin() * @uses slidedeck_get_skin_css() */ function slidedeck_print_styles() { global $slidedeck_skin_included; // Make accommodations for the editing view to only load the skin files for the SlideDeck being edited if (slidedeck_is_plugin()) { if (isset($_GET['id'])) { $slidedeck = slidedeck_load($_GET['id']); $skin = $slidedeck['skin']; } else { $skin = SLIDEDECK_DEFAULT_SKIN; } $slidedeck_skin_included = array($skin => 1); } foreach ((array) $slidedeck_skin_included as $skin_slug => $val) { $skin = slidedeck_get_skin($skin_slug); echo slidedeck_get_skin_css($skin); } }