Title: [Plugin: Twitter Tools] register_widget problems (deprecated)
Last modified: August 20, 2016

---

# [Plugin: Twitter Tools] register_widget problems (deprecated)

 *  [George Stephanis](https://wordpress.org/support/users/georgestephanis/)
 * (@georgestephanis)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-twitter-tools-register_widget-problems-deprecated/)
 * You’re still using `register_sidebar_widget` and `register_widget_control` — 
   not the newer functions. Around lines 950 and 980 in twitter-tools.php, please
   change the following lines as noted:
 * Line 950:
 *     ```
       // OLD:
       	register_sidebar_widget(array(__('Twitter Tools', 'twitter-tools'), 'widgets'), 'aktt_widget');
       // NEW:
       	wp_register_sidebar_widget( 'twitter-tools', __('Twitter Tools', 'twitter-tools'), 'aktt_widget' );
       ```
   
 * Line 980:
 *     ```
       // OLD:
       	register_widget_control(array(__('Twitter Tools', 'twitter-tools'), 'widgets'), 'aktt_widget_control', 300, 100);
       // NEW:
       	wp_register_widget_control( 'twitter-tools', __('Twitter Tools', 'twitter-tools'), 'aktt_widget_control', array( 'width' => 300 ) );
       ```
   
 * [http://wordpress.org/extend/plugins/twitter-tools/](http://wordpress.org/extend/plugins/twitter-tools/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [George Stephanis](https://wordpress.org/support/users/georgestephanis/)
 * (@georgestephanis)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-twitter-tools-register_widget-problems-deprecated/#post-2458449)
 * Also, in twitter-tools.php, around line 2065 … please change 10 and 2 to ‘manage_options’
   and ‘publish_posts’ respectively.
 *     ```
       function aktt_menu_items() {
       	if (current_user_can('manage_options')) {
       		add_options_page(
       			__('Twitter Tools Options', 'twitter-tools')
       			, __('Twitter Tools', 'twitter-tools')
       			, 10
       			, basename(__FILE__)
       			, 'aktt_options_form'
       		);
       	}
       	if (current_user_can('publish_posts')) {
       		add_submenu_page(
       			'post-new.php'
       			, __('New Tweet', 'twitter-tools')
       			, __('Tweet', 'twitter-tools')
       			, 2
       			, basename(__FILE__)
       			, 'aktt_admin_tweet_form'
       		);
       	}
       }
       ```
   
 * becomes
 *     ```
       function aktt_menu_items() {
       	if (current_user_can('manage_options')) {
       		add_options_page(
       			__('Twitter Tools Options', 'twitter-tools')
       			, __('Twitter Tools', 'twitter-tools')
       			, 'manage_options'
       			, basename(__FILE__)
       			, 'aktt_options_form'
       		);
       	}
       	if (current_user_can('publish_posts')) {
       		add_submenu_page(
       			'post-new.php'
       			, __('New Tweet', 'twitter-tools')
       			, __('Tweet', 'twitter-tools')
       			, 'publish_posts'
       			, basename(__FILE__)
       			, 'aktt_admin_tweet_form'
       		);
       	}
       }
       ```
   
 * this is generating deprecated errors with wp_debug turned on.
 *  Thread Starter [George Stephanis](https://wordpress.org/support/users/georgestephanis/)
 * (@georgestephanis)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-twitter-tools-register_widget-problems-deprecated/#post-2458456)
 * Also, line 2045 ( also in twitter-tools.php ):
 * `$posted_meta = $_POST['aktt_notify_twitter'];`
 * becomes
 * `$posted_meta = isset($_POST['aktt_notify_twitter'])?$_POST['aktt_notify_twitter']:
   null;`

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Twitter Tools] register_widget problems (deprecated)’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/twitter-tools_a9c9d7.svg)
 * [Tools for Twitter](https://wordpress.org/plugins/twitter-tools/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/twitter-tools/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/twitter-tools/)
 * [Active Topics](https://wordpress.org/support/plugin/twitter-tools/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/twitter-tools/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/twitter-tools/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [George Stephanis](https://wordpress.org/support/users/georgestephanis/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-twitter-tools-register_widget-problems-deprecated/#post-2458456)
 * Status: not resolved