<?php
-if (!function_exists('glmAddSubs')) {
- $ancestorId = null;
- $includePages = array();
- $frontPageId = get_option('page_on_front');
- function glm_get_quicksite_option($name)
+
+$ancestorId = null;
+$includePages = array();
+$frontPageId = get_option('page_on_front');
+add_action('widgets_init', 'glm_quicksite_widget_init');
+
+if (!function_exists('glm_quicksite_widget_init')) {
+
+ function glm_quicksite_widget_init()
{
- $settings = get_option('glmQuickSite_settings');
- $states = get_option('glmQuickSite_states');
- if ($name == 'stateFull' && $settings['state']) {
- return $states[$settings['state']];
- }
- if ($name == 'state2Full' && $settings['state2']) {
- return $states[$settings['state2']];
- }
- return ($settings && $settings[$name]) ? $settings[$name]: null;
+ register_sidebar(array(
+ 'name' => __('Left Sidebar'),
+ 'id' => 'sidebar-l',
+ 'description' => __('Appears in Left Sidebar')
+ ));
+ register_sidebar(array(
+ 'name' => __('Footer'),
+ 'id' => 'sidebar-f',
+ 'description' => __('Appears in Footer Area')
+ ));
}
+
+}
+
+if (!function_exists('glm_wp_list_pages')) {
+
function glm_wp_list_pages()
{
global $ancestorId, $includePages, $post;
)
);
}
+
+}
+if (!function_exists('glmAddSubs')) {
+
function glmAddSubs()
{
global $includePages, $post;
$includePages[] = $page->ID;
}
}
+
+}
+if (!function_exists('glmAddDescendants')) {
+
function glmAddDescendants($glmPost)
{
global $includePages, $frontPageId, $ancestorId;
if ($glmPost->ID != $frontPageId) {
$includePages[] = "{$glmPost->ID}";
- $ancestorId = $glmPost->ID;
- $descendants = get_pages(array('child_of' => $ancestorId));
+ $ancestorId = $glmPost->ID;
+ $descendants = get_pages(array('child_of' => $ancestorId));
} else {
$ancestorId = $frontPageId;
}
if (isset($descendants) && $descendants) {
foreach ($descendants as $page) {
- if (($page->post_parent == $ancestorId) &&
- ($page->post_parent == $glmPost->ID))
- {
+ if (($page->post_parent == $ancestorId) &&
+ ($page->post_parent == $glmPost->ID)) {
$includePages[] = $page->ID;
}
}
}
}
+
+}
+if (!function_exists('glmAddParent')) {
+
function glmAddParent($glmPost)
{
global $includePages, $frontPageId, $ancestorId;
$includePages[] = "{$glmPost->post_parent}";
- $parents = get_post_ancestors($glmPost->ID);
+ $parents = get_post_ancestors($glmPost->ID);
foreach ($parents as $page) {
$includePages[] = $page;
}
}
+
+}
+if (!function_exists('glmAddSiblings')) {
+
function glmAddSiblings($glmPost)
{
global $includePages, $frontPageId, $ancestorId;
glmAddDescendants(get_post($glmPost->post_parent));
}
+
}
?>