Example #1
0
function retro_get_social_links()
{
    $social = '<ul>';
    if ($i = op_theme_opt('twitter')) {
        $social .= '<li><a href="' . esc_url($i) . '" target="_blank"><span class="icon retroicon-twitter"></span></a></li>';
    }
    if ($i = op_theme_opt('facebook')) {
        $social .= '<li><a href="' . esc_url($i) . '" target="_blank"><span class="icon retroicon-facebook"></span></a></li>';
    }
    if ($i = op_theme_opt('google-plus')) {
        $social .= '<li><a href="' . esc_url($i) . '" target="_blank"><span class="icon retroicon-gplus"></span></a></li>';
    }
    if ($i = op_theme_opt('pinterest')) {
        $social .= '<li><a href="' . esc_url($i) . '" target="_blank"><span class="icon retroicon-pinterest"></span></a></li>';
    }
    if ($i = op_theme_opt('linkedin')) {
        $social .= '<li><a href="' . esc_url($i) . '" target="_blank"><span class="icon retroicon-linkedin"></span></a></li>';
    }
    if ($i = op_theme_opt('dribbble')) {
        $social .= '<li><a href="' . esc_url($i) . '" target="_blank"><span class="icon retroicon-dribbble"></span></a></li>';
    }
    if ($i = op_theme_opt('flickr')) {
        $social .= '<li><a href="' . esc_url($i) . '" target="_blank"><span class="icon retroicon-flickr"></span></a></li>';
    }
    if ($i = op_theme_opt('tumblr')) {
        $social .= '<li><a href="' . esc_url($i) . '" target="_blank"><span class="icon retroicon-tumblr"></span></a></li>';
    }
    if ($i = op_theme_opt('youtube')) {
        $social .= '<li><a href="' . esc_url($i) . '" target="_blank"><span class="icon retroicon-youtube"></span></a></li>';
    }
    if ($i = op_theme_opt('instagram')) {
        $social .= '<li><a href="' . esc_url($i) . '" target="_blank"><span class="icon retroicon-instagram"></span></a></li>';
    }
    if ($i = op_theme_opt('skype')) {
        $social .= '<li><a href="' . $i . '" target="_blank"><span class="icon retroicon-skype"></span></a></li>';
    }
    if ($i = op_theme_opt('dropbox')) {
        $social .= '<li><a href="' . esc_url($i) . '" target="_blank"><span class="icon retroicon-dropbox"></span></a></li>';
    }
    if ($i = op_theme_opt('github')) {
        $social .= '<li><a href="' . esc_url($i) . '" target="_blank"><span class="icon retroicon-github-1"></span></a></li>';
    }
    if ($i = op_theme_opt('behance')) {
        $social .= '<li><a href="' . esc_url($i) . '" target="_blank"><span class="icon retroicon-behance"></span></a></li>';
    }
    if ($i = op_theme_opt('vimeo')) {
        $social .= '<li><a href="' . esc_url($i) . '" target="_blank"><span class="icon retroicon-vimeo"></span></a></li>';
    }
    $social .= '</ul>';
    return $social;
}
Example #2
0
function retro_mail_send()
{
    check_ajax_referer('retro-mail-send', 'referer');
    $headers = array();
    $message = null;
    $result = __('Please, fill all required fields correctly.', 'openframe');
    $to = ($i = op_theme_opt('send-to')) ? sanitize_email($i) : get_option('admin_email');
    $subject = strip_tags($_POST['subject']);
    $from = sanitize_email($_POST['email']);
    $name = strip_tags($_POST['name']);
    $lemessage = strip_tags($_POST['message']);
    $human = $_POST['human'];
    if (op_theme_opt('human-off')) {
        if (!$name || !is_email($from) || !$lemessage) {
            die($result);
        }
    } else {
        if (!$name || !is_email($from) || !$lemessage || $human != 5) {
            die($result);
        }
    }
    $message = __('New message from:', 'openframe') . ' ' . esc_attr($name) . ' (' . $from . ')';
    $message .= "\n";
    $message .= '------';
    $message .= "\n\n";
    $message .= $lemessage;
    $message .= "\n\n";
    $message .= '------';
    $message .= "\n";
    $message .= __('This message has been sent from:', 'openframe') . ' ' . get_bloginfo('name') . ' (' . home_url('/') . ')';
    $headers[] = 'From: ' . $name . ' <' . $from . '>';
    $headers[] = 'Reply-To: ' . $from;
    $headers[] = 'MIME-Version: 1.0';
    $headers[] = 'Content-Type: text/plain; charset=UTF-8';
    if (wp_mail($to, $subject, $message, $headers)) {
        $result = __('Message received! Thanks.', 'openframe');
    }
    die($result);
}
Example #3
0
		}
	}

<?php 
}
?>


<?php 
if ($i = op_theme_opt('links-size')) {
    ?>

	nav ul#main-nav li a {
		font-size: <?php 
    echo $i;
    ?>
;
	}

<?php 
}
?>


<?php 
if ($i = op_theme_opt('css-code')) {
    echo $i;
}
?>

</style>
Example #4
0
		<?php 
if ($i = op_theme_opt('bookmark-icon')) {
    ?>
		
			<link rel="shortcut icon" href="<?php 
    echo reset(wp_get_attachment_image_src($i, 'full'));
    ?>
">
		
		<?php 
}
?>

		
		<?php 
if ($i = op_theme_opt('apple-touch-icon')) {
    ?>

			<link rel="apple-touch-icon-precomposed" href="<?php 
    echo reset(wp_get_attachment_image_src($i, 'full'));
    ?>
">
		
		<?php 
}
?>
	


		<?php 
get_template_part('css');
Example #5
0
						<div class="hentry-content">
							<?php 
the_content();
?>
						</div>

						<?php 
if (comments_open()) {
    comments_template();
}
?>

					</article>  

					<?php 
if (!op_theme_opt('hide-sidebar-portfolio-single')) {
    ?>

						<aside class="blog-sidebar col col-3 tablet-full mobile-full">

							<?php 
    get_sidebar();
    ?>
							             
						</aside>

					<?php 
}
?>

				</div><!-- row -->           
Example #6
0
} else {
    ?>

                            <?php 
    get_template_part('not-found');
    ?>

                        <?php 
}
?>
             

                    </div><!-- blog-list -->  

                    <?php 
if (!op_theme_opt('hide-sidebar-blog-page')) {
    ?>

                        <aside class="blog-sidebar col col-3 tablet-full mobile-full">

                            <?php 
    get_sidebar();
    ?>

                        </aside>        

                    <?php 
}
?>
  
Example #7
0
							<?php 
the_content();
?>

						</div>

						<?php 
if (comments_open()) {
    comments_template();
}
?>

					</article>  

					<?php 
if (!op_theme_opt('hide-sidebar-blog-single')) {
    ?>

						<aside class="blog-sidebar col col-3 tablet-full mobile-full">

							<?php 
    get_sidebar();
    ?>
							             
						</aside>

					<?php 
}
?>

				</div><!-- row -->           
Example #8
0
			<?php 
        $retro_home_query->the_post();
        ?>
			
			<?php 
        get_template_part('part', 'section');
        ?>
		
		<?php 
    }
    ?>

	</main>

	<?php 
    if (op_theme_opt('show-loader')) {
        ?>

		<div class="landing">
			<ul>
				<li class="land1"></li>
				<li class="land2"></li>
				<li class="land3"></li>
				<li class="land4"></li>
				<li class="land5"></li>
				<li class="land6"></li>
				<li class="land7"></li>
				<li class="land8"></li>
				<li class="land9"></li>
			</ul>
			<div class="counter"><span></span></div>
Example #9
0
function op_panel_opt_checked($option_name)
{
    echo op_theme_opt($option_name) == $option_name ? 'checked="checked"' : null;
}
Example #10
0
function op_panel_opt_picker($option_name, $placeholder = null)
{
    ?>
	<span class="op-panel-picker-pal"></span>
	<input type="text" name="<?php 
    esc_attr_e($option_name);
    ?>
" class="op-panel-picker regular-text code" value="<?php 
    esc_attr_e(op_theme_opt($option_name));
    ?>
" placeholder="<?php 
    esc_attr_e($placeholder);
    ?>
" />
	<?php 
}
Example #11
0
function custom_classes($classes)
{
    if (op_theme_opt('disable-fixed') == false) {
        $classes[] = 'fixed-header';
    }
    if (op_theme_opt('logo-left') == true) {
        $classes[] = 'left-logo';
    } else {
        $classes[] = 'centered-logo';
    }
    if (op_theme_opt('logo-up') == true) {
        $classes[] = 'anim-logo';
    }
    return $classes;
}
Example #12
0
<header role="banner">

    <div class="header-inner <?php 
if (op_theme_opt('light-menu')) {
    echo 'light-text';
}
?>
" style="background-color: <?php 
esc_attr_e(op_theme_opt('header-bg-color'));
?>
">

        <div class="container">

            <div class="row clear">

                <?php 
get_template_part('logo');
?>

                <nav role="navigation">

                    <?php 
wp_nav_menu(array('theme_location' => 'primary', 'container' => false, 'menu_class' => 'clear', 'menu_id' => 'main-nav', 'depth' => 1, 'fallback_cb' => '', 'walker' => new retro_nav_walker()));
?>

                </nav>

            </div><!-- row -->

        </div><!-- container -->
Example #13
0
    ?>
</h2>

	<div class="separator"><span>&times;&times;&times;</span></div>

	<div class="section-subtitle"><?php 
    echo retro_get_headline(get_queried_object());
    ?>
</div>

<?php 
} else {
    ?>

	<h2 class="section-title <?php 
    if (op_theme_opt('multiple-borders')) {
        echo 'retro-borders';
    }
    ?>
"><?php 
    echo get_the_title();
    ?>
</h2>

	<div class="separator"><span>&times;&times;&times;</span></div>
	
	<div class="section-subtitle"><?php 
    echo retro_get_headline($post->ID);
    ?>
</div>
function retro_mail_form_html()
{
    wp_localize_script('retro-mail', 'retro_mail', array('url' => admin_url('admin-ajax.php'), 'ref' => wp_create_nonce('retro-mail-send')));
    wp_enqueue_script('retro-mail');
    ?>

	<form action="#" id="retro-mail-form">
		<fieldset>
			<input type="text" name="name" id="name" placeholder="<?php 
    _e('Name', 'openframe');
    ?>
">
			<input type="email" name="email" id="email" placeholder="<?php 
    _e('Email address', 'openframe');
    ?>
">
			<input type="text" name="subject" id="subject" placeholder="<?php 
    _e('Subject', 'openframe');
    ?>
">
			<textarea name="message" id="message" cols="60" rows="7" placeholder="<?php 
    _e('Your message', 'openframe');
    ?>
"></textarea>
			<?php 
    if (!op_theme_opt('human-off')) {
        ?>
				<div class="human-math right">2 + 3 = <input type="text" name="human" id="human" class="<?php 
        if (op_theme_opt('human-off')) {
            echo 'human-off';
        }
        ?>
"></div>
			<?php 
    }
    ?>
			<input id="send" type="submit" value="<?php 
    _e('Send Message', 'openframe');
    ?>
" class="button">
		</fieldset>

		<span id="contact-form-name-error"><?php 
    _e('Please, write your name.', 'openframe');
    ?>
</span>
		<span id="contact-form-email-error"><?php 
    _e('Please, insert your email address.', 'openframe');
    ?>
</span>
		<span id="contact-form-message-error"><?php 
    _e('Please, leave a message.', 'openframe');
    ?>
</span>
		<span id="contact-form-human-error"><?php 
    _e('Umh, are you good with math?', 'openframe');
    ?>
</span>
		<div id="contact-form-success" style="display: none;">
			<?php 
    _e('Message received! Thanks.', 'openframe');
    ?>
		</div>

	</form>

<?php 
}
Example #15
0
} elseif (isset($meta['kind']) && $meta['kind'] == 'stream') {
    ?>

			<?php 
    if (isset($meta['fetch']) && $meta['fetch'] == 'portfolio') {
        if (isset($meta['portfolio'])) {
            $id = (int) $meta['portfolio'];
            $retro_portfolio_args = array('portfolio_id' => $id, 'post_type' => 'portfolio-' . $id, 'posts_per_page' => op_theme_opt('portfolio-number'));
            require locate_template('part-portfolio.php');
        }
    }
    ?>

			<?php 
    if (isset($meta['fetch']) && $meta['fetch'] == 'article') {
        $retro_blog_args = array('posts_per_page' => op_theme_opt('article-number'));
        $retro_blog_query = new WP_Query($retro_blog_args);
        ?>

				<hr class="top-dashed"> 

				<div class="container">

					<div class="row clear">
						
						<?php 
        get_template_part('section', 'title');
        ?>

					</div><!-- row -->
Example #16
0
		<?php 
echo retro_mail_form_html();
?>

		<?php 
if (op_theme_opt('show-social')) {
    ?>

			<div class="social-icons">

				<?php 
    if (op_theme_opt('social-label')) {
        ?>

					<h5 class="section-title"><?php 
        echo op_theme_opt('social-label');
        ?>
</h5>

					<hr>  

				<?php 
    }
    ?>

				<?php 
    echo retro_get_social_links();
    ?>

			</div><!-- social-icons -->