0feae26e by Chris Boden

Aercoustics required updates

1 parent e9a070c8
......@@ -20,10 +20,11 @@ class MenuWidget extends WP_Widget {
public function widget($args, $instance) {
static $all_pages = false;
$display_container = false;
foreach ($instance['pages'] as $page) {
if ($instance['inclusive'] == 0) {
$instance['child_of'] = $page;
_list_pages($instance);
_list_pages($instance); // I should probably have the before/after from args in here . . .
continue;
}
......@@ -45,9 +46,18 @@ class MenuWidget extends WP_Widget {
$instance['exclude'] .= $wp_page->ID;
}
}
if (!$display_container && !empty($args['before_widget'])) {
echo $args['before_widget'];
$display_container = true;
}
_list_pages($instance);
}
if ($display_container) {
echo $args['after_widget'];
}
}
public function update($new_instance, $old_instance) {
......
......@@ -88,4 +88,24 @@ function _dropdown_pages() {
$params = func_get_args();
return call_user_func_array('wp_dropdown_pages', $params);
}
?>
function _attachment_is_image() {
$params = func_get_args();
return call_user_func_array('wp' . __FUNCTION__, $params);
}
function _get_attachment_thumb_url() {
$params = func_get_args();
return call_user_func_array('wp' . __FUNCTION__, $params);
}
function _get_attachment_metadata() {
$params = func_get_args();
return call_user_func_array('wp' . __FUNCTION__, $params);
}
function _get_attachment_url() {
$params = func_get_args();
return call_user_func_array('wp' . __FUNCTION__, $params);
}
?>
\ No newline at end of file
......