Aercoustics required updates
Showing
2 changed files
with
33 additions
and
3 deletions
| ... | @@ -20,10 +20,11 @@ class MenuWidget extends WP_Widget { | ... | @@ -20,10 +20,11 @@ class MenuWidget extends WP_Widget { |
| 20 | public function widget($args, $instance) { | 20 | public function widget($args, $instance) { |
| 21 | static $all_pages = false; | 21 | static $all_pages = false; |
| 22 | 22 | ||
| 23 | $display_container = false; | ||
| 23 | foreach ($instance['pages'] as $page) { | 24 | foreach ($instance['pages'] as $page) { |
| 24 | if ($instance['inclusive'] == 0) { | 25 | if ($instance['inclusive'] == 0) { |
| 25 | $instance['child_of'] = $page; | 26 | $instance['child_of'] = $page; |
| 26 | _list_pages($instance); | 27 | _list_pages($instance); // I should probably have the before/after from args in here . . . |
| 27 | continue; | 28 | continue; |
| 28 | } | 29 | } |
| 29 | 30 | ||
| ... | @@ -45,9 +46,18 @@ class MenuWidget extends WP_Widget { | ... | @@ -45,9 +46,18 @@ class MenuWidget extends WP_Widget { |
| 45 | $instance['exclude'] .= $wp_page->ID; | 46 | $instance['exclude'] .= $wp_page->ID; |
| 46 | } | 47 | } |
| 47 | } | 48 | } |
| 48 | 49 | ||
| 50 | if (!$display_container && !empty($args['before_widget'])) { | ||
| 51 | echo $args['before_widget']; | ||
| 52 | $display_container = true; | ||
| 53 | } | ||
| 54 | |||
| 49 | _list_pages($instance); | 55 | _list_pages($instance); |
| 50 | } | 56 | } |
| 57 | |||
| 58 | if ($display_container) { | ||
| 59 | echo $args['after_widget']; | ||
| 60 | } | ||
| 51 | } | 61 | } |
| 52 | 62 | ||
| 53 | public function update($new_instance, $old_instance) { | 63 | public function update($new_instance, $old_instance) { | ... | ... |
| ... | @@ -88,4 +88,24 @@ function _dropdown_pages() { | ... | @@ -88,4 +88,24 @@ function _dropdown_pages() { |
| 88 | $params = func_get_args(); | 88 | $params = func_get_args(); |
| 89 | return call_user_func_array('wp_dropdown_pages', $params); | 89 | return call_user_func_array('wp_dropdown_pages', $params); |
| 90 | } | 90 | } |
| 91 | ?> | 91 | |
| 92 | function _attachment_is_image() { | ||
| 93 | $params = func_get_args(); | ||
| 94 | return call_user_func_array('wp' . __FUNCTION__, $params); | ||
| 95 | } | ||
| 96 | |||
| 97 | function _get_attachment_thumb_url() { | ||
| 98 | $params = func_get_args(); | ||
| 99 | return call_user_func_array('wp' . __FUNCTION__, $params); | ||
| 100 | } | ||
| 101 | |||
| 102 | function _get_attachment_metadata() { | ||
| 103 | $params = func_get_args(); | ||
| 104 | return call_user_func_array('wp' . __FUNCTION__, $params); | ||
| 105 | } | ||
| 106 | |||
| 107 | function _get_attachment_url() { | ||
| 108 | $params = func_get_args(); | ||
| 109 | return call_user_func_array('wp' . __FUNCTION__, $params); | ||
| 110 | } | ||
| 111 | ?> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment