Example #1
0
/**
 * Things to run during init hook
 *
 * @since 0.8.6
 */
function nktagcloud_init()
{
    // http://codex.wordpress.org/Determining_Plugin_and_Content_Directories
    // Pre-2.6 compatibility
    if (!defined('WP_CONTENT_URL')) {
        define('WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
    }
    if (!defined('WP_CONTENT_DIR')) {
        define('WP_CONTENT_DIR', ABSPATH . 'wp-content');
    }
    if (!defined('WP_PLUGIN_URL')) {
        define('WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins');
    }
    if (!defined('WP_PLUGIN_DIR')) {
        define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins');
    }
    global $nktagcloud;
    $nktagcloud = array('path' => WP_PLUGIN_DIR . '/' . str_replace(basename(__FILE__), "", plugin_basename(__FILE__)), 'url' => WP_PLUGIN_URL . '/' . str_replace(basename(__FILE__), "", plugin_basename(__FILE__)));
    // always needed for footer link
    // TODO which footer link? we don't need this in admin, or do we?
    require_once 'inc/page.php';
    if (is_admin()) {
        require_once 'inc/admin.php';
        add_action('admin_menu', 'nktagcloud_add_pages');
        register_widget_control(__('Better Tag Cloud', 'nktagcloud'), 'nktagcloud_control');
        register_sidebar_widget(__('Better Tag Cloud', 'nktagcloud'), 'widget_nktagcloud');
    } else {
        add_shortcode('nktagcloud', 'nktagcloud_shortcode');
        add_shortcode('nktagcloud_single', 'nktagcloud_single_shortcode');
        register_sidebar_widget(__('Better Tag Cloud', 'nktagcloud'), 'widget_nktagcloud');
    }
}
Example #2
0
 /**
  * Registers Ribcage sidebar widgets and their controls.
  *
  * @author Alex Andrews
  */
 function init()
 {
     register_sidebar_widget('Forthcoming Releases', array('ribcage_widgets', 'forthcoming_releases'));
     register_sidebar_widget('Recent Releases', array('ribcage_widgets', 'recent_releases'));
     //register_sidebar_widget_control('Recent Releases', array('ribcage_widgets', 'widget_ribcage_recent_control'));
     //register_sidebar_widget_control('Forthcoming Releases', array('ribcage_widgets', 'widget_ribcage_recent_forthcoming'));
 }
Example #3
0
function widget_vmidag_init()
{
    if (!function_exists('register_sidebar_widget') || !function_exists('register_widget_control')) {
        return;
    }
    function widget_vmidag($args)
    {
        $data = _vmidag_get_games_data();
        if (empty($data) || empty($data->games)) {
            return;
        }
        echo '<li id="vmidag" class="widget widget_vmidag">';
        echo '<h2 class="widgettitle">Dagens VM-matcher</h2>';
        $today_start = mktime(0, 0, 0);
        $today_end = mktime(23, 59, 59);
        date_default_timezone_set('Europe/Stockholm');
        $no_game_today = true;
        foreach ($data->games as $game) {
            if ($game->kickoff >= $today_start && $game->kickoff <= $today_end) {
                $no_game_today = false;
                echo sprintf('<p>%s – %s kl %s på %s</p>', '<a href="' . $game->home_team_uri_user . '" rel="external" title="Spelschema för ' . $game->home_team . ' under VM">' . $game->home_team . '</a>', '<a href="' . $game->away_team_uri_user . '" rel="external" title="Spelschema för ' . $game->away_team . ' under VM">' . $game->away_team . '</a>', date('H:i', $game->kickoff), $game->channel);
            }
        }
        if ($no_game_today) {
            echo '<p>Idag spelas tyvärr inga VM-matcher!</p>';
        }
        echo '</li>';
    }
    register_sidebar_widget(array('vmidag', 'widgets'), 'widget_vmidag');
}
Example #4
0
function widget_donations_init()
{
    if (function_exists('register_sidebar_widget')) {
        register_sidebar_widget(TXT_WPSC_DONATIONS, 'widget_donations');
    }
    return;
}
 function language_selector_widget_init()
 {
     register_sidebar_widget(__('Language Selector', 'sitepress'), 'language_selector_widget', 'icl_languages_selector');
     register_widget_control(__('Language Selector', 'sitepress'), array(&$this, 'set_widget'));
     add_action('template_redirect', 'icl_lang_sel_nav_ob_start');
     add_action('wp_head', 'icl_lang_sel_nav_ob_end');
 }
Example #6
0
function startTwitterWidget()
{
    if (function_exists('register_sidebar_widget')) {
        function widget_twitterblog($args)
        {
            $before_widget = '';
            $before_title = '';
            $after_title = '';
            $after_widget = '';
            if (is_array($args)) {
                if (array_key_exists('before_widget', $args)) {
                    $before_widget = $args['before_widget'];
                }
                if (array_key_exists('before_title', $args)) {
                    $before_title = $args['before_title'];
                }
                if (array_key_exists('after_title', $args)) {
                    $after_title = $args['after_title'];
                }
                if (array_key_exists('after_widget', $args)) {
                    $after_widget = $args['after_widget'];
                }
                echo $before_widget;
                echo $before_title . 'Twitter Blog' . $after_title;
                displayTwitterPlugin();
                echo $after_widget;
            }
        }
        register_sidebar_widget('Twitter Blog', 'widget_twitterblog');
    }
}
Example #7
0
function widget_specials_init()
{
    if (function_exists('register_sidebar_widget')) {
        register_sidebar_widget(TXT_WPSC_PRODUCT_SPECIALS, 'widget_specials');
    }
    return;
}
Example #8
0
function nr_widget_init() {
    if ( !function_exists('register_sidebar_widget') )
        return;

    register_sidebar_widget(__('Now Reading', NRTD), 'nr_widget', null, 'now-reading');
    register_widget_control(__('Now Reading', NRTD), 'nr_widget_control', 300, 100, 'now-reading');
}
Example #9
0
/**
 * Initialize User Profile widget.  This includes all of the logic for managing and displaying the widget.
 */
function widget_user_profile_init()
{
    if (!function_exists('register_sidebar_widget')) {
        return;
    }
    /**
     * Display user profile widget.
     *
     * @param array $args widget configuration.
     */
    function widget_user_profile($args)
    {
        extract($args);
        $options = get_option('widget_user_profile');
        $title = $options['title'];
        echo $before_widget;
        echo $before_title . $title . $after_title;
        extended_profile($options['user']);
        echo $after_widget;
    }
    /**
     * Manage user profile widget.
     */
    function widget_user_profile_control()
    {
        $options = get_option('widget_user_profile');
        if (!is_array($options)) {
            $options = array('title' => 'User Profile', 'user' => false);
        }
        if ($_POST['profile_submit']) {
            $options['title'] = strip_tags(stripslashes($_POST['profile_title']));
            $options['user'] = strip_tags(stripslashes($_POST['profile_user']));
            update_option('widget_user_profile', $options);
        }
        $title = htmlspecialchars($options['title'], ENT_QUOTES);
        ?>

		<p style="text-align:right;">
			<label for="profile_title">Title:</label><br /> 
			<input style="width: 200px;" id="profile_title" name="profile_title" type="text" value="<?php 
        echo $title;
        ?>
" />
		</p>

		<p style="text-align:right;"><label for="profile_user">User:</label><br /> 
			<?php 
        wp_dropdown_users(array('selected' => $options['user'], 'name' => 'profile_user'));
        ?>
		</p>
		<style type="text/css"> #profile_user { width: 200px; } </style>

		<input type="hidden" id="profile_submit" name="profile_submit" value="1" />

		<?php 
    }
    register_sidebar_widget('User Profile', 'widget_user_profile');
    register_widget_control('User Profile', 'widget_user_profile_control');
}
function widget_latest_products_init()
{
    if (function_exists('register_sidebar_widget')) {
        register_sidebar_widget(__('Latest Products', 'wpsc'), 'widget_latest_products');
        register_widget_control(__('Latest Products', 'wpsc'), 'widget_latest_products_control');
    }
    return;
}
Example #11
0
function widget_checkout_init()
{
    if (function_exists('register_sidebar_widget')) {
        register_sidebar_widget('Brands and Categories', 'widget_checkout');
        #register_widget_control('Brands and Categories', 'widget_checkout_control', 300, 90);
    }
    return;
}
Example #12
0
function widget_price_range_init()
{
    if (function_exists('register_sidebar_widget')) {
        register_sidebar_widget(TXT_WPSC_PRICE_RANGE, 'widget_price_range');
        register_widget_control(TXT_WPSC_PRICE_RANGE, 'widget_price_range_control');
    }
    return;
}
function widget_admin_menu_init()
{
    if (function_exists('register_sidebar_widget')) {
        register_sidebar_widget(__('Admin Menu', 'wpsc'), 'widget_admin_menu');
        #register_widget_control('Admin Menu', 'widget_admin_menu', 300, 90);
    }
    return;
}
Example #14
0
function widget_latest_products_init()
{
    if (function_exists('register_sidebar_widget')) {
        register_sidebar_widget('Latest Products', 'widget_latest_products');
        #register_widget_control('Product', 'widget_product_tag', 300, 90);
    }
    return;
}
function widget_donations_init()
{
    if (function_exists('register_sidebar_widget')) {
        register_sidebar_widget(__('Product Donations', 'wpsc'), 'widget_donations');
        register_widget_control(__('Product Donations', 'wpsc'), 'widget_donations_control');
    }
    return;
}
function widget_wp_shopping_cart_init()
{
    if (function_exists('register_sidebar_widget')) {
        register_sidebar_widget('Shopping Cart', 'widget_wp_shopping_cart');
        register_widget_control('Shopping Cart', 'widget_wp_shopping_cart_control', 300, 90);
    }
    return;
}
function widget_latest_products_init()
{
    if (function_exists('register_sidebar_widget')) {
        register_sidebar_widget(TXT_WPSC_LATEST_PRODUCTS, 'widget_latest_products');
        register_widget_control(TXT_WPSC_LATEST_PRODUCTS, 'widget_latest_products_control');
    }
    return;
}
Example #18
0
function widget_price_range_init()
{
    if (function_exists('register_sidebar_widget')) {
        register_sidebar_widget(TXT_WPSC_PRICE_RANGE, 'widget_price_range');
        #register_widget_control('Product', 'widget_product_tag', 300, 90);
    }
    return;
}
Example #19
0
function widget_admin_menu_init()
{
    if (function_exists('register_sidebar_widget')) {
        register_sidebar_widget(TXT_WPSC_ADMINMENU, 'widget_admin_menu');
        #register_widget_control('Admin Menu', 'widget_admin_menu', 300, 90);
    }
    return;
}
function widget_price_range_init()
{
    if (function_exists('register_sidebar_widget')) {
        register_sidebar_widget(__('Price Range', 'wpsc'), 'widget_price_range');
        register_widget_control(__('Price Range', 'wpsc'), 'widget_price_range_control');
    }
    return;
}
Example #21
0
function DisplayForm()
{
    if (!function_exists('register_sidebar_widget')) {
        return;
    }
    register_sidebar_widget('Sendit Widget', 'JqueryForm');
    register_widget_control('Sendit Widget', 'Sendit_widget_options', 200, 200);
}
function thematic_widgets_init()
{
    // Define array for the widgetized areas
    $thematic_widgetized_areas = array('Header Widgets' => array('admin_menu_order' => 100, 'args' => array('name' => 'Header Widgets', 'id' => 'hdr-widgets', 'description' => __('The header widget area for additional mast head items.', 'thematic'), 'before_widget' => thematic_before_widget(), 'after_widget' => thematic_after_widget(), 'before_title' => thematic_before_title(), 'after_title' => thematic_after_title()), 'action_hook' => 'widget_area_header', 'function' => 'thematic_widget_header', 'priority' => 10), 'Primary Aside' => array('admin_menu_order' => 200, 'args' => array('name' => 'Primary Aside', 'id' => 'primary-aside', 'description' => __('The primary widget area, most often used as a sidebar.', 'thematic'), 'before_widget' => thematic_before_widget(), 'after_widget' => thematic_after_widget(), 'before_title' => thematic_before_title(), 'after_title' => thematic_after_title()), 'action_hook' => 'widget_area_primary_aside', 'function' => 'thematic_primary_aside', 'priority' => 10), 'Secondary Aside' => array('admin_menu_order' => 300, 'args' => array('name' => 'Secondary Aside', 'id' => 'secondary-aside', 'description' => __('The secondary widget area, most often used as a sidebar.', 'thematic'), 'before_widget' => thematic_before_widget(), 'after_widget' => thematic_after_widget(), 'before_title' => thematic_before_title(), 'after_title' => thematic_after_title()), 'action_hook' => 'widget_area_secondary_aside', 'function' => 'thematic_secondary_aside', 'priority' => 10), '1st Subsidiary Aside' => array('admin_menu_order' => 400, 'args' => array('name' => '1st Subsidiary Aside', 'id' => '1st-subsidiary-aside', 'description' => __('The 1st widget area in the footer.', 'thematic'), 'before_widget' => thematic_before_widget(), 'after_widget' => thematic_after_widget(), 'before_title' => thematic_before_title(), 'after_title' => thematic_after_title()), 'action_hook' => 'widget_area_subsidiaries', 'function' => 'thematic_1st_subsidiary_aside', 'priority' => 30), '2nd Subsidiary Aside' => array('admin_menu_order' => 500, 'args' => array('name' => '2nd Subsidiary Aside', 'id' => '2nd-subsidiary-aside', 'description' => __('The 2nd widget area in the footer.', 'thematic'), 'before_widget' => thematic_before_widget(), 'after_widget' => thematic_after_widget(), 'before_title' => thematic_before_title(), 'after_title' => thematic_after_title()), 'action_hook' => 'widget_area_subsidiaries', 'function' => 'thematic_2nd_subsidiary_aside', 'priority' => 50), '3rd Subsidiary Aside' => array('admin_menu_order' => 600, 'args' => array('name' => '3rd Subsidiary Aside', 'id' => '3rd-subsidiary-aside', 'description' => __('The 3rd widget area in the footer.', 'thematic'), 'before_widget' => thematic_before_widget(), 'after_widget' => thematic_after_widget(), 'before_title' => thematic_before_title(), 'after_title' => thematic_after_title()), 'action_hook' => 'widget_area_subsidiaries', 'function' => 'thematic_3rd_subsidiary_aside', 'priority' => 70), 'Index Top' => array('admin_menu_order' => 700, 'args' => array('name' => 'Index Top', 'id' => 'index-top', 'description' => __('The top widget area displayed on the index page.', 'thematic'), 'before_widget' => thematic_before_widget(), 'after_widget' => thematic_after_widget(), 'before_title' => thematic_before_title(), 'after_title' => thematic_after_title()), 'action_hook' => 'widget_area_index_top', 'function' => 'thematic_index_top', 'priority' => 10), 'Index Insert' => array('admin_menu_order' => 800, 'args' => array('name' => 'Index Insert', 'id' => 'index-insert', 'description' => __('The widget area inserted after x posts on the index page.', 'thematic'), 'before_widget' => thematic_before_widget(), 'after_widget' => thematic_after_widget(), 'before_title' => thematic_before_title(), 'after_title' => thematic_after_title()), 'action_hook' => 'widget_area_index_insert', 'function' => 'thematic_index_insert', 'priority' => 10), 'Index Bottom' => array('admin_menu_order' => 900, 'args' => array('name' => 'Index Bottom', 'id' => 'index-bottom', 'description' => __('The bottom widget area displayed on the index page.', 'thematic'), 'before_widget' => thematic_before_widget(), 'after_widget' => thematic_after_widget(), 'before_title' => thematic_before_title(), 'after_title' => thematic_after_title()), 'action_hook' => 'widget_area_index_bottom', 'function' => 'thematic_index_bottom', 'priority' => 10), 'Single Top' => array('admin_menu_order' => 1000, 'args' => array('name' => 'Single Top', 'id' => 'single-top', 'description' => __('The top widget area displayed on a single post.', 'thematic'), 'before_widget' => thematic_before_widget(), 'after_widget' => thematic_after_widget(), 'before_title' => thematic_before_title(), 'after_title' => thematic_after_title()), 'action_hook' => 'widget_area_single_top', 'function' => 'thematic_single_top', 'priority' => 10), 'Single Insert' => array('admin_menu_order' => 1100, 'args' => array('name' => 'Single Insert', 'id' => 'single-insert', 'description' => __('The widget area inserted between the post and the comments on a single post.', 'thematic'), 'before_widget' => thematic_before_widget(), 'after_widget' => thematic_after_widget(), 'before_title' => thematic_before_title(), 'after_title' => thematic_after_title()), 'action_hook' => 'widget_area_single_insert', 'function' => 'thematic_single_insert', 'priority' => 10), 'Single Bottom' => array('admin_menu_order' => 1200, 'args' => array('name' => 'Single Bottom', 'id' => 'single-bottom', 'description' => __('The bottom widget area displayed on a single post.', 'thematic'), 'before_widget' => thematic_before_widget(), 'after_widget' => thematic_after_widget(), 'before_title' => thematic_before_title(), 'after_title' => thematic_after_title()), 'action_hook' => 'widget_area_single_bottom', 'function' => 'thematic_single_bottom', 'priority' => 10), 'Page Top' => array('admin_menu_order' => 1300, 'args' => array('name' => 'Page Top', 'id' => 'page-top', 'description' => __('The top widget area displayed on a page.', 'thematic'), 'before_widget' => thematic_before_widget(), 'after_widget' => thematic_after_widget(), 'before_title' => thematic_before_title(), 'after_title' => thematic_after_title()), 'action_hook' => 'widget_area_page_top', 'function' => 'thematic_page_top', 'priority' => 10), 'Page Bottom' => array('admin_menu_order' => 1400, 'args' => array('name' => 'Page Bottom', 'id' => 'page-bottom', 'description' => __('The bottom widget area displayed on a page.', 'thematic'), 'before_widget' => thematic_before_widget(), 'after_widget' => thematic_after_widget(), 'before_title' => thematic_before_title(), 'after_title' => thematic_after_title()), 'action_hook' => 'widget_area_page_bottom', 'function' => 'thematic_page_bottom', 'priority' => 10));
    $thematic_widgetized_areas = apply_filters('thematic_widgetized_areas', $thematic_widgetized_areas);
    if (!function_exists('register_sidebars')) {
        return;
    }
    foreach ($thematic_widgetized_areas as $key => $value) {
        register_sidebar($thematic_widgetized_areas[$key]['args']);
        if (!has_action($thematic_widgetized_areas[$key]['action_hook'], $thematic_widgetized_areas[$key]['function'])) {
            add_action($thematic_widgetized_areas[$key]['action_hook'], $thematic_widgetized_areas[$key]['function'], $thematic_widgetized_areas[$key]['priority']);
        }
    }
    // we will check for a Thematic widgets directory and and add and activate additional widgets
    // Thanks to Joern Kretzschmar
    $widgets_dir = @dir(ABSPATH . '/wp-content/themes/' . get_template() . '/widgets');
    if ($widgets_dir) {
        while (($widgetFile = $widgets_dir->read()) !== false) {
            if (!preg_match('|^\\.+$|', $widgetFile) && preg_match('|\\.php$|', $widgetFile)) {
                include ABSPATH . '/wp-content/themes/' . get_template() . '/widgets/' . $widgetFile;
            }
        }
    }
    // we will check for the child themes widgets directory and add and activate additional widgets
    // Thanks to Joern Kretzschmar
    $widgets_dir = @dir(ABSPATH . '/wp-content/themes/' . get_stylesheet() . '/widgets');
    if (TEMPLATENAME != THEMENAME && $widgets_dir) {
        while (($widgetFile = $widgets_dir->read()) !== false) {
            if (!preg_match('|^\\.+$|', $widgetFile) && preg_match('|\\.php$|', $widgetFile)) {
                include ABSPATH . '/wp-content/themes/' . get_stylesheet() . '/widgets/' . $widgetFile;
            }
        }
    }
    // Remove WP default Widgets
    // WP 2.8 function using $widget_class
    if (function_exists('unregister_widget')) {
        unregister_widget('WP_Widget_Meta');
        unregister_widget('WP_Widget_Search');
        unregister_widget('');
        // pre WP 2.8 function using $id
    } else {
        unregister_widget_control('meta');
        unregister_widget_control('search');
    }
    // Finished intializing Widgets plugin, now let's load the thematic default widgets
    register_sidebar_widget(__('Search', 'thematic'), 'widget_thematic_search', null, 'search');
    unregister_widget_control('search');
    register_sidebar_widget(__('Meta', 'thematic'), 'widget_thematic_meta', null, 'meta');
    unregister_widget_control('meta');
    register_sidebar_widget(array(__('RSS Links', 'thematic'), 'widgets'), 'widget_thematic_rsslinks');
    register_widget_control(array(__('RSS Links', 'thematic'), 'widgets'), 'widget_thematic_rsslinks_control', 300, 90);
    // Pre-set Widgets
    $preset_widgets = array('primary-aside' => array('search', 'pages', 'categories', 'archives'), 'secondary-aside' => array('links', 'rss-links', 'meta'));
    if (isset($_GET['activated'])) {
        update_option('sidebars_widgets', apply_filters('thematic_preset_widgets', $preset_widgets));
    }
}
 function mwm_aalLoader()
 {
     $this->upgra_options();
     $this->load_options();
     $this->define_constants();
     $this->load_dependencies();
     register_activation_hook(plugin_basename(dirname(__FILE__)) . '/auto-anchor-list.php', array(&$this, 'activate'));
     register_sidebar_widget('Better Anchor Links', array(&$this, 'widget'));
 }
Example #24
0
function widget_suscribe_init()
{
    if (!function_exists('register_sidebar_widget') || !function_exists('register_widget_control')) {
        return;
    }
    function widget_subscribe_form()
    {
        return "<form method='post' action='" . get_option('home') . "'>" . "<input type='hidden' name='suscribe' value='true' />" . "<input type='submit' value='Suscríbete'' />" . "</form>";
    }
    function widget_unsubscribe_form()
    {
        return "<form method='post' action='" . get_option('home') . "'>" . "<input type='hidden' name='unsuscribe' value='true' />" . "<input type='submit' value='Desuscríbete'' />" . "</form>";
    }
    function widget_suscribe()
    {
        global $wpdb, $current_user;
        $options = get_option('widget_suscribe');
        $before_widget = "<li id='subscribe'>";
        $before_title = "<h2>";
        $title = empty($options['title']) ? 'Suscr&iacute;bete a este blog' : $options['title'];
        $after_title = "</h2>";
        $content = "";
        $after_widget = "</li>";
        //error_log("[widget subscribe] current blog: ". $wpdb->blogid);
        //error_log("[widget subscribe] current user: "******"[widget subscribe] is blog user");
            // User wants to unsubscribe
            if (isset($_POST['unsuscribe'])) {
                //error_log("[widget subscribe] POST[unsuscribe]");
                remove_user_from_blog($current_user->ID, $wpdb->blogid);
                $content .= '<p>Te has desuscrito de este blog</p>';
                $content .= widget_subscribe_form();
            } elseif ($current_user->has_cap('subscriber')) {
                //error_log("[widget subscribe] has_cap('subscriber')");
                $content .= widget_unsubscribe_form();
            } elseif ($current_user->has_cap('edit_posts')) {
                $content .= "<p>Este blog tiene activado el widget de suscripci&oacute;n</p>";
            }
        } else {
            //error_log("[widget subscribe] not in log");
            // User wants to subscribe
            if (isset($_POST['suscribe'])) {
                //error_log("[widget subscribe] POST[suscribe]");
                add_user_to_blog($wpdb->blogid, $current_user->ID, 'subscriber');
                $content .= '<p>Te has suscrito a este blog</p>';
                $content .= widget_unsubscribe_form();
            } else {
                //error_log("[widget subscribe] subscribe form");
                $content .= widget_subscribe_form();
            }
        }
        echo $before_widget . $before_title . $title . $after_title . $content . $after_widget;
    }
    register_sidebar_widget('Suscripcion', 'widget_suscribe');
}
 function init_diamondRP()
 {
     add_shortcode('diamond-post', array($this, 'diamond_post_handler'));
     if (!function_exists('register_sidebar_widget') || !function_exists('register_widget_control')) {
         return;
     }
     register_sidebar_widget(array(__('Diamond Recent Posts', 'diamond'), 'widgets'), array($this, 'widget_endView'));
     register_widget_control(array(__('Diamond Recent Posts', 'diamond'), 'widgets'), array($this, 'widget_controlView'));
 }
Example #26
0
function jal_on_plugins_loaded()
{
    if (function_exists('register_sidebar_widget')) {
        register_sidebar_widget("Shoutbox", 'widget_wordspew');
    }
    if (function_exists('register_widget_control')) {
        register_widget_control("Shoutbox", "widget_wordspew_control", 250, 80);
    }
}
function openlylocal_init()
{
    register_sidebar_widget(__('Upcoming council meetings'), 'ol_upcoming_meetings_widget');
    register_widget_control('Upcoming council meetings', 'ol_upcoming_meetings_widget_options');
    // Check for OLUM widget settings, if none create defaults
    if (!get_option('olum_widget')) {
        $olum_defaults = array('title' => __('Upcoming council meetings'), 'pre_text' => '', 'authority' => 1);
        add_option('olum_widget', $olum_defaults);
    }
}
Example #28
0
function thesis_register_widgets()
{
    register_sidebar_widget(__('Search', 'thesis'), 'thesis_widget_search');
    register_widget_control(__('Search', 'thesis'), 'thesis_widget_search_control');
    register_sidebar_widget(__('Subscriptions', 'thesis'), 'thesis_widget_subscriptions');
    register_widget_control(__('Subscriptions', 'thesis'), 'thesis_widget_subscriptions_control');
    register_sidebar_widget(__('Google Custom Search', 'thesis'), 'thesis_widget_google_cse');
    register_widget_control(__('Google Custom Search', 'thesis'), 'thesis_widget_google_cse_control');
    add_action('widgets_init', 'thesis_register_multiple_widgets');
}
Example #29
0
 /**
  * Adds the widget to WP using the hooks.
  * 
  */
 function bookx_widget_init()
 {
     if (!function_exists("register_sidebar_widget")) {
         return;
     }
     register_sidebar_widget('BookX', array($this, 'bookx_widget_sidebar'));
     register_sidebar_widget('BookX Search', array($this, 'bookx_search_widget_sidebar'));
     register_widget_control('BookX', array($this, 'bookx_widget_admin'));
     register_widget_control('BookX Search', array($this, 'bookx_search_widget_admin'));
 }
Example #30
0
function widget_product_tag_init()
{
    if (function_exists('register_sidebar_widget')) {
        //$widget_ops = array('classname' => 'widget_pages', 'description' => __( "Your blog's WordPress Pages") );
        //wp_register_sidebar_widget('pages', __('Pages'), 'wp_widget_pages', $widget_ops);
        register_sidebar_widget(TXT_WPSC_PRODUCT_TAGS, 'widget_product_tag');
        register_widget_control(TXT_WPSC_PRODUCT_TAGS, 'widget_product_tag_control');
    }
    return;
}