Ejemplo n.º 1
0
 function form($instance)
 {
     $id_base = 'widget-' . $this->id_base . '-' . $this->number . '-';
     $name_base = 'widget-' . $this->id_base . '[' . $this->number . ']';
     $instance['size'] = 'widget';
     $instance['hide-size'] = true;
     $nextgen = sns_get_nextgen_galleries();
     sns_form_widget_title($id_base, $name_base, $instance);
     sns_print_nextgen_gallery_form($id_base, $name_base, $instance, $nextgen);
     sns_form_slider_settings($id_base, $name_base, $instance);
 }
Ejemplo n.º 2
0
function easy_nivo_slider_load_plugin($plugin_array)
{
    // Using session variables to pass these for now.
    // Switch to using wp inside the mce plugin when time permits
    if (!isset($_SESSION)) {
        session_start();
    }
    // Prepare the website taxonomies
    $nivo_tax = easy_nivo_slider_post_types();
    $_SESSION['nivo_tax'] = serialize($nivo_tax);
    // Prepare the plugin options
    $nivo_options = get_option('easy_nivo_slider_options');
    $_SESSION['nivo_options'] = serialize($nivo_options);
    // If NextGen active, prepare the list of galleries
    if (function_exists('sns_get_nextgen_galleries')) {
        $nivo_nextgen = sns_get_nextgen_galleries();
        $_SESSION['nivo_nextgen'] = serialize($nivo_nextgen);
    }
    // Annnnnnnnnd....activate
    $plug = plugins_url('/mce/editor_plugin.js', __FILE__);
    $plugin_array['easy_nivo_slider_plugin'] = $plug;
    return $plugin_array;
}