Example #1
0
xt_init_page($__page, $__page_name);
//init
xt_list_widget_controls($__page);
?>
	</div>
	<div id="X_Bd-Widgets-Available-Box" style="display:none;">
		<div class="widget-list">
		<?php 
xt_list_widgets();
?>
		</div>
		<br class='clear' />
	</div>
	<div id="X_Ft" class="container X_Grid" data-value="footer" data-widgets="X_Ft-Widgets-Available-Box" style="margin-top:20px;">
		<?php 
xt_init_page('footer', '页尾');
//init
xt_list_widget_controls('footer');
?>
	</div>
	<div id="X_Ft-Widgets-Available-Box" style="display:none;">
		<div class="widget-list">
		<?php 
xt_list_widgets();
?>
		</div>
		<br class='clear' />
	</div>
</div>

<div id="X_Widgets-Layout-Box" style="display:none;">
Example #2
0
function xt_get_page_footer()
{
    global $xt_template_name;
    if (empty($xt_template_name)) {
        global $wp_query;
        $xt_template_name = $wp_query->post->ID;
    }
    if (!empty($xt_template_name)) {
        $headerAndFooters = get_option(XT_OPTION_PAGE_HEADER_FOOTER);
        if (!empty($headerAndFooters) && isset($headerAndFooters[$xt_template_name])) {
            $footer = $headerAndFooters[$xt_template_name]['footer'];
            xt_dynamic_page(xt_init_page($footer, '', true));
        } else {
            xt_dynamic_page(xt_init_page('footer', '', true));
        }
    }
}