views:

13

answers:

0

Does anyone know if it's possible to access a widget instance settings from a different function than widget(), update() or form() ?

For example, in the widget below I want to get the $args and $instance variables from within my_custom_function().

class test extends WP_Widget{
  ...
  function test(){
    ...
  }

  function my_custom_function(){
    // how to access $args and $instance here?
  }

  function widget($args, $instance) {
    ...
  }

  function update($new_instance, $old_instance){
    ...
    return $instance;
   }

  function form($instance){
    ...
  }
}