コード例 #1
0
function onetone_custom_scripts()
{
    wp_enqueue_style('onetone-font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', false, '4.0.3', false);
    wp_enqueue_style('onetone-main', get_stylesheet_uri(), array(), '1.2.8');
    wp_enqueue_style('Yanone-Kaffeesatz', esc_url('//fonts.googleapis.com/css?family=Yanone+Kaffeesatz|Lustria|Raleway|Open+Sans:400,300'), false, '', false);
    $background_array = onetone_options_array("page_background");
    $background = onetone_get_background($background_array);
    $header_image = get_header_image();
    $onetone_custom_css = "";
    if (isset($header_image) && !empty($header_image)) {
        $onetone_custom_css .= ".home-header{background:url(" . $header_image . ") repeat;}\n";
    }
    if ('blank' != get_header_textcolor() && '' != get_header_textcolor()) {
        $header_color = ' color:#' . get_header_textcolor() . ';';
        $onetone_custom_css .= '.home-header,.site-name,.site-description{' . $header_color . '}';
    }
    $custom_css = onetone_options_array("custom_css");
    $onetone_custom_css .= '.site{' . $background . '}';
    $top_menu_font_color = onetone_options_array('font_color');
    if ($top_menu_font_color != "" && $top_menu_font_color != null) {
        $onetone_custom_css .= 'header #menu-main > li > a span,header .top-nav > ul > li > a span{color:' . $top_menu_font_color . '}';
    }
    $onetone_custom_css .= $custom_css;
    wp_add_inline_style('onetone-main', $onetone_custom_css);
    if (is_home()) {
        wp_enqueue_script('onetone-bigvideo', get_template_directory_uri() . '/js/jquery.tubular.1.0.js', array('jquery'), '1.0', true);
    }
    wp_enqueue_script('onetone-modernizr', get_template_directory_uri() . '/js/modernizr.custom.js', array('jquery'), '2.8.2 ', false);
    wp_enqueue_script('onetone-unslider', get_template_directory_uri() . '/js/unslider.js', array('jquery'), '1.0.0 ', true);
    wp_enqueue_script('onetone-default', get_template_directory_uri() . '/js/onetone.js', array('jquery'), '1.2.8', true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_localize_script('onetone-default', 'onetone_params', array('ajaxurl' => admin_url('admin-ajax.php'), 'themeurl' => get_template_directory_uri()));
}
コード例 #2
0
ファイル: theme-setup.php プロジェクト: russtx/tac
function onetone_custom_scripts()
{
    $theme_info = wp_get_theme();
    wp_enqueue_style('onetone-font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', false, '4.0.3', false);
    wp_enqueue_style('onetone-owl-carousel', get_template_directory_uri() . '/css/owl.carousel.css', false, '1.3.3', false);
    wp_enqueue_style('onetone-owl-theme', get_template_directory_uri() . '/css/owl.theme.css', false, '1.3.3', false);
    wp_enqueue_style('onetone-main', get_stylesheet_uri(), array(), '1.4.3');
    wp_enqueue_style('Yanone-Kaffeesatz', esc_url('//fonts.googleapis.com/css?family=Yanone+Kaffeesatz|Lustria|Raleway|Open+Sans:400,300'), false, '', false);
    $background_array = onetone_options_array("page_background");
    $background = onetone_get_background($background_array);
    $header_image = get_header_image();
    $onetone_custom_css = "";
    if (isset($header_image) && !empty($header_image)) {
        $onetone_custom_css .= ".home-header{background:url(" . $header_image . ") repeat;}\n";
    }
    if ('blank' != get_header_textcolor() && '' != get_header_textcolor()) {
        $header_color = ' color:#' . get_header_textcolor() . ';';
        $onetone_custom_css .= '.home-header,.site-name,.site-description{' . $header_color . '}';
    }
    $custom_css = onetone_options_array("custom_css");
    $onetone_custom_css .= '.site{' . $background . '}';
    $links_color = onetone_options_array('links_color');
    if ($links_color == "" || $links_color == null) {
        $links_color = "#963";
    }
    $onetone_custom_css .= 'a,.site-logo a:hover,.site-navigation a:hover,.widget a:hover,.entry-title a:hover,.entry-meta a:hover,.loop-pagination a:hover,.page_navi a:hover,.site-footer a:hover,.home-navigation > ul > li.current > a > span,.home-navigation li a:hover,.home-navigation li.current a,.home-footer a:hover,#back-to-top,#back-to-top span{color:' . $links_color . ';}#back-to-top {border:1px solid ' . $links_color . ';}mark,ins,.widget #wp-calendar #today{background:' . $links_color . '; }::selection{background:' . $links_color . ' !important;}::-moz-selection{background:' . $links_color . ' !important;}';
    $top_menu_font_color = onetone_options_array('font_color');
    if ($top_menu_font_color != "" && $top_menu_font_color != null) {
        $onetone_custom_css .= 'header #menu-main > li > a span,header .top-nav > ul > li > a span{color:' . $top_menu_font_color . '}';
    }
    $onetone_custom_css .= $custom_css;
    wp_add_inline_style('onetone-main', $onetone_custom_css);
    if (is_home()) {
        wp_enqueue_script('onetone-bigvideo', get_template_directory_uri() . '/js/jquery.tubular.1.0.js', array('jquery'), '1.0', true);
    }
    wp_enqueue_script('onetone-modernizr', get_template_directory_uri() . '/js/modernizr.custom.js', array('jquery'), '2.8.2 ', false);
    wp_enqueue_script('onetone-respond', get_template_directory_uri() . '/js/respond.min.js', array('jquery'), '1.4.2 ', false);
    wp_enqueue_script('onetone-scrollTo', get_template_directory_uri() . '/js/jquery.scrollTo.js', array('jquery'), '1.4.14 ', false);
    wp_enqueue_script('onetone-carousel', get_template_directory_uri() . '/js/owl.carousel.js', array('jquery'), '1.3.3 ', true);
    wp_enqueue_script('onetone-parallax', get_template_directory_uri() . '/js/jquery.parallax-1.1.3.js', array('jquery'), '1.1.3 ', true);
    wp_enqueue_script('onetone-default', get_template_directory_uri() . '/js/onetone.js', array('jquery'), $theme_info->get('Version'), true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    $slide_time = onetone_options_array("slide_time");
    $slide_time = is_numeric($slide_time) ? $slide_time : "5000";
    wp_localize_script('onetone-default', 'onetone_params', array('ajaxurl' => admin_url('admin-ajax.php'), 'themeurl' => get_template_directory_uri(), 'slideSpeed' => $slide_time));
}
コード例 #3
0
ファイル: footer.php プロジェクト: vaiiho/onetone-custom
<footer class="home-footer footer">
    	<div class="home-site-info footer-copyright">
        	<?php 
$copyright = onetone_options_array('copyright');
echo $copyright;
?>
		</div>
    </footer>

</div>
<?php 
wp_footer();
?>
</body>
</html>
コード例 #4
0
ファイル: index.php プロジェクト: Magnacarter/livinghope.com
<?php 
    $video_array = array();
    $section_num = onetone_options_array('section_num');
    if (isset($section_num) && is_numeric($section_num) && $section_num > 0) {
        for ($i = 0; $i < $section_num; $i++) {
            $section_title = onetone_options_array('section_title_' . $i);
            $section_menu = onetone_options_array('menu_title_' . $i);
            $section_background = onetone_options_array('section_background_' . $i);
            $section_background_video = onetone_options_array('section_background_video_' . $i);
            $section_css_class = onetone_options_array('section_css_class_' . $i);
            $section_content = onetone_options_array('section_content_' . $i);
            if (!isset($section_content) || $section_content == "") {
                $section_content = onetone_options_array('sction_content_' . $i);
            }
            $section_slug = onetone_options_array('menu_slug_' . $i);
            $background = onetone_get_background($section_background);
            $sanitize_title = "";
            if ($section_menu && $section_menu != "") {
                $sanitize_title = sanitize_title($section_menu);
                if (trim($section_slug) != "") {
                    $sanitize_title = $section_slug;
                }
            }
            $css_class = isset($section_css_class) ? $section_css_class : "";
            $background_video = '';
            $video_wrap = '';
            $video_enable = 0;
            $detect = new Mobile_Detect();
            if ($section_background_video != "" && !$detect->isMobile() && !$detect->isTablet()) {
                $video_enable = 1;
コード例 #5
0
/**
 * back to top
 */
function onetone_back_to_top()
{
    $back_to_top_btn = onetone_options_array("back_to_top_btn");
    if ($back_to_top_btn != "hide") {
        echo '<a href="javascript:;">
        	<div id="back-to-top">
        		<span class="fa fa-arrow-up"></span>
            	<span>' . __("TOP", "onetone") . '</span>
        	</div>
        </a>';
    }
}
コード例 #6
0
ファイル: footer.php プロジェクト: Juni4567/junaidninja
 <?php 
$enable_footer_widget_area = onetone_options_array('enable_footer_widget_area');
if ($enable_footer_widget_area == 1) {
    ?>
        <section class="home-widget-area">
  <div class="home-container">
    <div class="row">
						<div class="col-md-4">
							<?php 
    if (is_active_sidebar("footer_widget_1")) {
        dynamic_sidebar("footer_widget_1");
    }
    ?>
						</div>
						<div class="col-md-4">
				        <?php 
    if (is_active_sidebar("footer_widget_2")) {
        dynamic_sidebar("footer_widget_2");
    }
    ?>
						</div>
						<div class="col-md-4">
							<?php 
    if (is_active_sidebar("footer_widget_3")) {
        dynamic_sidebar("footer_widget_3");
    }
    ?>
						</div>
					</div>  
  </div>
</section>
コード例 #7
0
<body <?php 
body_class();
?>
>
<div class="template-site">
	<header class="template-header">
		<div class="home-logo onetone-logo ">
        	<a href="<?php 
echo esc_url(home_url('/'));
?>
">
        <?php 
if (onetone_options_array('logo') != "") {
    ?>
        <img src="<?php 
    echo onetone_options_array('logo');
    ?>
" alt="<?php 
    bloginfo('name');
    ?>
" />
        <?php 
} else {
    ?>
        <span class="site-name">
        <?php 
    bloginfo('name');
    ?>
        </span>
        <?php 
}
コード例 #8
0
function onetone_get_default_slider()
{
    $sanitize_title = "home";
    $section_menu = onetone_options_array('menu_title_0');
    $section_slug = onetone_options_array('menu_slug_0');
    if ($section_menu != "") {
        $sanitize_title = sanitize_title($section_menu);
        if (trim($section_slug) != "") {
            $sanitize_title = sanitize_title($section_slug);
        }
    }
    $slide_time = onetone_options_array("slide_time");
    $slide_time = is_numeric($slide_time) ? $slide_time : "5000";
    wp_localize_script('onetone-default', 'slide_time', $slide_time);
    $return = '<section id="' . $sanitize_title . '" class="section homepage-slider onetone-' . $sanitize_title . '"><ul>';
    for ($i = 1; $i <= 5; $i++) {
        $active = '';
        $text = onetone_options_array('onetone_slide_text_' . $i);
        $image = onetone_options_array('onetone_slide_image_' . $i);
        if ($image != "") {
            $return .= '<li style="background-image: url(\'' . $image . '\');">
					<div class="inner">
						' . $text . '
					</div>
				</li>';
        }
    }
    $return .= '</ul></section>';
    return $return;
}
コード例 #9
0
/**
 * Defines an array of options that will be used to generate the settings page and be saved in the database.
 * When creating the 'id' fields, make sure to use all lowercase and no spaces.
 *
 */
function optionsframework_options()
{
    // Background Defaults
    $page_background = array('color' => '', 'image' => ONETONE_THEME_BASE_URL . '/images/leftbg.jpg', 'repeat' => 'no-repeat', 'position' => 'top left', 'attachment' => 'fixed');
    $font_color = array('color' => '');
    $section_font_color = array('color' => '');
    $section_title = array("", "About Us", "Services", "Gallery", "Contact", "Custom Section");
    $section_menu = array("Home", "About Us", "Services", "Gallery", "Contact", "Custom Section");
    $default_section_num = count($section_menu);
    $section_num = onetone_options_array('section_num');
    $section_num = $section_num == "" ? 6 : $section_num;
    $section_background = array(array('color' => '', 'image' => ONETONE_THEME_BASE_URL . '/images/home-bg01.jpg', 'repeat' => 'repeat', 'position' => 'top left', 'attachment' => 'scroll'), array('color' => '', 'image' => ONETONE_THEME_BASE_URL . '/images/home-bg02.jpg', 'repeat' => 'repeat', 'position' => 'top left', 'attachment' => 'scroll'), array('color' => '', 'image' => ONETONE_THEME_BASE_URL . '/images/home-bg03.jpg', 'repeat' => 'repeat', 'position' => 'top left', 'attachment' => 'scroll'), array('color' => '', 'image' => ONETONE_THEME_BASE_URL . '/images/home-bg02.jpg', 'repeat' => 'repeat', 'position' => 'top left', 'attachment' => 'scroll'), array('color' => '', 'image' => ONETONE_THEME_BASE_URL . '/images/home-bg03.jpg', 'repeat' => 'repeat', 'position' => 'top left', 'attachment' => 'scroll'), array('color' => '', 'image' => ONETONE_THEME_BASE_URL . '/images/home-bg02.jpg', 'repeat' => 'repeat', 'position' => 'top left', 'attachment' => 'scroll'));
    $section_css_class = array("section-banner", "section-about", "", "", "", "");
    $section_content = array('<div class="banner-box"><br/><br/>
        	<h1>TARAY BOGRILOYAT srians</h1>
            <span>CRAS URNA LEO, FRINGILLA NEC ALIQUAM AC, VARIUS IN ENIM. MAECENAS NON FELIS AUGUE, 
QUIS SAGITTIS JUSTO. DONEC GRAVIDA, ARCU IN ALIQUET CONVALLIS</span>
			<div class="banner-scroll"><a href="#about-us" class="scroll" data-section="about-us"><img src="' . ONETONE_THEME_BASE_URL . '/images/down.png" alt=""></a></div>
            <ul class="banner-sns">
            	<li><a href="#"><i class="fa fa-2 fa-facebook"></i></a></li>
                <li><a href="#"><i class="fa fa-2 fa-skype"></i></a></li>
                <li><a href="#"><i class="fa fa-2 fa-twitter"></i></a></li>
                <li><a href="#"><i class="fa fa-2 fa-linkedin"></i></a></li>
                <li><a href="#"><i class="fa fa-2 fa-google-plus"></i></a></li>
                <li><a href="#"><i class="fa fa-2 fa-rss"></i></a></li>
            </ul>
            </div>', '<div class="two_third">
            	<h3>Biography</h3>
                <p>Morbi rutrum, elit ac fermentum egestas, tortor ante vestibulum est, eget 
					scelerisque nisl velit eget tellus. Fusce porta facilisis luctus. Integer neque 
					dolor, rhoncus nec euismod eget, pharetra et tortor. Nulla id pulvinar nunc. 
					Vestibulum auctor nisl vel lectus ullamcorper sed pellentesque dolor 
					eleifend. Praesent lobortis magna vel diam mattis sagittis.Mauris porta odio 
					eu risus scelerisque id facilisis ipsum dictum vitae volutpat. Lorem ipsum 
					dolor sit amet, consectetur adipiscing elit. Sed pulvinar neque eu purus 
					sollicitudin et sollicitudin dui ultricies. Maecenas cursus auctor tellus sit 
					amet blandit. Maecenas a erat ac nibh molestie interdum. Class aptent 
					taciti sociosqu ad litora torquent per conubia nostra, per inceptos 
					himenaeos. Sed lorem enim, ultricies sed sodales id, convallis molestie 
					ipsum. Morbi eget dolor ligula. Vivamus accumsan rutrum nisi nec 
					elementum. Pellentesque at nunc risus. Phasellus ullamcorper 
					bibendum varius. Quisque quis ligula sit amet felis ornare porta. Aenean 
					viverra lacus et mi elementum mollis. Praesent eu justo elit.</p>
            </div>
            <div class="one_third last">
            	<h3>Personal Info</h3>
                <ul>
                	<li class="info-phone">+1123 2456 689</li>
					<li class="info-address">3301 Lorem Ipsum, Dolor Sit St</li>
					<li class="info-email"><a href="#">support@mageewp.com. </a></li>
					<li class="info-website"><a href="#">Mageewp.com</a></li>
                </ul>                	
            </div>', '<div class="one_third">
			<!-- Font Awesome Icon-->
            	<i class="fa fa-3 fa-desktop"></i>
				
                <h3>Service 1</h3>
                <p>Donec in vehicula augue. Sed et 
					nisi sem, at semper dolor. 
					Pellentesque habitant morbi 
					tristique senectus et netu..</p>
			</div>
            <div class="one_third">
			<!-- Font Awesome Icon-->
            	<i class="fa fa-3 fa-comments-o"></i>
                <h3>Service 2</h3>
                <p>Donec in vehicula augue. Sed et 
					nisi sem, at semper dolor. 
					Pellentesque habitant morbi 
					tristique senectus et netu..</p>
			</div>
        	<div class="one_third last">
			<!-- Font Awesome Icon-->
            	<i class="fa fa-3 fa-search"></i>
                <h3>Service 3</h3>
                <p>Donec in vehicula augue. Sed et 
					nisi sem, at semper dolor. 
					Pellentesque habitant morbi 
					tristique senectus et netu..</p>
			</div>', '<div class="portfolio-list">
        		<ul>
            		<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g1.jpg"></a></li>
                	<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g2.jpg"></a></li>
               		<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g3.jpg"></a></li>
               		<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g4.jpg"></a></li>
               		<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g5.jpg"></a></li>
               		<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g6.jpg"></a></li>
               		<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g7.jpg"></a></li>
                	<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g8.jpg"></a></li>
            	</ul>
        	</div>', '<p class="contact-text">INTEGER ALIQUET ARCU SIT AMET SEM PORTA FACILISIS. CURABITUR SAPIEN SAPIEN, 
				BLANDIT IN MOLESTIE ET, SAGITTIS ID LOREM. NULLA MALESUADA MAURIS ID TURPIS</p>
			<div class="contact-area">
			  <form class="contact-form" method="post" action="">
			   <input type="text" name="name" id="name" value="" placeholder="Name" size="22" tabindex="1" aria-required="true">
			   <input type="text" name="email" id="email" value="" placeholder="Email" size="22" tabindex="2" aria-required="true"> 
			   <textarea name="message" id="message" cols="39" rows="7" tabindex="4" placeholder="Message"></textarea>
			   <p class="noticefailed"></p>
			   <input type="hidden" name="sendto" id="sendto" value="YOUR EMAIL HERE(Default Admin Email)">
			   <input type="button" name="submit" id="submit" value="Post">
			  </form>
			 </div>
			', '<p>Donec in vehicula augue. Sed et nisi sem, at semper dolor. Pellentesque habitant morbi tristique 
			senectus et netus et malesuada fames ac turpis egestas. Mauris ut urna nibh, a semper 
			neque. Mauris ultrices tempus nisi, et porttitor nulla varius a. Ut turpis magna, 
			feugiat quis ultrices tristique, rhoncus eu leo. In eu quam lacus. Praesent
			Vehicula augue. Sed et nisi sem, at semper dolor. Pellentesque habitant morbi tristique 
			senectus et netus et malesuada fames ac turpis egestas. Mauris ut urna nibh, a semper 
			anews sed ovref neque. Mauris ultrices tempus nisi, et porttitor nulla varius a. Ut turpis magna, 
			feugiat quis ultrices tristique, rhoncus eu leo. In eu quam lacus. dear Praesent Donec in vehicula augue. 
			Sed et nisi sem, at semper dolor. Pellentesque habitant morbi tristique 
			senectus et netus et malesuada fames ac turpis egestas. Mauris ut urna nibh, a semper 
			neque. Mauris ultrices tempus nisi, et porttitor nulla varius a. Ut turpis magna, 
			feugiat quis ultrices tristique, rhoncus eu leo. In eu quam lacus. Praesent
			Vehicula augue. Sed et nisi sem, at semper dolor. Pellentesque habitant morbi tristique 
			senectus et netus et malesuada fames ac turpis egestas. Mauris ut urna nibh, a semper 
			anews sed ovref neque. Mauris ultrices tempus nisi, et porttitor nulla varius a. Ut turpis magna, 
			feugiat quis ultrices tristique, rhoncus eu leo. In eu quam lacus. dear Praesent</p>');
    //$section_background_video = array("ab0TSkLe-E0","","","","","");
    $options = array();
    // HEADER
    $options[] = array('name' => __('General Options', 'onetone'), 'type' => 'heading');
    $options[] = array('name' => __('Upload Logo', 'onetone'), 'id' => 'logo', 'std' => '', 'type' => 'upload');
    $options[] = array('name' => __('Favicon', 'onetone'), 'desc' => __('An icon associated with a URL that is variously displayed, as in a browser\'s address bar or next to the site name in a bookmark list. Learn more about 
					 <a href="' . esc_url("http://en.wikipedia.org/wiki/Favicon") . '" target="_blank">Favicon</a>', 'onetone'), 'id' => 'favicon', 'type' => 'upload');
    $options[] = array('name' => __('Post & Page Background', 'onetone'), 'id' => 'page_background', 'std' => $page_background, 'type' => 'background');
    $options[] = array('name' => __('Header Menu Font Color', 'onetone'), 'id' => 'font_color', 'std' => '', 'type' => 'color');
    $options[] = array('name' => __('Custom CSS', 'onetone'), 'desc' => __('The following css code will add to the header before the closing &lt;/head&gt; tag.', 'onetone'), 'id' => 'custom_css', 'std' => 'body{margin:0px;}', 'type' => 'textarea');
    ////HOME PAGE
    $options[] = array('name' => __('Home Page', 'onetone'), 'type' => 'heading');
    //HOME PAGE SECTION
    $options[] = array('name' => __('Content Sections Num', 'onetone'), 'desc' => __('The number of home page sections.', 'onetone'), 'id' => 'section_num', 'std' => '6', 'type' => 'text');
    $options[] = array('name' => __('Section Background Video', 'onetone'), 'std' => 'ab0TSkLe-E0', 'desc' => __('YouTube Video ID', 'onetone'), 'id' => 'section_background_video_0', 'type' => 'text');
    $options[] = array('name' => __('Video Controls', 'onetone'), 'desc' => __('Display video control buttons.', 'onetone'), 'id' => 'video_controls', 'std' => '1', 'class' => 'mini', 'options' => array('1' => 'yes', '0' => 'no'), 'type' => 'select');
    $video_background_section = array("0" => "No video background");
    if (is_numeric($section_num)) {
        for ($i = 1; $i <= $section_num; $i++) {
            $video_background_section[$i] = "Secion " . $i;
        }
    }
    $options[] = array('name' => __('Video Background Section', 'onetone'), 'std' => '1', 'id' => 'video_background_section', 'type' => 'select', 'options' => $video_background_section);
    $options[] = array('name' => __('Section 1 Content', 'onetone'), 'std' => 'content', 'id' => 'section_1_content', 'type' => 'select', 'options' => array("content" => "Content", "slider" => "Slider"));
    if (isset($section_num) && is_numeric($section_num) && $section_num > 0) {
        $section_num = $section_num;
    } else {
        $section_num = $default_section_num;
    }
    for ($i = 0; $i < $section_num; $i++) {
        if (!isset($section_title[$i])) {
            $section_title[$i] = "";
        }
        if (!isset($section_menu[$i])) {
            $section_menu[$i] = "";
        }
        if (!isset($section_background[$i])) {
            $section_background[$i] = array('color' => '', 'image' => '', 'repeat' => '', 'position' => '', 'attachment' => '');
        }
        if (!isset($section_css_class[$i])) {
            $section_css_class[$i] = "";
        }
        if (!isset($section_content[$i])) {
            $section_content[$i] = "";
        }
        $options[] = array('name' => sprintf(__('Section %s', 'onetone'), $i + 1), 'id' => 'slide_group_start_' . $i . '', 'type' => 'start_group', 'class' => 'group_close');
        $options[] = array('name' => __('Section Title', 'onetone'), 'id' => 'section_title_' . $i . '', 'type' => 'text', 'std' => $section_title[$i]);
        $options[] = array('name' => __('Menu Title', 'onetone'), 'id' => 'menu_title_' . $i . '', 'type' => 'text', 'std' => $section_menu[$i], 'desc' => 'This title will display in the header menu. It is required');
        $options[] = array('name' => __('Menu Slug', 'onetone'), 'id' => 'menu_slug_' . $i . '', 'type' => 'text', 'std' => '', 'desc' => 'The  "slug" is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.');
        $options[] = array('name' => __('Section Background', 'onetone'), 'id' => 'section_background_' . $i . '', 'std' => $section_background[$i], 'type' => 'background');
        if ($i == 0) {
        }
        $options[] = array('name' => __('Section Css Class', 'onetone'), 'id' => 'section_css_class_' . $i . '', 'type' => 'text', 'std' => $section_css_class[$i]);
        $options[] = array('name' => __('Section Content', 'onetone'), 'id' => 'section_content_' . $i, 'std' => $section_content[$i], 'type' => 'editor');
        $options[] = array('name' => '', 'id' => 'slide_group_end_' . $i . '', 'type' => 'end_group');
    }
    //END HOME PAGE SECTION
    // Slider
    $options[] = array('name' => __('Slider', 'meris'), 'type' => 'heading');
    //HOME PAGE SLIDER
    $options[] = array('name' => __('Slideshow', 'onetone'), 'id' => 'group_title', 'type' => 'title');
    $options[] = array('name' => __('Slide 1', 'onetone'), 'id' => 'slide_group_start_1', 'type' => 'start_group', 'class' => 'group_close');
    $options[] = array('name' => __('Image', 'onetone'), 'id' => 'onetone_slide_image_1', 'type' => 'upload', 'std' => ONETONE_THEME_BASE_URL . '/images/banner-1.jpg');
    //$options[] = array('name' => __('Title', 'onetone'),'id' => 'onetone_slide_title_1','type' => 'text','std'=>'Title 1');
    $options[] = array('name' => __('Text', 'onetone'), 'id' => 'onetone_slide_text_1', 'type' => 'editor', 'std' => '<h1>The jQuery slider that just slides.</h1><p>No fancy effects or unnecessary markup.</p><a class="btn" href="#download">Download</a>');
    //$options[] = array('name' => __('Link', 'onetone'),'id' => 'onetone_slide_link_1','type' => 'text');
    $options[] = array('name' => '', 'id' => 'slide_group_end_1', 'type' => 'end_group');
    $options[] = array('name' => __('Slide 2', 'onetone'), 'id' => 'slide_group_start_2', 'type' => 'start_group', 'class' => 'group_close');
    $options[] = array('name' => __('Image', 'onetone'), 'id' => 'onetone_slide_image_2', 'type' => 'upload', 'std' => ONETONE_THEME_BASE_URL . '/images/banner-2.jpg');
    //$options[] = array('name' => __('Title', 'onetone'),'id' => 'onetone_slide_title_2','type' => 'text','std'=>'Title 2');
    $options[] = array('name' => __('Text', 'onetone'), 'id' => 'onetone_slide_text_2', 'type' => 'editor', 'std' => '<h1>Fluid, flexible, fantastically minimal.</h1><p>Use any HTML in your slides, extend with CSS. You have full control.</p><a class="btn" href="#download">Download</a>');
    //$options[] = array('name' => __('Link', 'onetone'),'id' => 'onetone_slide_link_2','type' => 'text');
    $options[] = array('name' => '', 'id' => 'slide_group_end_2', 'type' => 'end_group');
    $options[] = array('name' => __('Slide 3', 'onetone'), 'id' => 'slide_group_start_3', 'type' => 'start_group', 'class' => 'group_close');
    $options[] = array('name' => __('Image', 'onetone'), 'id' => 'onetone_slide_image_3', 'type' => 'upload', 'std' => ONETONE_THEME_BASE_URL . '/images/banner-3.jpg');
    //$options[] = array('name' => __('Title', 'onetone'),'id' => 'onetone_slide_title_3','type' => 'text');
    $options[] = array('name' => __('Text', 'onetone'), 'id' => 'onetone_slide_text_3', 'type' => 'editor', 'std' => '<h1>Open-source.</h1><p> Vestibulum auctor nisl vel lectus ullamcorper sed pellentesque dolor eleifend.</p><a class="btn" href="#">Contribute</a>');
    //$options[] = array('name' => __('Link', 'onetone'),'id' => 'onetone_slide_link_3','type' => 'text');
    $options[] = array('name' => '', 'id' => 'slide_group_end_3', 'type' => 'end_group');
    $options[] = array('name' => __('Slide 4', 'onetone'), 'id' => 'slide_group_start_4', 'type' => 'start_group', 'class' => 'group_close');
    $options[] = array('name' => __('Image', 'onetone'), 'id' => 'onetone_slide_image_4', 'type' => 'upload', 'std' => ONETONE_THEME_BASE_URL . '/images/banner-4.jpg');
    //$options[] = array('name' => __('Title', 'onetone'),'id' => 'onetone_slide_title_4','type' => 'text');
    $options[] = array('name' => __('Text', 'onetone'), 'id' => 'onetone_slide_text_4', 'type' => 'editor', 'std' => '<h1>Uh, that\'s about it.</h1><p>I just wanted to show you another slide.</p><a class="btn" href="#download">Download</a>');
    //$options[] = array('name' => __('Link', 'onetone'),'id' => 'onetone_slide_link_4','type' => 'text');
    $options[] = array('name' => '', 'id' => 'slide_group_end_4', 'type' => 'end_group');
    $options[] = array('name' => __('Slide 5', 'onetone'), 'id' => 'slide_group_start_5', 'type' => 'start_group', 'class' => 'group_close');
    $options[] = array('name' => __('Image', 'onetone'), 'id' => 'onetone_slide_image_5', 'type' => 'upload');
    //$options[] = array('name' => __('Title', 'onetone'),'id' => 'onetone_slide_title_5','type' => 'text');
    $options[] = array('name' => __('Text', 'onetone'), 'id' => 'onetone_slide_text_5', 'type' => 'editor');
    //$options[] = array('name' => __('Link', 'onetone'),'id' => 'onetone_slide_link_5','type' => 'text');
    $options[] = array('name' => '', 'id' => 'slide_group_end_5', 'type' => 'end_group');
    /*	$options[] = array(
    		'name' => __('Slide Height', 'onetone'),
    		'id' => 'slide_height',
    		'std' => '30%',
    		'desc'=>__('Both formats: Percentage or Pixel(e.g. "30%" or "400px").','onetone'),
    		'type' => 'text');	*/
    $options[] = array('name' => __('Slide Time', 'onetone'), 'id' => 'slide_time', 'std' => '5000', 'desc' => __('Milliseconds between the end of the sliding effect and the start of the nex one.', 'onetone'), 'type' => 'text');
    //END HOME PAGE SLIDER
    return $options;
}
コード例 #10
0
ファイル: header.php プロジェクト: Juni4567/junaidninja
        
        <a class="home-navbar navbar" href="javascript:;"></a>
        <nav class="home-navigation top-nav">
<?php 
$onepage_menu = '';
$section_num = onetone_options_array('section_num');
if (isset($section_num) && is_numeric($section_num) && $section_num > 0) {
    for ($i = 0; $i < $section_num; $i++) {
        $section_menu = onetone_options_array('menu_title_' . $i);
        $section_slug = onetone_options_array('menu_slug_' . $i);
        if ($section_slug) {
            $section_slug = sanitize_title($section_slug);
        }
        if (isset($section_menu) && $section_menu != "") {
            $sanitize_title = 'section-' . ($i + 1);
            $section_menu = onetone_options_array('menu_title_' . $i);
            if (trim($section_slug) != "") {
                $sanitize_title = $section_slug;
            }
            $onepage_menu .= '<li  class="onetone-menuitem"><a id="onetone-' . $sanitize_title . '" href="#' . $sanitize_title . '" >
 <span>' . $section_menu . '</span></a></li>';
        }
    }
}
if (has_nav_menu("home_menu")) {
    wp_nav_menu(array('theme_location' => 'home_menu', 'depth' => 0, 'fallback_cb' => false, 'container' => '', 'container_class' => 'main-menu', 'menu_id' => 'menu-main', 'menu_class' => 'main-nav', 'link_before' => '<span>', 'link_after' => '</span>', 'items_wrap' => '<ul id="%1$s" class="%2$s">' . $onepage_menu . '%3$s</ul>'));
} else {
    echo '<ul>' . $onepage_menu . '</ul>';
}
?>
        </nav>
コード例 #11
0
/**
 * Defines an array of options that will be used to generate the settings page and be saved in the database.
 * When creating the 'id' fields, make sure to use all lowercase and no spaces.
 *
 */
function optionsframework_options()
{
    // Background Defaults
    $page_background = array('color' => '', 'image' => ONETONE_THEME_BASE_URL . '/images/leftbg.jpg', 'repeat' => 'no-repeat', 'position' => 'top left', 'attachment' => 'fixed');
    $footer_background = array('color' => '#000', 'image' => '', 'repeat' => 'no-repeat', 'position' => 'top left', 'attachment' => '');
    $googleFontArray = onetone_options_typography_get_google_fonts();
    $onetone_typography_mixed_fonts = array_merge(onetone_options_typography_get_os_fonts(), $googleFontArray['onetone_of_family']);
    asort($onetone_typography_mixed_fonts);
    $nav_typography_defaults = array('size' => '16px', 'face' => 'Calibri,sans-serif', 'style' => 'normal', 'color' => '#dddddd');
    $section_title_typography_defaults = array('size' => '60px', 'face' => 'Raleway, sans-serif', 'style' => '400', 'color' => '#666666');
    $footer_typography_defaults = array('size' => '14px', 'face' => 'Calibri,sans-serif', 'style' => 'inherit', 'color' => '#777777');
    $typography_options = array('sizes' => array('10', '11', '12', '13', '14', '16', '18', '20', '24', '26', '28', '30', '35', '40', '46', '50', '60'), 'faces' => $onetone_typography_mixed_fonts, 'styles' => array('normal' => 'normal', 'italic' => 'italic', 'bold' => 'bold', 'bold italic' => 'bold italic', '100' => '100', '200' => '200', '300' => '300', '400' => '400', '500' => '500', '600' => '600', '700' => '700', '800' => '800', '900' => '900'), 'color' => true);
    $font_color = array('color' => '');
    $section_font_color = array('color' => '');
    $section_title = array("", "About Us", "Services", "Gallery", "Timeline", "Contact");
    $section_menu = array("Home", "About Us", "Services", "Gallery", "Timeline", "Contact");
    $default_section_num = count($section_menu);
    $section_num = onetone_options_array('section_num');
    $section_num = $section_num == "" ? 6 : $section_num;
    $section_background = array(array('color' => '', 'image' => ONETONE_THEME_BASE_URL . '/images/home-bg01.jpg', 'repeat' => 'repeat', 'position' => 'top left', 'attachment' => 'scroll'), array('color' => '', 'image' => ONETONE_THEME_BASE_URL . '/images/home-bg02.jpg', 'repeat' => 'repeat', 'position' => 'top left', 'attachment' => 'scroll'), array('color' => '', 'image' => ONETONE_THEME_BASE_URL . '/images/home-bg04.jpg', 'repeat' => 'repeat', 'position' => 'top left', 'attachment' => 'scroll'), array('color' => '', 'image' => ONETONE_THEME_BASE_URL . '/images/home-bg02.jpg', 'repeat' => 'repeat', 'position' => 'top left', 'attachment' => 'scroll'), array('color' => '', 'image' => ONETONE_THEME_BASE_URL . '/images/home-bg03.jpg', 'repeat' => 'repeat', 'position' => 'top left', 'attachment' => 'scroll'), array('color' => '', 'image' => ONETONE_THEME_BASE_URL . '/images/home-bg02.jpg', 'repeat' => 'repeat', 'position' => 'top left', 'attachment' => 'scroll'));
    $section_css_class = array("section-banner", "section-about", "", "", "", "");
    $section_content = array('<div class="banner-box"><br/><br/><br/><br/>
<h1>TARAY BOGRILOYAT srians</h1>
<span>CRAS URNA LEO, FRINGILLA NEC ALIQUAM AC, VARIUS IN ENIM. MAECENAS NON FELIS AUGUE,
QUIS SAGITTIS JUSTO. DONEC GRAVIDA, ARCU IN ALIQUET CONVALLIS</span>
<div class="banner-scroll"><a href="#about-us"><img src="' . ONETONE_THEME_BASE_URL . '/images/down.png" alt="" /></a></div>
<ul class="banner-sns">
	<li><a href="#"><i class="fa fa-2 fa-facebook"></i></a></li>
	<li><a href="#"><i class="fa fa-2 fa-skype"></i></a></li>
	<li><a href="#"><i class="fa fa-2 fa-twitter"></i></a></li>
	<li><a href="#"><i class="fa fa-2 fa-linkedin"></i></a></li>
	<li><a href="#"><i class="fa fa-2 fa-google-plus"></i></a></li>
	<li><a href="#"><i class="fa fa-2 fa-rss"></i></a></li>
</ul>
</div>', '[row]
  [column col_sm="8"] 
            	<h3>Biography</h3>
                <p>Morbi rutrum, elit ac fermentum egestas, tortor ante vestibulum est, eget 
					scelerisque nisl velit eget tellus. Fusce porta facilisis luctus. Integer neque 
					dolor, rhoncus nec euismod eget, pharetra et tortor. Nulla id pulvinar nunc. 
					Vestibulum auctor nisl vel lectus ullamcorper sed pellentesque dolor 
					eleifend. Praesent lobortis magna vel diam mattis sagittis.Mauris porta odio 
					eu risus scelerisque id facilisis ipsum dictum vitae volutpat. Lorem ipsum 
					dolor sit amet, consectetur adipiscing elit. Sed pulvinar neque eu purus 
					sollicitudin et sollicitudin dui ultricies. Maecenas cursus auctor tellus sit 
					amet blandit. Maecenas a erat ac nibh molestie interdum. Class aptent 
					taciti sociosqu ad litora torquent per conubia nostra, per inceptos 
					himenaeos. Sed lorem enim, ultricies sed sodales id, convallis molestie 
					ipsum. Morbi eget dolor ligula. Vivamus accumsan rutrum nisi nec 
					elementum. Pellentesque at nunc risus. Phasellus ullamcorper 
					bibendum varius. Quisque quis ligula sit amet felis ornare porta. Aenean 
					viverra lacus et mi elementum mollis. Praesent eu justo elit.</p>
			[/column]
           [column col_sm="4"] 
            	<h3>Personal Info</h3>
                <ul>
                	<li class="info-phone">+1123 2456 689</li>
					<li class="info-address">3301 Lorem Ipsum, Dolor Sit St</li>
					<li class="info-email"><a href="#">support@mageewp.com. </a></li>
					<li class="info-website"><a href="#">Mageewp.com</a></li>
                </ul>                	
            [/column]
			[/row]', "[row]\n[column col_sm='4']\n[animation animation_speed='1.5' animation_type='bounce' image_animation='yes' ]\n[service title='FEATURE 1' icon='fa-comments-o' ]Lorem ipsum dolor sit amet, consectetur adipiscingelit. Integer sed magna vel velit dignissim luctus eu n urna. Dapibus ege-stas turpis. Praesent faucibus nisl sit amet nulla sollicitudin.[/service]\n[/animation]\n[/column]\n\n[column col_sm='4']\n[animation animation_speed='1.5' animation_type='shake' image_animation='yes' ]\n[service title='FEATURE 2' icon='fa-star-half-empty' ]Lorem ipsum dolor sit amet, consectetur adipiscingelit. Integer sed magna vel velit dignissim luctus eu n urna. Dapibus ege-stas turpis. Praesent faucibus nisl sit amet nulla sollicitudin.[/service]\n[/animation]\n[/column]\n\n[column col_sm='4']\n[animation animation_speed='1.5' animation_type='fade-down' image_animation='yes']\n[service title='FEATURE 3' icon='fa-cog fa-spin' ]Lorem ipsum dolor sit amet, consectetur adipiscingelit. Integer sed magna vel velit dignissim luctus eu n urna. Dapibus ege-stas turpis. Praesent faucibus nisl sit amet nulla sollicitudin.[/service]\n[/animation]\n[/column]\n[/row]", '<p>Use wordpress core gallery shortcode and add attribute  rel="lightbox-group" size="medium" link="file".  e.g. [gallery rel="lightbox-group" size="medium" link="file" ids="3463,3468,3469,3521,3522,3523"]</p>
			<div class="portfolio-list">
        		<ul>
            		<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g1.jpg"></a></li>
                	<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g2.jpg"></a></li>
               		<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g3.jpg"></a></li>
               		<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g4.jpg"></a></li>
               		<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g5.jpg"></a></li>
               		<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g6.jpg"></a></li>
               		<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g7.jpg"></a></li>
                	<li><a href="#"><img class="port-img" src="' . ONETONE_THEME_BASE_URL . '/images/g8.jpg"></a></li>
            	</ul>
        	</div>
			
			', '[timeline num="3" excerpt_length="60" ]', '<p class="contact-text">INTEGER ALIQUET ARCU SIT AMET SEM PORTA FACILISIS. CURABITUR SAPIEN SAPIEN, 
				BLANDIT IN MOLESTIE ET, SAGITTIS ID LOREM. NULLA MALESUADA MAURIS ID TURPIS</p>
		
			 [contact style="3" email="*****@*****.**"]			 
			');
    //$section_background_video = array("ab0TSkLe-E0","","","","","");
    $options = array();
    // HEADER
    $options[] = array('name' => __('General Options', 'onetone'), 'type' => 'heading');
    $options[] = array('name' => __('Favicon', 'onetone'), 'desc' => __('An icon associated with a URL that is variously displayed, as in a browser\'s address bar or next to the site name in a bookmark list. Learn more about 
					 <a href="' . esc_url("http://en.wikipedia.org/wiki/Favicon") . '" target="_blank">Favicon</a>', 'onetone'), 'id' => 'favicon', 'type' => 'upload');
    $options[] = array('name' => __('Post & Page Background', 'onetone'), 'id' => 'page_background', 'std' => $page_background, 'type' => 'background');
    /*	$options[] = array(
    		'name' =>  __('Header Menu Font Color', 'onetone'),
    		'id' => 'font_color',
    		'std' => '',
    		'type' => 'color' );*/
    $options[] = array('name' => __('Custom CSS', 'onetone'), 'desc' => __('The following css code will add to the header before the closing &lt;/head&gt; tag.', 'onetone'), 'id' => 'custom_css', 'std' => 'body{margin:0px;}', 'type' => 'textarea');
    ////Header
    $options[] = array('name' => __('Header', 'onetone'), 'type' => 'heading');
    $options[] = array('name' => __('Upload Logo', 'onetone'), 'id' => 'logo', 'std' => '', 'type' => 'upload');
    $options[] = array('name' => __('Header Opacity', 'onetone'), 'id' => 'header_opacity', 'std' => '0.8', 'class' => 'mini', 'options' => array_combine(range(0.1, 1, 0.1), range(0.1, 1, 0.1)), 'type' => 'select');
    $options[] = array('name' => __('Homepage Nav Menu Typography', 'onetone'), 'id' => "homepage_nav_typography", 'std' => $nav_typography_defaults, 'type' => 'typography', 'options' => $typography_options);
    ////Footer
    $options[] = array('name' => __('Footer', 'onetone'), 'type' => 'heading');
    $options[] = array('name' => __('Footer Typography', 'onetone'), 'id' => "footer_typography", 'std' => $footer_typography_defaults, 'type' => 'typography', 'options' => $typography_options);
    $options[] = array('name' => __('Footer Background', 'onetone'), 'id' => 'footer_background', 'std' => $footer_background, 'type' => 'background');
    $options[] = array('name' => __('Copyright', 'onetone'), 'desc' => __('Copyright text.', 'onetone'), 'id' => 'copyright', 'std' => 'Copyright &copy; ' . date('Y') . ', Designed by <a href="' . esc_url("http://www.mageewp.com/") . '">MageeWP Themes</a>.', 'type' => 'textarea');
    ////HOME PAGE
    $options[] = array('name' => __('Home Page', 'onetone'), 'type' => 'heading');
    //HOME PAGE SECTION
    $options[] = array('name' => __('Content Sections Num', 'onetone'), 'desc' => __('The number of home page sections.', 'onetone'), 'id' => 'section_num', 'std' => '6', 'type' => 'text');
    $options[] = array('name' => __('HTML5 Video Background Options', 'onetone'), 'id' => 'html5_video_options', 'type' => 'start_group', 'class' => 'group_close');
    $options[] = array('name' => __('mp4 video url', 'onetone'), 'id' => 'mp4_video_url', 'type' => 'text', 'std' => '', "desc" => __('For Android devices, Internet Explorer 9, Safari', 'onetone'));
    $options[] = array('name' => __('ogv video url', 'onetone'), 'id' => 'ogv_video_url', 'type' => 'text', 'std' => '', "desc" => __('For Google Chrome, Mozilla Firefox, Opera ', 'onetone'));
    $options[] = array('name' => __('webm video url', 'onetone'), 'id' => 'webm_video_url', 'type' => 'text', 'std' => '', "desc" => __('For Google Chrome, Mozilla Firefox, Opera ', 'onetone'));
    $options[] = array('name' => __('poster', 'onetone'), 'id' => 'poster_url', 'type' => 'upload', 'std' => '', "desc" => __('Displaying the image for browsers that don\'t support the HTML5 Video element.', 'onetone'));
    $options[] = array('name' => __('Video Loop', 'onetone'), 'id' => 'video_loop', 'std' => '1', 'class' => 'mini', 'options' => array('1' => 'yes', '0' => 'no'), 'type' => 'select');
    $options[] = array('name' => __('Video Volume', 'onetone'), 'id' => 'video_volume', 'std' => '0.8', 'class' => 'mini', 'options' => array('0.001' => '0', '0.1' => '0.1', '0.2' => '0.2', '0.3' => '0.3', '0.4' => '0.4', '0.5' => '0.5', '0.6' => '0.6', '0.7' => '0.7', '0.8' => '0.8', '0.9' => '0.9', '1.0' => '1.0'), 'type' => 'select');
    $options[] = array('name' => '', 'id' => 'html5_video_options_end', 'type' => 'end_group');
    $options[] = array('name' => __('YouTube Video Background Options', 'onetone'), 'id' => 'youtube_video_options', 'type' => 'start_group', 'class' => 'group_close');
    $options[] = array('name' => __('Section Background Video', 'onetone'), 'std' => 'ab0TSkLe-E0', 'desc' => __('YouTube Video ID', 'onetone'), 'id' => 'section_background_video_0', 'type' => 'text');
    $options[] = array('name' => __('Video Controls', 'onetone'), 'desc' => __('Display video control buttons.', 'onetone'), 'id' => 'video_controls', 'std' => '1', 'class' => 'mini', 'options' => array('1' => 'yes', '0' => 'no'), 'type' => 'select');
    $options[] = array('name' => '', 'id' => 'youtube_video_options_end', 'type' => 'end_group');
    $options[] = array('name' => __('Video Background Type', 'onetone'), 'id' => 'video_background_type', 'std' => 'youtube', 'class' => 'mini', 'options' => array('youtube' => 'YouTube Video', 'html5' => 'HTML5 Video'), 'type' => 'select');
    $video_background_section = array("0" => "No video background");
    if (is_numeric($section_num)) {
        for ($i = 1; $i <= $section_num; $i++) {
            $video_background_section[$i] = "Secion " . $i;
        }
    }
    $options[] = array('name' => __('Video Background Section', 'onetone'), 'std' => '1', 'id' => 'video_background_section', 'type' => 'select', 'options' => $video_background_section);
    $options[] = array('name' => __('Section 1 Content', 'onetone'), 'std' => 'content', 'id' => 'section_1_content', 'type' => 'select', 'options' => array("content" => "Content", "slider" => "Slider"));
    $options[] = array('name' => __('Section Title Typography', 'onetone'), 'id' => "section_title_typography", 'std' => $section_title_typography_defaults, 'type' => 'typography', 'options' => $typography_options);
    if (isset($section_num) && is_numeric($section_num) && $section_num > 0) {
        $section_num = $section_num;
    } else {
        $section_num = $default_section_num;
    }
    for ($i = 0; $i < $section_num; $i++) {
        if (!isset($section_title[$i])) {
            $section_title[$i] = "";
        }
        if (!isset($section_menu[$i])) {
            $section_menu[$i] = "";
        }
        if (!isset($section_background[$i])) {
            $section_background[$i] = array('color' => '', 'image' => '', 'repeat' => '', 'position' => '', 'attachment' => '');
        }
        if (!isset($section_css_class[$i])) {
            $section_css_class[$i] = "";
        }
        if (!isset($section_content[$i])) {
            $section_content[$i] = "";
        }
        $options[] = array('name' => sprintf(__('Section %s', 'onetone'), $i + 1), 'id' => 'section_group_start_' . $i . '', 'type' => 'start_group', 'class' => 'group_close');
        $options[] = array('name' => __('Section Title', 'onetone'), 'id' => 'section_title_' . $i . '', 'type' => 'text', 'std' => $section_title[$i]);
        $options[] = array('name' => __('Section Title Color', 'onetone'), 'id' => 'section_title_color_' . $i . '', 'std' => '', 'type' => 'color');
        $options[] = array('name' => __('Menu Title', 'onetone'), 'id' => 'menu_title_' . $i . '', 'type' => 'text', 'std' => $section_menu[$i], 'desc' => 'This title will display in the header menu. It is required');
        $options[] = array('name' => __('Menu Slug', 'onetone'), 'id' => 'menu_slug_' . $i . '', 'type' => 'text', 'std' => '', 'desc' => 'The  "slug" is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.');
        $options[] = array('name' => __('Section Background', 'onetone'), 'id' => 'section_background_' . $i . '', 'std' => $section_background[$i], 'type' => 'background');
        $options[] = array('name' => __('100% Width Background Image', 'onetone'), 'std' => 'no', 'id' => 'background_size_' . $i . '', 'type' => 'select', 'class' => 'mini', 'options' => array("no" => "no", "yes" => "yes"));
        $options[] = array('name' => __('Parallax Scrolling Background Image', 'onetone'), 'std' => 'no', 'id' => 'parallax_scrolling_' . $i . '', 'type' => 'select', 'class' => 'mini', 'options' => array("no" => "no", "yes" => "yes"));
        $options[] = array('name' => __('Full Width', 'onetone'), 'std' => 'no', 'id' => 'full_width_' . $i . '', 'type' => 'select', 'class' => 'mini', 'options' => array("no" => "no", "yes" => "yes"));
        $options[] = array('name' => __('Section Css Class', 'onetone'), 'id' => 'section_css_class_' . $i . '', 'type' => 'text', 'std' => $section_css_class[$i]);
        $options[] = array('name' => __('Section Content', 'onetone'), 'id' => 'section_content_' . $i, 'std' => $section_content[$i], 'type' => 'editor');
        $options[] = array('name' => '', 'id' => 'section_group_end_' . $i . '', 'type' => 'end_group');
    }
    //END HOME PAGE SECTION
    // Slider
    $options[] = array('name' => __('Slider', 'onetone'), 'type' => 'heading');
    //HOME PAGE SLIDER
    $options[] = array('name' => __('Slideshow', 'onetone'), 'id' => 'group_title', 'type' => 'title');
    $options[] = array('name' => __('Slide 1', 'onetone'), 'id' => 'slide_group_start_1', 'type' => 'start_group', 'class' => 'group_close');
    $options[] = array('name' => __('Image', 'onetone'), 'id' => 'onetone_slide_image_1', 'type' => 'upload', 'std' => ONETONE_THEME_BASE_URL . '/images/banner-1.jpg');
    //$options[] = array('name' => __('Title', 'onetone'),'id' => 'onetone_slide_title_1','type' => 'text','std'=>'Title 1');
    $options[] = array('name' => __('Text', 'onetone'), 'id' => 'onetone_slide_text_1', 'type' => 'editor', 'std' => '<h1>The jQuery slider that just slides.</h1><p>No fancy effects or unnecessary markup.</p><a class="btn" href="#download">Download</a>');
    //$options[] = array('name' => __('Link', 'onetone'),'id' => 'onetone_slide_link_1','type' => 'text');
    $options[] = array('name' => '', 'id' => 'slide_group_end_1', 'type' => 'end_group');
    $options[] = array('name' => __('Slide 2', 'onetone'), 'id' => 'slide_group_start_2', 'type' => 'start_group', 'class' => 'group_close');
    $options[] = array('name' => __('Image', 'onetone'), 'id' => 'onetone_slide_image_2', 'type' => 'upload', 'std' => ONETONE_THEME_BASE_URL . '/images/banner-2.jpg');
    //$options[] = array('name' => __('Title', 'onetone'),'id' => 'onetone_slide_title_2','type' => 'text','std'=>'Title 2');
    $options[] = array('name' => __('Text', 'onetone'), 'id' => 'onetone_slide_text_2', 'type' => 'editor', 'std' => '<h1>Fluid, flexible, fantastically minimal.</h1><p>Use any HTML in your slides, extend with CSS. You have full control.</p><a class="btn" href="#download">Download</a>');
    //$options[] = array('name' => __('Link', 'onetone'),'id' => 'onetone_slide_link_2','type' => 'text');
    $options[] = array('name' => '', 'id' => 'slide_group_end_2', 'type' => 'end_group');
    $options[] = array('name' => __('Slide 3', 'onetone'), 'id' => 'slide_group_start_3', 'type' => 'start_group', 'class' => 'group_close');
    $options[] = array('name' => __('Image', 'onetone'), 'id' => 'onetone_slide_image_3', 'type' => 'upload', 'std' => ONETONE_THEME_BASE_URL . '/images/banner-3.jpg');
    //$options[] = array('name' => __('Title', 'onetone'),'id' => 'onetone_slide_title_3','type' => 'text');
    $options[] = array('name' => __('Text', 'onetone'), 'id' => 'onetone_slide_text_3', 'type' => 'editor', 'std' => '<h1>Open-source.</h1><p> Vestibulum auctor nisl vel lectus ullamcorper sed pellentesque dolor eleifend.</p><a class="btn" href="#">Contribute</a>');
    //$options[] = array('name' => __('Link', 'onetone'),'id' => 'onetone_slide_link_3','type' => 'text');
    $options[] = array('name' => '', 'id' => 'slide_group_end_3', 'type' => 'end_group');
    $options[] = array('name' => __('Slide 4', 'onetone'), 'id' => 'slide_group_start_4', 'type' => 'start_group', 'class' => 'group_close');
    $options[] = array('name' => __('Image', 'onetone'), 'id' => 'onetone_slide_image_4', 'type' => 'upload', 'std' => ONETONE_THEME_BASE_URL . '/images/banner-4.jpg');
    //$options[] = array('name' => __('Title', 'onetone'),'id' => 'onetone_slide_title_4','type' => 'text');
    $options[] = array('name' => __('Text', 'onetone'), 'id' => 'onetone_slide_text_4', 'type' => 'editor', 'std' => '<h1>Uh, that\'s about it.</h1><p>I just wanted to show you another slide.</p><a class="btn" href="#download">Download</a>');
    //$options[] = array('name' => __('Link', 'onetone'),'id' => 'onetone_slide_link_4','type' => 'text');
    $options[] = array('name' => '', 'id' => 'slide_group_end_4', 'type' => 'end_group');
    $options[] = array('name' => __('Slide 5', 'onetone'), 'id' => 'slide_group_start_5', 'type' => 'start_group', 'class' => 'group_close');
    $options[] = array('name' => __('Image', 'onetone'), 'id' => 'onetone_slide_image_5', 'type' => 'upload');
    //$options[] = array('name' => __('Title', 'onetone'),'id' => 'onetone_slide_title_5','type' => 'text');
    $options[] = array('name' => __('Text', 'onetone'), 'id' => 'onetone_slide_text_5', 'type' => 'editor');
    //$options[] = array('name' => __('Link', 'onetone'),'id' => 'onetone_slide_link_5','type' => 'text');
    $options[] = array('name' => '', 'id' => 'slide_group_end_5', 'type' => 'end_group');
    /*	$options[] = array(
    		'name' => __('Slide Height', 'onetone'),
    		'id' => 'slide_height',
    		'std' => '30%',
    		'desc'=>__('Both formats: Percentage or Pixel(e.g. "30%" or "400px").','onetone'),
    		'type' => 'text');	*/
    $options[] = array('name' => __('Slide Time', 'onetone'), 'id' => 'slide_time', 'std' => '5000', 'desc' => __('Milliseconds between the end of the sliding effect and the start of the nex one.', 'onetone'), 'type' => 'text');
    //END HOME PAGE SLIDER
    return $options;
}
コード例 #12
0
ファイル: 404.php プロジェクト: neetudave/heartfulness-uk
      <div class="site-content" role="main">
        <header class="archive-header">
          <h1 class="archive-title"><p class="breadcrumb"><a href="<?php 
echo esc_url(home_url('/'));
?>
"><?php 
_e("Home", 'onetone');
?>
</a><span class="arrow"> &raquo; </span><span class="current_crumb">404 </span></p></h1>
        </header>
        <article class="post-entry">
          <div class="entry-main">
            <div class="entry-content">
              <!--post content-->
             <?php 
echo do_shortcode(wp_kses_post(onetone_options_array('content_404'), $allowedposttags));
?>
              <!--post econtent end-->
            </div>
          </div>
          
        </article>
      </div>
    </div>
  </div>
  <!--main-->
  <div class="sidebar">
    <div class="widget-area">
   <?php 
get_sidebar("post");
?>
コード例 #13
0
ファイル: theme-setup.php プロジェクト: vaiiho/onetone-custom
function onetone_custom_scripts()
{
    wp_enqueue_style('Yanone-Kaffeesatz', esc_url('//fonts.googleapis.com/css?family=Yanone+Kaffeesatz|Lustria|Raleway|Open+Sans:400,300'), false, '', false);
    wp_enqueue_style('onetone-font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', false, '4.0.3', false);
    wp_enqueue_style('onetone-shortcodes', get_template_directory_uri() . '/css/shortcodes.css', false, '1.3.0', false);
    wp_enqueue_style('onetone-prettyPhoto', get_template_directory_uri() . '/css/prettyPhoto.css', false, '3.1.5', false);
    wp_enqueue_style('onetone-animation', get_template_directory_uri() . '/css/animation.css', false, '1.3.0', false);
    wp_enqueue_style('onetone-owl-carousel', get_template_directory_uri() . '/css/owl.carousel.css', false, '1.3.3', false);
    wp_enqueue_style('onetone-owl-theme', get_template_directory_uri() . '/css/owl.theme.css', false, '1.3.3', false);
    wp_enqueue_style('onetone-bigvideo', get_template_directory_uri() . '/css/bigvideo.css', false, '1.3.3', false);
    wp_enqueue_style('onetone-main', get_stylesheet_uri(), array(), '1.3.3');
    $page_background = onetone_options_array("page_background");
    $_page_background = onetone_get_background($page_background);
    $header_image = get_header_image();
    $header_opacity = onetone_options_array("header_opacity", 1);
    $onetone_custom_css = "";
    if (isset($header_image) && !empty($header_image)) {
        $onetone_custom_css .= ".home-header, .template-header{background-image:url(" . $header_image . ");background-attachment: fixed;background-repeat:no-repeat;background-size:cover;-moz-background-size:cover;-webkit-background-size:cover;opacity:" . $header_opacity . ";}\n";
    }
    $onetone_custom_css .= ".home-header, .template-header{opacity:" . $header_opacity . ";}\n";
    if ('blank' != get_header_textcolor() && '' != get_header_textcolor()) {
        $header_color = ' color:#' . get_header_textcolor() . ';';
        $onetone_custom_css .= '.home-header, .template-header,.site-name,.site-description{' . $header_color . '}';
    }
    $custom_css = onetone_options_array("custom_css");
    $onetone_custom_css .= '.site{' . $_page_background . '}';
    $top_menu_font_color = onetone_options_array('font_color');
    if ($top_menu_font_color != "" && $top_menu_font_color != null) {
        $onetone_custom_css .= 'header #menu-main > li > a span,header .top-nav > ul > li > a span{color:' . $top_menu_font_color . '}';
    }
    //typography
    $homepage_nav_typography = onetone_options_array('homepage_nav_typography');
    $_homepage_nav_typography = onetone_get_typography($homepage_nav_typography);
    $onetone_custom_css .= '.home-navigation > ul > li > a > span{' . $_homepage_nav_typography . '}';
    $section_title_typography = onetone_options_array('section_title_typography');
    $_section_title_typography = onetone_get_typography($section_title_typography);
    $onetone_custom_css .= 'section h1.section-title{' . $_section_title_typography . '}';
    $footer_typography = onetone_options_array('footer_typography');
    $_footer_typography = onetone_get_typography($footer_typography);
    $onetone_custom_css .= 'footer .footer-copyright{' . $_footer_typography . '}';
    //
    $footer_background = onetone_options_array("footer_background");
    $_footer_background = onetone_get_background($footer_background);
    $onetone_custom_css .= 'footer.home-footer{' . $_footer_background . '}';
    $onetone_custom_css .= $custom_css;
    wp_add_inline_style('onetone-main', $onetone_custom_css);
    if (is_home()) {
        wp_enqueue_script('onetone-bigvideo', get_template_directory_uri() . '/js/jquery.tubular.1.0.js', array('jquery'), '1.0', true);
    }
    wp_enqueue_script('onetone-modernizr', get_template_directory_uri() . '/js/modernizr.custom.js', array('jquery'), '2.8.2 ', false);
    wp_enqueue_script('onetone-carousel', get_template_directory_uri() . '/js/owl.carousel.js', array('jquery'), '1.3.3 ', true);
    wp_enqueue_script('onetone-prettyPhoto', get_template_directory_uri() . '/js/jquery.prettyPhoto.js', array('jquery'), '3.1.5', true);
    wp_enqueue_script('onetone-nav', get_template_directory_uri() . '/js/jquery.nav.js', array('jquery'), '3.0.0', true);
    wp_enqueue_script('onetone-default', get_template_directory_uri() . '/js/onetone.js', array('jquery'), '1.3.0', true);
    $slide_time = onetone_options_array("slide_time");
    $slide_time = is_numeric($slide_time) ? $slide_time : "5000";
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_localize_script('onetone-default', 'onetone_params', array('ajaxurl' => admin_url('admin-ajax.php'), 'themeurl' => get_template_directory_uri(), 'slideSpeed' => $slide_time));
}
コード例 #14
0
function onetone_get_default_slider()
{
    $sanitize_title = "home";
    $section_menu = onetone_options_array('menu_title_0');
    $section_slug = onetone_options_array('menu_slug_0');
    if ($section_menu != "") {
        $sanitize_title = sanitize_title($section_menu);
        if (trim($section_slug) != "") {
            $sanitize_title = sanitize_title($section_slug);
        }
    }
    $return = '<section id="' . $sanitize_title . '" class="section homepage-slider onetone-' . $sanitize_title . '"><div id="owl-demo" class="owl-carousel owl-theme">';
    for ($i = 1; $i <= 5; $i++) {
        $active = '';
        $text = onetone_options_array('onetone_slide_text_' . $i);
        $image = onetone_options_array('onetone_slide_image_' . $i);
        if ($image != "") {
            $return .= '<div class="item"><img src="' . $image . '" alt=""><div class="inner">' . $text . '</div></div>';
        }
    }
    $return .= '</div></section>';
    return $return;
}