コード例 #1
0
ファイル: frontend.php プロジェクト: vanie3/appland
 function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output)
 {
     switch ($element->object) {
         case 'oxy_section':
             $element->url = oxy_get_home_url() . '/#' . oxy_string_to_id($element->title);
             $has_logo = get_post_meta($element->object_id, THEME_SHORT . '_section_logo', true);
             if ($has_logo) {
                 $output .= '<li>' . oxy_create_logo($element) . '</li>';
                 return;
             }
         default:
             $element->is_dropdown = !empty($children_elements[$element->ID]);
             if ($element->is_dropdown) {
                 if ($depth === 0) {
                     $element->classes[] = 'dropdown';
                 } elseif ($depth === 1) {
                     $element->classes[] = 'dropdown-submenu';
                 }
             }
             parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
             break;
     }
 }
コード例 #2
0
ファイル: content-page.php プロジェクト: vanie3/appland
 *
 * @package AppLand
 * @subpackage Admin
 * @since 1.0
 *
 * @copyright (c) 2013 Oxygenna.com
 * @license http://wiki.envato.com/support/legal-terms/licensing-terms/
 * @version 1.2.2
 */
get_header();
global $post;
$custom = get_post_custom($post->ID);
?>

<section class="section" id="<?php 
echo oxy_string_to_id(get_the_title());
?>
">
    <div class="container">
        <?php 
while (have_posts()) {
    the_post();
    ?>
        <?php 
    include locate_template('partials/header-titles.php');
    ?>
        <?php 
    if (has_post_thumbnail()) {
        $img = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
        $img_link = is_single() ? $img[0] : get_permalink();
        echo '<figure class="feature-image">';