[wp-trac] [WordPress Trac] #14686: Widget Instance Form Update Bug

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 25 02:14:05 UTC 2010


#14686: Widget Instance Form Update Bug
---------------------------+------------------------------------------------
 Reporter:  digitalnature  |       Owner:                           
     Type:  defect (bug)   |      Status:  new                      
 Priority:  normal         |   Milestone:  Awaiting Review          
Component:  Widgets        |     Version:  3.0.1                    
 Severity:  normal         |    Keywords:  widgets reporter-feedback
---------------------------+------------------------------------------------

Comment(by digitalnature):

 a basic example:
 {{{
 class test_widget extends WP_Widget{
   function test_widget(){
     $this->WP_Widget(false, 'test');
   }

   function widget($args, $instance){
     echo 'front-end';
   }

   function form($instance){
     print_r($this);
   }
 }
 add_action('widgets_init', create_function('',
 'register_widget("test_widget");'));

 }}}

 $this->id, $this->number and other variables are only available after you
 press the Save button.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14686#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list