/**
     * Add theme specific content to the header.
     *
     * @since 0.1.0
     */
    public function pc_ts_custom_wp_head()
    {
        ?>
<!--[if IE 8]>
<style type="text/css">
.comment-body, li.pingback, .quote, .avatar, .defaultbtn, .button, .btn, #searchsubmit, #submit, .submit, .post-edit-link, .more-link, input[type="submit"], input[type="text"], textarea, ol.flex-control-nav li a, ol.flex-control-nav li a.active, .flex-direction-nav li a, .post-date, nav.secondary-menu, nav ul ul {
behavior: url(<?php 
        echo PC_Utility::theme_resource_uri('includes/js', 'PIE.htc');
        ?>
);
}
</style>
<![endif]-->
<?php 
    }
Пример #2
0
    function widget($args, $instance)
    {
        extract($args);
        echo $before_widget;
        $title = $instance['title'];
        $info_description = $instance['info_description'];
        $phone_number = $instance['phone_number'];
        $twitter_id = $instance['twitter_id'];
        $facebook_id = $instance['facebook_id'];
        $rss_id = $instance['rss_id'];
        $youtube_id = $instance['youtube_id'];
        $googleplus_id = $instance['googleplus_id'];
        $linkedin_id = $instance['linkedin_id'];
        $flickr_id = $instance['flickr_id'];
        $pinterest_id = $instance['pinterest_id'];
        $custom_id_1 = $instance['custom_id_1'];
        $custom_img_1 = $instance['custom_img_1'];
        if (!empty($title)) {
            echo $before_title . $title . $after_title;
        }
        if (!empty($info_description)) {
            echo '<span class="info_description">' . $info_description . '</span>';
        }
        if (!empty($phone_number)) {
            echo '<span class="phone"><a href="tel:' . $phone_number . '">' . $phone_number . '</a></span>';
        }
        /* Icons that need only an ID specified. */
        if (!empty($facebook_id)) {
            echo '<a href="http://www.facebook.com/' . $facebook_id . '" target="_blank" class="sm-icon"><img src="' . PC_Utility::theme_resource_uri(array('images/', 'api/images/icons/'), 'facebook.png', 'images/') . '" width="32" height="32" alt="Facebook" /></a>';
        }
        if (!empty($twitter_id)) {
            echo '<a href="http://twitter.com/' . $twitter_id . '" target="_blank" class="sm-icon"><img src="' . PC_Utility::theme_resource_uri(array('images/', 'api/images/icons/'), 'twitter.png', 'images/') . '" width="32" height="32" alt="Twitter" /></a>';
        }
        if (!empty($youtube_id)) {
            echo '<a href="http://www.youtube.com/user/' . $youtube_id . '" target="_blank" class="sm-icon"><img src="' . PC_Utility::theme_resource_uri(array('images/', 'api/images/icons/'), 'youtube.png', 'images/') . '" width="32" height="32" alt="YouTube" /></a>';
        }
        if (!empty($flickr_id)) {
            echo '<a href="http://www.flickr.com/photos/' . $flickr_id . '" target="_blank" class="sm-icon"><img src="' . PC_Utility::theme_resource_uri(array('images/', 'api/images/icons/'), 'flickr.png', 'images/') . '" width="32" height="32" alt="Flickr" /></a>';
        }
        if (!empty($pinterest_id)) {
            echo '<a href="http://pinterest.com/' . $pinterest_id . '" target="_blank" class="sm-icon"><img src="' . PC_Utility::theme_resource_uri(array('images/', 'api/images/icons/'), 'pinterest.png', 'images/') . '" width="32" height="32" alt="Pinterest" /></a>';
        }
        /* Icons that need a full URL specified. */
        if (!empty($googleplus_id)) {
            echo '<a href="' . $googleplus_id . '" target="_blank" class="sm-icon"><img src="' . PC_Utility::theme_resource_uri(array('images/', 'api/images/icons/'), 'googleplus.png', 'images/') . '" width="32" height="32" alt="Google+" /></a>';
        }
        if (!empty($linkedin_id)) {
            echo '<a href="' . $linkedin_id . '" target="_blank" class="sm-icon"><img src="' . PC_Utility::theme_resource_uri(array('images/', 'api/images/icons/'), 'linkedin.png', 'images/') . '" width="32" height="32" alt="Linked In" /></a>';
        }
        if (!empty($rss_id)) {
            echo '<a href="' . $rss_id . '" target="_blank" class="sm-icon"><img src="' . PC_Utility::theme_resource_uri(array('images/', 'api/images/icons/'), 'rss.png', 'images/') . '" width="32" height="32" alt="RSS" /></a>';
        }
        if (!empty($custom_id_1)) {
            echo '<a href="' . $custom_id_1 . '" target="_blank" class="sm-icon"><img src="' . $custom_img_1 . '" width="32" height="32" alt="Custom Icon 1" /></a>';
        }
        ?>

		<?php 
        if ($instance['show_search'] == "1") {
            ?>
			<div class="search">
			 <form role="search" method="get" id="searchform" action="<?php 
            echo home_url('/');
            ?>
" >
				<span>
					<input type="text" placeholder="Search…" value="<?php 
            echo get_search_query();
            ?>
" size="10" name="s" id="s"><input type="submit" id="searchsubmit" value="<?php 
            echo esc_attr__('Search', 'presscoders');
            ?>
">
				</span>
			 </form>
			</div>
		<?php 
        }
        echo $after_widget;
    }
Пример #3
0
 /**
  * Check favicon url is valid.
  *
  * @since 0.1.0
  */
 public static function get_custom_favicon()
 {
     $options = get_option(PC_OPTIONS_DB_NAME);
     $favicon = $options['txt_favicon'];
     if (isset($favicon) && !empty($favicon)) {
         /* If variable set, and non-empty. */
         if (self::checkLink($favicon)) {
             /* If favicon url contains 'http://'. */
             $allowed = array('ico', 'png', 'jpg', 'gif');
             $ext = substr($favicon, -3);
             if (in_array($ext, $allowed)) {
                 /* If the extension is valid. */
                 return $favicon;
             }
         }
     }
     /* Favicon url set in theme options doesn't exist or seem to be valid. So, use theme default or child theme favicon. */
     $favicon = PC_Utility::theme_resource_uri('images', array('favicon.ico', 'favicon.png', 'favicon.jpg', 'favicon.gif'));
     return $favicon;
 }
Пример #4
0
 /**
  * Register and enqueue front end Cufon scripts.
  *
  * @since 0.1.0
  */
 public function enqueue_cufon()
 {
     /* Don't enqueue these scripts on admin pages. */
     if (!is_admin()) {
         /* Access the global theme features array. */
         global $_wp_theme_features;
         $font = $_wp_theme_features['cufon'][0];
         /* Register Cufon scripts */
         wp_register_script('cufon-yui', PC_THEME_ROOT_URI . '/api/js/misc/cufon/cufon-yui.js');
         wp_register_script('cufon-' . $font, PC_Utility::theme_resource_uri('includes/fonts', $font . '.js'), array('cufon-yui'));
         wp_register_script('cufon-custom', PC_THEME_ROOT_URI . '/includes/fonts/custom-cufon.js', array('cufon-' . $font));
         /* Enqueue Cufon scripts */
         wp_enqueue_script('cufon-yui');
         wp_enqueue_script('cufon-' . $font);
         wp_enqueue_script('cufon-custom');
     }
 }
Пример #5
0
    public static function default_main_post_loop_content($args = array())
    {
        ?>

		<div id="post-<?php 
        the_ID();
        ?>
" <?php 
        post_class();
        ?>
>

			<?php 
        $options = get_option(PC_OPTIONS_DB_NAME);
        if (isset($options['chk_post_thumbails'])) {
            ?>
			  <div class="post-thumb">
				<?php 
            if (has_post_thumbnail()) {
                the_post_thumbnail();
                /* Show post thumbnail. */
            } else {
                /* Show default post thumb. */
                ?>
					<img src="<?php 
                echo PC_Utility::theme_resource_uri('images', 'default-post-thumb.jpg');
                ?>
" alt="" />
				<?php 
            }
            ?>
			  </div> <!-- .post-thumb -->
			<?php 
        }
        // endif
        ?>
			
			<h2 class="entry-title"><a href="<?php 
        the_permalink();
        ?>
" rel="bookmark"><?php 
        the_title();
        ?>
</a></h2>
		   
			<div class="post-content">
			
				<?php 
        global $more;
        $more = 0;
        the_content(' ' . $args['read_more']);
        wp_link_pages(array('before' => '<div class="page-link">', 'after' => '</div>'));
        ?>
			</div> <!-- .post-content -->
			
			<div class="post-meta">

				<?php 
        PC_Hooks::pc_post_meta();
        /* Framework hook wrapper */
        ?>

				<p>
					<span class="date"><?php 
        the_time('M j, Y');
        ?>
</span>
					<span class="categories"><?php 
        the_category(', ');
        ?>
</span>

					<?php 
        if (comments_open()) {
            ?>
					<span class="comments"><a href="<?php 
            the_permalink();
            ?>
#comments" title="<?php 
            the_title_attribute();
            ?>
"><?php 
            comments_number('Leave a Comment', '1 Comment', '% Comments');
            ?>
</a></span>
					<?php 
        }
        ?>
				</p>
			</div><!-- .post-meta -->

		</div> <!-- .post -->
	
	<?php 
    }