예제 #1
0
    Responsive Grid: 	<?php 
echo HeadwayResponsiveGrid::is_enabled() ? 'Enabled' . "\n" : 'Disabled' . "\n";
?>
    
    Caching Allowed: 	<?php 
echo HeadwayCompiler::can_cache() ? 'Yes' . "\n" : 'No' . "\n";
?>
    Caching Enabled: 	<?php 
echo HeadwayCompiler::caching_enabled() ? 'Yes' . "\n" : 'No' . "\n";
?>
    Caching Plugin: 	<?php 
echo HeadwayCompiler::is_plugin_caching() ? HeadwayCompiler::is_plugin_caching() . "\n" : 'No caching plugin active' . "\n";
?>
    
	SEO Plugin: 		<?php 
echo HeadwaySEO::plugin_active() ? HeadwaySEO::plugin_active() . "\n" : 'No SEO plugin active' . "\n";
?>

    Operating System:	<?php 
echo ucwords($browser['platform']) . "\n";
?>
    Browser:			<?php 
echo $browser['name'] . "\n";
?>
    Browser Version:	<?php 
echo $browser['version'] . "\n";
?>
    
    Full User Agent:
    <?php 
echo $browser['userAgent'] . "\n";
예제 #2
0
					
			<?php 
$form = array(array('id' => 'affiliate-link', 'size' => 'large', 'value' => HeadwayOption::get('affiliate-link'), 'type' => 'text', 'label' => 'Affiliate Link', 'description' => '
						If you are a member of the Headway Affiliate program, you can paste your affiliate link and earn money when someone purchases Headway through your affiliate link.  <strong>Do NOT put HTML in this field.</strong>
							<br /><br /><strong>Not an affiliate?</strong>  If you\'re interested in the Headway Affiliate program, you may <a href="http://headwaythemes.com/affiliates" target="_blank">apply here</a>. Once your application is approved you can log in and grab your affiliate link.'));
HeadwayAdminInputs::generate($form);
?>
		
		</div><!-- #tab-general-content -->
	
		
		<div class="big-tab" id="tab-seo-content">
										
			<?php 
if (HeadwaySEO::plugin_active()) {
    switch (HeadwaySEO::plugin_active()) {
        case 'aioseop':
            echo '<div class="alert alert-yellow"><p>Headway has detected that you are using the All In One SEO pack plugin.  In order to reduce conflicts and save resources, Headway\'s SEO functionality has been disabled.</p></div>';
            break;
        case 'wpseo':
            echo '<div class="alert alert-yellow"><p>Headway has detected that you are using Yoast\'s WordPress SEO plugin.  In order to reduce conflicts and save resources, Headway\'s SEO functionality has been disabled.</p></div>';
            break;
    }
} else {
    ?>
	
				
				<h3 class="title" id="seo-templates-title">SEO Templates</h3>	

				<div id="seo-templates">
					<div id="seo-templates-hidden-inputs">
예제 #3
0
class HeadwayMetaBoxDisplay extends HeadwayAdminMetaBoxAPI
{
    protected $id = 'display';
    protected $name = 'Display';
    protected $inputs = array('css-class' => array('id' => 'css-class', 'name' => 'Custom CSS Class(es)', 'type' => 'text', 'description' => 'If you are familiar with <a href="http://www.w3schools.com/css/" target="_blank">CSS</a> and would like to style this entry by targeting a certain CSS class (or classes), then you may enter them in here.  The class will be added to the <strong>entry container\'s class</strong> along with the <strong>body class</strong> if only this entry is being viewed (i.g. single post or page view). Classes can be separated with spaces and/or commas.'));
}
headway_register_admin_meta_box('HeadwayMetaBoxPostThumbnail');
class HeadwayMetaBoxPostThumbnail extends HeadwayAdminMetaBoxAPI
{
    protected $id = 'post-thumbnail';
    protected $name = 'Featured Image Position';
    protected $context = 'side';
    protected $priority = 'low';
    protected $inputs = array('position' => array('id' => 'position', 'name' => 'Featured Image Position', 'type' => 'radio', 'options' => array('' => 'Use Block Default', 'left' => 'Left', 'right' => 'Right', 'above-title' => 'Above Title', 'above-content' => 'Above Content'), 'description' => 'Set the position of the featured image for this entry.', 'default' => '', 'group' => 'post-thumbnail'));
}
if (!HeadwaySEO::plugin_active()) {
    headway_register_admin_meta_box('HeadwayMetaBoxSEO');
}
class HeadwayMetaBoxSEO extends HeadwayAdminMetaBoxAPI
{
    protected $id = 'seo';
    protected $name = 'Search Engine Optimization (SEO)';
    protected $post_type_supports_id = 'headway-seo';
    protected $priority = 'high';
    protected $inputs = array('seo-preview' => array('id' => 'seo-preview', 'type' => 'seo-preview'), 'title' => array('id' => 'title', 'group' => 'seo', 'name' => 'Title', 'type' => 'text', 'description' => 'Custom <code>&lt;title&gt;</code> tag'), 'description' => array('id' => 'description', 'group' => 'seo', 'name' => 'Description', 'type' => 'textarea', 'description' => 'Custom <code>&lt;meta&gt;</code> description'), 'noindex' => array('id' => 'noindex', 'group' => 'seo', 'name' => '<code>noindex</code> this entry.', 'type' => 'checkbox', 'description' => 'Index/NoIndex tells the engines whether the entry should be crawled and kept in the engines\' index for retrieval. If you check this box to opt for <code>noindex</code>, the entry will be excluded from the engines.  <strong>Note:</strong> if you\'re not sure what this does, do not check this box.'), 'nofollow' => array('id' => 'nofollow', 'group' => 'seo', 'name' => '<code>nofollow</code> links in this entry.', 'type' => 'checkbox', 'description' => 'Follow/NoFollow tells the engines whether links on the entry should be crawled. If you check this box to employ "nofollow," the engines will disregard the links on the entry both for discovery and ranking purposes.  <strong>Note:</strong> if you\'re not sure what this does, do not check this box.'), 'noarchive' => array('id' => 'noarchive', 'group' => 'seo', 'name' => '<code>noarchive</code> links in this entry.', 'type' => 'checkbox', 'description' => 'Noarchive is used to restrict search engines from saving a cached copy of the entry. By default, the engines will maintain visible copies of all pages they indexed, accessible to searchers through the "cached" link in the search results.  Check this box to restrict search engines from storing cached copies of this entry.'), 'nosnippet' => array('id' => 'nosnippet', 'group' => 'seo', 'name' => '<code>nosnippet</code> links in this entry.', 'type' => 'checkbox', 'description' => 'Nosnippet informs the engines that they should refrain from displaying a descriptive block of text next to the entry\'s title and URL in the search results.'), 'noodp' => array('id' => 'noodp', 'group' => 'seo', 'name' => '<code>noodp</code> links in this entry.', 'type' => 'checkbox', 'description' => 'NoODP is a specialized tag telling the engines not to grab a descriptive snippet about a page from the Open Directory Project (DMOZ) for display in the search results.'), 'noydir' => array('id' => 'noydir', 'group' => 'seo', 'name' => '<code>noydir</code> links in this entry.', 'type' => 'checkbox', 'description' => 'NoYDir, like NoODP, is specific to Yahoo!, informing that engine not to use the Yahoo! Directory description of a page/site in the search results.'), 'redirect-301' => array('id' => 'redirect-301', 'group' => 'seo', 'name' => '301 Permanent Redirect', 'type' => 'text', 'description' => 'The 301 Permanent Redirect can be used to forward an old post or page to a new or different location.  If you ever move a page or change a page\'s permalink, use this to forward your visitors to the new location.<br /><br /><em>Want more information?  Read more about <a href="http://support.google.com/webmasters/bin/answer.py?hl=en&answer=93633" target="_blank">301 Redirects</a>.</em>'));
    protected function input_seo_preview()
    {
        global $post;
        $date = get_the_time('M j, Y') ? get_the_time('M j, Y') : mktime('M j, Y');
        $date_text = $post->post_type == 'post' ? $date . ' ... ' : null;
        echo '<h4 id="seo-preview-title">Search Engine Result Preview</h4>';