function wps_current_theme() { if (!isset($_GET['wps_preview_theme'])) { return wps_get_option('current_theme'); } else { return $_GET['wps_preview_theme']; } }
} ?> <?php if (wps_get_option('show_post_tags') && ($tags = wps_get_tags())) { ?> <span class="entry-taxonomy"><strong>Tags</strong>: <?php echo $tags; ?> </span><?php } ?> </div> </div> <?php if ($post_image_src != '' && wps_get_option('show_featured_image_in_post')) { ?> <div class="entry-image"><img src="<?php echo $post_image_src; ?> " /></div> <?php } ?> <div class="entry-content"><?php the_content(); ?> </div> </div> </article>
public static function update() { $prior_version = wps_get_option('admin_notices'); if ($prior_version) { if ($prior_version < '0.0.1') { add_action('admin_notices', array(__CLASS__, 'notice_0_0_1')); } if ($prior_version < self::VERSION) { wps_init_options(); do_action('wps_update'); } wps_set_option('admin_notices'); } // display donate on major/minor version release $donate_version = wps_get_option('donate_version', false); if (!$donate_version || $donate_version != self::VERSION && preg_match('#\\.0$#', self::VERSION)) { add_action('admin_notices', array(__CLASS__, 'notice_donate')); wps_set_option('donate_version', self::VERSION); } }
?> ; color: <?php echo wps_get_option('header_text_color'); ?> ; } .site-header a { color: <?php echo wps_get_option('header_text_color'); ?> ; } .arrow-down { border-top-color: <?php echo wps_get_option('header_text_color'); ?> ; } </style> <div id="page" class="site" data-role="page"> <?php wps_banner(); ?> <div id="main" data-role="content"> <div id="main-content">
</div> </div> </div> <div class="wps-admin-right-column"> <div class="wps-admin-menu-message <?php echo wps_get_option('enable_menu') ? 'hidden' : null; ?> " id="wps-menu-disabled-message"> Menus aren't enabled, to enable them click the checkbox to the left. </div> <ul class="menu ui-sortable wps-admin-menu-links nav-menus-php <?php echo !wps_get_option('enable_menu') ? 'hidden' : null; ?> " id="wps-edit-menu"> <?php $i = 0; foreach (wps_get_menu_links() as $wps_menu_item) { ?> <li class="menu-item menu-item-edit-inactive"> <dl class="menu-item-bar"> <dt class="menu-item-handle"> <span class="item-title"><?php echo $wps_menu_item['title']; ?> </span>
<?php if (wps_get_option('front_page') != '' && !is_category() && !is_search()) { // if custom front page is set and not a search or category page query_posts('page_id=' . wps_get_option('front_page')); get_template_part('front_page'); wp_reset_query(); } else { // else show normal homepage global $is_ajax; $is_ajax = isset($_SERVER['HTTP_X_REQUESTED_WITH']); if (!$is_ajax) { get_header(); // if not an ajax request ?> <div class="home-content"> <?php wps_page_head(); ?> <?php } // end if not an ajax request ?> <?php if (have_posts()) { while (have_posts()) {
public static function initialize_settings($version = null) { $version = wps_get_option('version', self::$version); parent::initialize_settings($version); }
<!DOCTYPE html> <html <?php language_attributes(); ?> > <head> <meta charset="<?php bloginfo('charset'); ?> " /> <meta name="viewport" content="initial-scale=1" /> <title><?php echo wps_get_option('site_title'); ?> </title> <?php wps_enqueue_header(); wp_head(); ?> <script type="text/javascript">var $wpsmart = jQuery.noConflict();</script> </head> <body>
?> </ul> <?php } // have_comments() ?> <?php } // are comments closed and there are no comments? ?> <?php if (!wps_get_option('enable_comments')) { ?> <p class="comments-closed alert notice">Comments are closed.</p> <?php } else { ?> <div id="respond" class="post-comment"> <h3>Post a new comment</h3> <a rel="nofollow" id="cancel-comment-reply-link" href="#" style="display: none;" class="cancel-reply">Cancel reply</a> <form action="<?php
echo $post_image_src == '' || !wps_get_option('show_thumbnails') ? "padding-right:0" : null; ?> "> <a href="<?php the_permalink(); ?> " target="_self" rel="bookmark" style="display:block;"> <div class="entry-image" style="<?php if ($post_image_src != '') { ?> background-image:url(<?php echo $post_image_src; ?> );<?php } echo !wps_get_option('show_thumbnails') ? 'display:none' : null; ?> "></div> <div class="entry-header"> <h1 class="entry-title"><?php the_title(); ?> </h1> <div class="entry-meta"><?php echo wps_posted_on(false); ?> </div> </div> </a> <div class="clear"></div>
<div class="wps-admin-section"> <div class="wps-admin-section-title"> <span>Site Header Text & Icon Color</span> </div> <div class="wps-admin-section-input-group"> <div class="wps-admin-section-input"> <input type="text" name="header_text_color" id="header_text_color" class="wps-input-small wps-minicolors" value="<?php echo wps_get_option('header_text_color'); ?> "/> </div> <div class="wps-admin-section-hint">Change the color of the text and icons (e.g. search icon) of the header</div> </div> </div> <div class="wps-admin-section"> <div class="wps-admin-section-title"> <span>Site Header Trim Color</span> </div> <div class="wps-admin-section-input-group"> <div class="wps-admin-section-input"> <input type="text" name="header_trim_color" id="header_trim_color" class="wps-input-small wps-minicolors" value="<?php echo wps_get_option('header_trim_color'); ?> "/> </div> <div class="wps-admin-section-hint">Change the header's top border color</div> </div> </div> </div>
?> >Custom</option> </select> </div> </div> <div class="wps-admin-section-input-group wps-admin-advertising-group <?php echo wps_get_option('advertising_type') != 'google_adsense' ? "hidden" : null; ?> " id="ads_google_adsense"> <div class="wps-admin-section-input"> <label>Google AdSense Client ID</label> <input type="text" class="text" id="adsense_client_id" name="adsense_client_id" value="<?php echo wps_get_option('adsense_client_id'); ?> "/> </div> </div> <div class="wps-admin-section-input-group wps-admin-advertising-group <?php echo wps_get_option('advertising_type') != 'custom_advertising' ? "hidden" : null; ?> " id="ads_custom_advertising"> <div class="wps-admin-section-input"> <label>Custom advertising code</label> <textarea id="custom_advertising_code" name="custom_advertising_code" rows="5"><?php echo wps_html_unclean(wps_get_option('custom_advertising_code')); ?> </textarea> </div> </div> </div> </div>
<!-- Analytics code --> <?php if (wps_get_option('analytics_type') == 'google_analytics') { wps_google_analytics_script(wps_get_option('google_analytics_code')); } elseif (wps_get_option('analytics_type') == 'custom_analytics') { echo wps_html_unclean(wps_get_option('custom_analytics_code')); } ?> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-35007573-2', 'wpsmart.com'); ga('send', 'pageview'); ga('set', 'dimension1', document.domain); </script> </body> </html>
/** * Draw the header's banner containing logo as well as search and menu drop-downs * */ function wps_banner() { ?> <!-- header --> <header id="masthead" class="site-header" data-role="header" data-position="fixed"> <div id="view-search" class="view-search <?php echo !wps_get_option('enable_search') ? "hidden" : null; ?> "><a href="#"><i class="icon-search"></i></a></div> <div id="view-menu" class="view-menu <?php echo !wps_get_option('enable_menu') ? "hidden" : null; ?> "><a href="#"><i class="icon-reorder"></i></a></div> <h1 class="site-title"> <a href="<?php bloginfo('url'); ?> " target="_self" rel="home"> <?php if (wps_get_option('site_logo') == '') { ?> <?php echo wps_get_option('site_title'); ?> <?php } else { ?> <img src="<?php echo wps_get_option('site_logo'); ?> "/> <?php } ?> </a> </h1> </header> <!-- Advertising code --> <?php if (wps_get_option('advertising_type') == 'google_adsense') { wps_google_adsense_script(wps_get_option('adsense_client_id')); ?> <?php } elseif (wps_get_option('advertising_type') == 'custom_advertising') { echo wps_html_unclean(wps_get_option('custom_advertising_code')); ?> <?php } ?> <!-- menu bar --> <div class="menu-bar header-drop-down"> <ul> <?php foreach (wps_get_menu_links() as $links) { ?> <li><a href="<?php echo $links['url']; ?> " target="_self"><?php echo $links['title']; ?> </a></li> <?php } ?> </ul> </div> <!-- search form drop-down --> <div class="search-bar header-drop-down"> <div class="search-head"> <form action="<?php echo home_url('/'); ?> " method="get" id="search-form" autocomplete="off" data-ajax="false"> <?php if (wps_is_in_preview_mode()) { ?> <input type="hidden" name="wps_preview" value="1"/> <?php } ?> <div class="search-input-wrap input-wrap"> <label id="search-input-label">Search by article title</label> <input id="s" name="s" type="search" value="" /> </div> </form> </div> </div> <?php }