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'); }
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'); }
/** * 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'); } }
/** * 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_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 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 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; }
function widget_specials_init() { if (function_exists('register_sidebar_widget')) { register_sidebar_widget(TXT_WPSC_PRODUCT_SPECIALS, 'widget_specials'); register_widget_control(TXT_WPSC_PRODUCT_SPECIALS, 'widget_specials_control'); } return; }
function widget_donations_init() { if (function_exists('register_sidebar_widget')) { register_sidebar_widget(TXT_WPSC_DONATIONS, 'widget_donations'); register_widget_control(TXT_WPSC_DONATIONS, '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(__('Latest Products', 'wpsc'), 'widget_latest_products'); register_widget_control(__('Latest Products', 'wpsc'), 'widget_latest_products_control'); } return; }
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_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; }
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 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 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')); }
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'); }
function init() { add_filter("plugin_action_links_{$plugin}", array(&$this, 'link')); load_plugin_textdomain($this->_folder, false, $this->_folder); if (!function_exists('register_sidebar_widget') || !function_exists('register_widget_control')) { return; } register_sidebar_widget($this->_name, array(&$this, "widget")); register_widget_control($this->_name, array(&$this, "control"), $this->_width, $this->_height); }
/** * 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')); }
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); } }
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; }
function widget_subscribe2widget_init() { //Check Sidebar Widget and Subscribe2 plugins are activated if (!function_exists('register_sidebar_widget') || !class_exists('s2class')) { return; } function widget_subscribe2widget($args) { extract($args); $options = get_option('widget_subscribe2widget'); $title = empty($options['title']) ? __('Subscribe2') : $options['title']; ?> <?php echo $before_widget; ?> <?php echo $before_title . $title . $after_title; ?> <div class="search"> <?php $content = apply_filters('the_content', '<p><!--subscribe2--></p>'); echo $content; ?> </div> <?php echo $after_widget; } function widget_subscribe2widget_control() { $options = $newoptions = get_option('widget_subscribe2widget'); if ($_POST["s2w-submit"]) { $newoptions['title'] = strip_tags(stripslashes($_POST["s2w-title"])); } if ($options != $newoptions) { $options = $newoptions; update_option('widget_subscribe2widget', $options); } $title = htmlspecialchars($options['title'], ENT_QUOTES); ?> <p><label for="s2w-title"><?php _e('Title:'); ?> <input style="width: 250px;" id="s2w-title" name="s2w-title" type="text" value="<?php echo $title; ?> " /></label></p> <input type="hidden" id="s2w-submit" name="s2w-submit" value="1" /> <?php } // This registers our widget so it appears with the other available // widgets and can be dragged and dropped into any active sidebars. register_sidebar_widget('Subscribe2Widget', 'widget_subscribe2widget'); // This registers our optional widget control form. register_widget_control('Subscribe2Widget', 'widget_subscribe2widget_control'); }
function admin_widget_init() { // check for the required API functions if (!function_exists('register_sidebar_widget') || !function_exists('register_widget_control')) { return; } // Tell Dynamic Sidebar about our new widget and its control register_sidebar_widget(array('Subscribe 2 widget', 'widgets'), array('subscribe2_widget', 'frontend_widget_init')); // this registers the widget control form register_widget_control(array('Subscribe 2 widget', 'widgets'), array('subscribe2_widget', 'admin_widget_controls'), 335, 700); }
/** * bp_component_register_widgets() * * This function will register your widgets so that they will show up on the widget list * for site administrators to drop into their widget zones. */ function bp_zoneideas_register_widgets() { global $current_blog; /* Site welcome widget */ register_sidebar_widget(__('Cool zoneideas Widget', 'bp-zoneideas'), 'bp_zoneideas_widget_cool_widget'); register_widget_control(__('Cool zoneideas Widget', 'bp-zoneideas'), 'bp_zoneideas_widget_cool_widget_control'); /* Include the javascript needed for activated widgets only */ if (is_active_widget('bp_zoneideas_widget_cool_widget')) { wp_enqueue_script('bp_zoneideas_widget_cool_widget-js', site_url(MUPLUGINDIR . '/bp-zoneideas/js/widget-zoneideas.js'), array('jquery', 'jquery-livequery-pack')); } }
function TanTanFlickrWidget() { if (function_exists('register_sidebar_widget')) { register_sidebar_widget('Flickr Sidebar', array(&$this, 'display')); register_widget_control('Flickr Sidebar', array(&$this, 'control')); } $options = get_option('silas_flickr_widget'); if ($options['animate']) { add_action('wp_head', array(&$this, 'animationHeader')); add_action('wp_footer', array(&$this, 'animationFooter')); } }
function _load_widgets() { global $wp_version; if (version_compare($wp_version, "2.8", ">=")) { if (class_exists('WP_Widget')) { register_widget('PluginWonderfulWidget'); } } else { register_sidebar_widget(__('Plugin Wonderful', 'plugin-wonderful'), array(&$this, 'render_pre28_widget')); register_widget_control(__('Plugin Wonderful', 'plugin-wonderful'), array(&$this, 'render_pre28_widget_control')); } }
function init() { // Check for the required plugin functions. This will prevent fatal // errors occurring when you deactivate the dynamic-sidebar plugin. if (!function_exists('register_sidebar_widget')) { return; } $widget = new AceCategoriesWidget(); // This registers our widget so it appears with the other available // widgets and can be dragged and dropped into any active sidebars. register_sidebar_widget('ACE Categories', array($widget, 'display')); // This registers our optional widget control form. register_widget_control('ACE Categories', array($widget, 'control'), 280, 300); }
function register_core_widgets() { $dir = $this->root_dir . '/widgets/'; $widgets = scandir($dir); foreach ($widgets as $widget) { $widget_class = substr($widget, 0, -strlen('.php')); if (!($widget == '.' || $widget == '..')) { include $dir . $widget; $widget_obj = new $widget_class(); register_sidebar_widget($widget_obj->name, array($widget_class, 'widget')); register_widget_control($widget_obj->name, array($widget_class, 'control')); } } }
function _init() { wp_register_sidebar_widget('hubblesite-daily-image', __("HubbleSite Daily Image", "hubblesite-daily-image-widget"), array(&$this, "render"), array('description' => __('Embed a daily HubbleSite Gallery image on your WordPress blog.', 'hubblesite-daily-image-widget'))); register_widget_control(__("HubbleSite Daily Image", "hubblesite-daily-image-widget"), array(&$this, "render_ui")); if (!$skip_load_data) { if (!$this->_load_data()) { add_action("admin_notices", array(&$this, "_connection_warning")); } } else { $this->data = false; } $this->handle_post(); $this->get_display_options(); }
function widget_wp_shopping_cart_init() { if (function_exists('register_sidebar_widget')) { $widget_ops['description'] = "Your most used tags in cloud format"; register_sidebar_widget('Shopping Cart', 'widget_wp_shopping_cart', $widget_ops); register_widget_control('Shopping Cart', 'widget_wp_shopping_cart_control'); $GLOBALS['wpsc_cart_widget'] = true; if (get_option('cart_location') == 1) { update_option('cart_location', 4); remove_action('wp_list_pages', 'nzshpcrt_shopping_basket'); } #register_widget_control('Shopping Cart', 'widget_wp_shopping_cart_control', 300, 90); } return; }