id summary reporter owner description type status priority milestone component version severity resolution keywords cc focuses 11387 Walker Widget System ShaneF ShaneF "This is a new system for Widgets. The design for this system is based on the fact that every theme is different. Currently the widget system does not care about one theme. It will still output it's own formating structure based on it's design and then bassed on a messy 'register_sidebar' arguments wrap that data inside one another. The idea behind a Walker Widget system is that instead of the Widget outputing the data, it send it to a Walker where it assigns the relevant information and the theme's ""Widget Design"" class holds how Widget boxes are created based on the values pushed through the walker. For example in my theme functions.php file: {{{ class Walker_Widget_Rabbit extends Walker_Widget { function start_widget($args, &$output) { // @todo Updated with the correct vars. $output .= do_action('sidebar_before_module', $id); $output .= do_action('sidebar_before_module_' . $id); $output .= sprintf( ""
"", $args['widget_id'], $args['classname'] ); } function title_widget($args, &$output) { $output .= ""

"" . $args['title'] . ""

""; /* if ((bool) $this->get_option('scrolling') && $scroll['enabled']) { printf(__(""navi: prev / next""), $scroll['key'], $scroll['key']); } */ } function content_widget($args, &$output) { $output .= ""
"" . $this->content_style($args, $args['output']) . ""
""; } function content_style($args, $output) { /* * Here I am going to figure out how we are going to wrap most content * and detirme if the information is scrolled information. */ $style = $args['style']; switch ($style) { case 'none': $style = $output; break; default: $style = """"; } return $style; } function content_scroll($args, $area = 'top') { // @todo
and
} function end_widget($args, &$output) { $output .= ""
""; // @todo Updated with the correct vars. $output .= do_action('sidebar_after_module', $id); $output .= do_action('sidebar_after_module_' . $id); } } }}} This also allows users to manipulate the data/design even further once they get it from the widget. I have tested this on the default theme of WordPress with the all 12 of the built in WordPress widgets and they act/look just like if it was hardcoded into the system itself. " enhancement closed normal Widgets normal wontfix has-patch