function ut_list_icons($content = null)
    {
        $output = '<div class="ut-icon-list">';
        $counter = 1;
        foreach (ut_recognized_icons() as $icon) {
            $last = '';
            $clear = '';
            if ($counter == 5) {
                $last = 'ut-column-last';
                $clear = '<div class="clear"></div>';
            }
            $output .= '<div class="ut-one-fifth ' . $last . '">
							<p>
								<i class="fa ' . $icon . ' icon-list-item" style="margin-right:5px;"></i> ' . $icon . '
							</p>
						</div>' . $clear;
            if ($counter == 5) {
                $counter = 1;
            } else {
                $counter++;
            }
        }
        $output .= '</div>';
        return $output;
    }
    public function meta_box_content()
    {
        global $post_ID;
        ?>
        
        
        <div id="ut-option-switch-wrap">
            
            <div id="ut-option-switch"></div>
            
        </div>
        
        <?php 
        /* check if video background is active and check if current page is a section */
        if (ot_get_option('ut_front_video_containment', 'hero') == 'body' && get_post_meta($post_ID, 'ut_page_type', true) == 'section' && get_post_type($post_ID) == 'page') {
            /* now check if current page has a background image */
            $ut_parallax_image = get_post_meta($post_ID, 'ut_parallax_image', true);
            if (is_array($ut_parallax_image) && !empty($ut_parallax_image['background-image'])) {
                $bg_image = true;
            } elseif (!is_array($ut_parallax_image) && !empty($ut_parallax_image)) {
                $bg_image = true;
            } else {
                $bg_image = false;
            }
            /* now check if current page has a background color */
            $bg_color = get_post_meta($post_ID, 'ut_section_video_bgcolor', true);
            /* now check if current page has a background image */
            $ut_video_poster = get_post_meta($post_ID, 'ut_section_video_poster', true);
            if (is_array($ut_video_poster) && !empty($ut_video_poster['background-image'])) {
                $bg_poster = true;
            } elseif (!is_array($ut_video_poster) && !empty($ut_video_poster)) {
                $bg_poster = true;
            } else {
                $bg_poster = false;
            }
            /* display a message when none of these fields are available */
            if (!$bg_image && empty($bg_color) && !$bg_poster) {
                echo '<div class="ut-notify-user">' . __('Video Background is active. Since this section has been configured to be transparent and the background video will not display on mobile devices, there is no visual output on these devices. Please set a poster image, it will be used as a poster image on mobile devices. Please switch to "Section Video Settings" tab and set a poster image.', 'unitedthemes') . '</div>';
            }
        }
        ?>
        
        <div id="ut-panel-tabs">
        
            <ul>
                
                <?php 
        if (get_post_type($post_ID) == 'portfolio') {
            ?>
                
                <li class="ut-portfolio-details"><a href="#ut-portfolio-details"><?php 
            _e('Portfolio Details', 'unitedthemes');
            ?>
</a></li>
                <li class="ut-portfolio-format"><a href="#ut-portfolio-format"><?php 
            _e('Portfolio Format', 'unitedthemes');
            ?>
</a></li>
                
                <?php 
        }
        ?>
  
                
                <li class="ut-hero-type">
                    <a href="#ut-hero-type" data-portfolio="<?php 
        _e('One Page Portfolio Type', 'unitedthemes');
        ?>
" data-page="<?php 
        _e('Hero Type', 'unitedthemes');
        ?>
">
                        
                        <?php 
        if (get_post_type($post_ID) == 'portfolio') {
            ?>
                        
                            <?php 
            _e('One Page Portfolio Type', 'unitedthemes');
            ?>
                        
                        <?php 
        } else {
            ?>
                        
                            <?php 
            _e('Hero Type', 'unitedthemes');
            ?>
 
                            
                        <?php 
        }
        ?>
  
                        
                    </a>
                </li>
                <li class="ut-hero-settings"><a href="#ut-hero-settings"><?php 
        _e('Hero Caption', 'unitedthemes');
        ?>
</a></li>
                <li class="ut-hero-styling"><a href="#ut-hero-styling"><?php 
        _e('Hero Styling', 'unitedthemes');
        ?>
</a></li>                
                <li class="ut-page-header-settings"><a href="#ut-page-header-settings"><?php 
        _e('Header Settings', 'unitedthemes');
        ?>
</a></li>
                <li class="ut-color-settings"><a href="#ut-color-settings"><?php 
        _e('Color Settings', 'unitedthemes');
        ?>
</a></li>
                
                <?php 
        if (get_post_type($post_ID) == 'page') {
            ?>
                
                <li class="ut-section-settings"><a href="#ut-section-settings"><?php 
            _e('Section Settings', 'unitedthemes');
            ?>
</a></li>
                <li class="ut-section-parallax-settings"><a href="#ut-section-parallax-settings"><?php 
            _e('Section Parallax Settings', 'unitedthemes');
            ?>
</a></li>
                <li class="ut-section-video-settings"><a href="#ut-section-video-settings"><?php 
            _e('Section Video Settings', 'unitedthemes');
            ?>
</a></li>
                <li class="ut-section-overlay-settings"><a href="#ut-section-overlay-settings"><?php 
            _e('Section Overlay Settings', 'unitedthemes');
            ?>
</a></li>
                <li class="ut-manage-team"><a href="#ut-manage-team"><?php 
            _e('Manage Team', 'unitedthemes');
            ?>
</a></li>
                
                <?php 
        }
        ?>
                
                <li class="ut-contact-section"><a href="#ut-contact-section"><?php 
        _e('Contact Section', 'unitedthemes');
        ?>
</a></li>
                
            </ul>
            
            <div id="ut-hero-type"></div>            
            <div id="ut-hero-settings"></div>            
            <div id="ut-hero-styling"></div>            
            <div id="ut-page-header-settings"></div>            
            <div id="ut-color-settings"></div>
            
            <?php 
        if (get_post_type($post_ID) == 'page') {
            ?>
            
            <div id="ut-section-settings"></div>
            <div id="ut-section-parallax-settings"></div>
            <div id="ut-section-video-settings"></div>
            <div id="ut-section-overlay-settings"></div>            
            <div id="ut-manage-team">                
                
                <div class="format-settings ut-settings-heading">
                    <div class="format-setting type-textblock wide-desc ">
                        <div class="description"><h2><span>Team /</span> Management</h2> 
                            <span class="ut-manage-team-info"><?php 
            _e('In order to be able to manage your team members, please switch the template to "Team Template".', 'unitedthemes');
            ?>
</span>
                        </div>
                   </div>
                </div>

            </div>
            
            <?php 
        }
        ?>
            
            <?php 
        if (get_post_type($post_ID) == 'portfolio') {
            ?>
            
            <div id="ut-portfolio-details"></div>
            <div id="ut-portfolio-format">
                
                <div class="format-settings ut-settings-heading">
                    <div class="format-setting type-textblock wide-desc">
                        <div class="description"><h2><span>Portfolio Post /</span> Format</h2> 
                        <?php 
            _e('With Version 2.6 "Portfolio Post Formats" have been removed. Starting with this Version "Portfolio Post Formats" are defined by the chosen "Hero Type". The following Hero Types are similar to:', 'unitedthemes');
            ?>
</div>
                    </div>
                </div>
                
                <div class="format-settings">
                    <div class="format-setting-label">
                        <h3 class="label"><?php 
            _e('Standard Format', 'unitedthemes');
            ?>
</h3>
                    </div>
                    <div class="format-setting type-textblock wide-desc">
                        <div class="format-setting-inner">
                            
                            <ul style="margin:0px 0px 15px 15px; list-style:disc;">
                                <li><?php 
            _e('Single Background Image', 'unitedthemes');
            ?>
</li>
                                <li><?php 
            _e('Animated Single Background Image', 'unitedthemes');
            ?>
</li>
                                <li><?php 
            _e('Split Hero', 'unitedthemes');
            ?>
</li>
                                <li><?php 
            _e('Custom Shortcode', 'unitedthemes');
            ?>
</li>
                                <li><?php 
            _e('Dynamic Hero', 'unitedthemes');
            ?>
</li>
                            </ul>                            
                            
                        </div>
                    </div>
                    <div class="format-setting-label">
                        <h3 class="label"><?php 
            _e('Gallery Format', 'unitedthemes');
            ?>
</h3>
                    </div>
                    <div class="format-setting type-textblock wide-desc">
                        <div class="format-setting-inner">
                            
                            <ul style="margin:0px 0px 15px 15px; list-style:disc;">
                                <li><?php 
            _e('Background Image Slider', 'unitedthemes');
            ?>
</li> 
                                <li><?php 
            _e('Fancy Image Slider', 'unitedthemes');
            ?>
</li> 
                                <li><?php 
            _e('Tablet Slider', 'unitedthemes');
            ?>
</li>  
                            </ul>                            
                            
                        </div>
                    </div>
                    <div class="format-setting-label">
                        <h3 class="label"><?php 
            _e('Video Format', 'unitedthemes');
            ?>
</h3>
                    </div>
                    <div class="format-setting type-textblock wide-desc">
                        <div class="format-setting-inner">
                            
                            <ul style="margin:0px 0px 15px 15px; list-style:disc;">
                                <li><?php 
            _e('Video Header', 'unitedthemes');
            ?>
</li> 
                            </ul>
                            
                        </div>
                    </div>
                </div>                    
            
            </div>            
            
            <?php 
        }
        ?>
            
            <div id="ut-contact-section"></div>
            
        </div>
        
        <?php 
        if (function_exists('ut_recognized_icons')) {
            ?>
            
            <div class="ut-modal-option-tree">
                <div class="ut-modal-box-option-tree ut-admin">
                    
                    <div class="ut-modal-option-tree-header">
                        <div class="inner">
                            <h2><?php 
            _e('Choose Icon', 'unitedthemes');
            ?>
</h2>
                        </div>
                    </div>
                    
                    <div class="ut-modal-option-tree-body">
                        <div class="inner">
                            <ul class="ut-glyphicons">
                            
                            <?php 
            foreach (ut_recognized_icons() as $key => $icon) {
                $icondisplay = $icon == 'icon-noicon' ? 'no icon' : '<i class="fa ' . $icon . '"></i>';
                echo '<li><span data-icon="' . $icon . '" class="ut-icon-option-tree">' . $icondisplay . '</span></li>';
            }
            ?>
                            
                            </ul>
                        </div>
                    </div>
                    
                    <div class="ut-modal-option-tree-footer">
                        <div class="inner">
                            <a href="#" class="close-ut-modal-option-tree"><?php 
            _e('Close', 'unitedthemes');
            ?>
</a>
                        </div>
                    </div>
                    
                </div>
            </div>
            
        <?php 
        }
    }
示例#3
0
            
            <div class="ut-modal-header">
                <div class="inner">
                    <h2><?php 
_e('Choose Icon', 'ut_shortcodes');
?>
</h2>
                </div>
            </div>
            
            <div class="ut-modal-body">
                <div class="inner">
                    <ul class="ut-glyphicons">
                    
                    <?php 
foreach (ut_recognized_icons() as $key => $icon) {
    $icondisplay = $icon == 'icon-noicon' ? 'no icon' : '<i class="fa ' . $icon . '"></i>';
    echo '<li><span data-icon="' . $icon . '" class="ut-glyphicon">' . $icondisplay . '</span></li>';
}
?>
                    
                    </ul>
                </div>
            </div>
            
            <div class="ut-modal-footer">
                <div class="inner">
                    <a href="#" class="close-ut-modal"><?php 
_e('Close', 'ut_shortcodes');
?>
</a>
示例#4
0
        /**
         * Loads the content for each page
         *
         * @return    string
         *
         * @access    public
         * @since     2.0
         */
        public function display_page()
        {
            $screen = get_current_screen();
            /* loop through settings */
            foreach ((array) $this->options as $option) {
                /* loop through pages */
                foreach ((array) $this->get_pages($option) as $page) {
                    /* verify page */
                    if (!isset($page['hidden_page']) && $screen->id == $this->page_hook[$page['id']]) {
                        $show_buttons = isset($page['show_buttons']) && $page['show_buttons'] == false ? false : true;
                        /* update active layout content */
                        if (isset($_REQUEST['settings-updated']) && $_REQUEST['settings-updated'] == 'true') {
                            $layouts = get_option('option_tree_layouts');
                            /* has active layout */
                            if (isset($layouts['active_layout'])) {
                                $option_tree = get_option($option['id']);
                                $layouts[$layouts['active_layout']] = ot_encode(serialize($option_tree));
                                update_option('option_tree_layouts', $layouts);
                            }
                        }
                        echo '<div class="wrap settings-wrap" id ="page-' . $page['id'] . '">';
                        screen_icon(isset($page['screen_icon']) ? $page['screen_icon'] : 'options-general');
                        echo '<h2>' . $page['page_title'] . '</h2>';
                        echo ot_alert_message($page);
                        settings_errors('option-tree');
                        /* Header */
                        echo '<div id="option-tree-header-wrap">';
                        echo '<ul id="option-tree-header">';
                        echo '<li id="option-tree-version"><span>' . UT_THEME_NAME . ' Version ' . UT_THEME_VERSION . '</span></li>';
                        echo '</ul>';
                        /* layouts form */
                        if ($page['id'] == 'ot_theme_options' && OT_SHOW_NEW_LAYOUT == true) {
                            ot_theme_options_layouts_form();
                        }
                        echo '</div>';
                        /* remove forms on the custom settings pages */
                        if ($show_buttons) {
                            echo '<form action="options.php" method="post" id="option-tree-settings-api">';
                            settings_fields($option['id']);
                        } else {
                            echo '<div id="option-tree-settings-api">';
                        }
                        /* Sub Header */
                        echo '<div id="option-tree-sub-header">';
                        if ($show_buttons) {
                            //echo '<a href="http://faq.unitedthemes.com/brooklyn/" target="_blank" class="option-tree-ui-button blue right">View Documentation</a>';
                            echo '<button class="option-tree-ui-button blue right save-settings">' . $page['button_text'] . '</button>';
                        }
                        echo '</div>';
                        /* Navigation */
                        echo '<div class="ui-tabs">';
                        /* check for sections */
                        if (isset($page['sections']) && count($page['sections']) > 0) {
                            echo '<ul class="ui-tabs-nav">';
                            echo '<li class="ut-admin-branding"><img src="' . THEME_WEB_ROOT . '/admin/assets/images/ut-emblem.png" alt="UnitedThemes"></li>';
                            /* loop through page sections */
                            foreach ((array) $page['sections'] as $section) {
                                echo '<li id="tab_' . $section['id'] . '"><a href="#section_' . $section['id'] . '">';
                                if (!empty($section['icon'])) {
                                    echo '<i class="fa ' . $section['icon'] . ' fa-3x"></i>';
                                }
                                echo $section['title'];
                                echo '</a></li>';
                            }
                            echo '</ul>';
                        }
                        /* sections */
                        echo '<div id="poststuff" class="metabox-holder">';
                        echo '<div id="post-body">';
                        echo '<div id="post-body-content">';
                        $this->do_settings_sections($_GET['page']);
                        echo '</div>';
                        echo '</div>';
                        echo '</div>';
                        echo '<div class="clear"></div>';
                        echo '</div>';
                        echo $show_buttons ? '</form>' : '</div>';
                        echo '</div>';
                        if (function_exists('ut_recognized_icons')) {
                            ?>
            
            <div class="ut-modal-option-tree">
                <div class="ut-modal-box-option-tree ut-admin">
                    
                    <div class="ut-modal-option-tree-header">
                        <div class="inner">
                            <h2><?php 
                            _e('Choose Icon', 'unitedthemes');
                            ?>
</h2>
                        </div>
                    </div>
                    
                    <div class="ut-modal-option-tree-body">
                        <div class="inner">
                            <ul class="ut-glyphicons">
                            
                            <?php 
                            foreach (ut_recognized_icons() as $key => $icon) {
                                $icondisplay = $icon == 'icon-noicon' ? 'no icon' : '<i class="fa ' . $icon . '"></i>';
                                echo '<li><span data-icon="' . $icon . '" class="ut-icon-option-tree">' . $icondisplay . '</span></li>';
                            }
                            ?>
                            
                            </ul>
                        </div>
                    </div>
                    
                    <div class="ut-modal-option-tree-footer">
                        <div class="inner">
                            <a href="#" class="close-ut-modal-option-tree"><?php 
                            _e('Close', 'unitedthemes');
                            ?>
</a>
                        </div>
                    </div>
                    
                </div>
            </div>
            
            <?php 
                        }
                    }
                }
            }
            return false;
        }