コード例 #1
0
ファイル: frontend.php プロジェクト: vanie3/appland
/**
 * Creates a logo that is shown on mobile sized screens
 *
 * @return void
 * @since 1.0
 **/
function oxy_create_mobile_logo()
{
    $menu_items = oxy_get_menu_items();
    if (null !== $menu_items) {
        foreach ($menu_items as $menu) {
            if ('oxy_section' == $menu->object) {
                $has_logo = get_post_meta($menu->object_id, THEME_SHORT . '_section_logo', true);
                if ($has_logo) {
                    $menu->url = oxy_get_home_url() . '/#' . oxy_string_to_id($menu->title);
                    echo oxy_create_logo($menu);
                }
            }
        }
    }
}
コード例 #2
0
ファイル: content-sections.php プロジェクト: vanie3/appland
/**
 * Displays the main body of the theme
 *
 * @package AppLand
 * @subpackage Frontend
 * @since 1.0
 *
 * @copyright (c) 2013 Oxygenna.com
 * @license http://wiki.envato.com/support/legal-terms/licensing-terms/
 * @version 1.2.2
 */
get_header();
?>
    <div id="content" role="main">
        <?php 
$menu_items = oxy_get_menu_items();
$sections = array();
$non_sticky = array();
// check for any sticky sections that need to go first
if ($menu_items) {
    foreach ($menu_items as $menu_item) {
        if ('oxy_section' == $menu_item->object) {
            $sticky = get_post_meta($menu_item->object_id, THEME_SHORT . '_sticky_section', true);
            if ($sticky) {
                $sections[] = $menu_item;
            } else {
                $non_sticky[] = $menu_item;
            }
        }
    }
}