Exemplo n.º 1
0
function vapor_twitter_card()
{
    $twitter = site_meta('twitter_account');
    if ($twitter != '' || $twitter != NULL) {
        $title = article_id() ? article_title() : site_name();
        $description = article_id() ? article_description() : site_description();
        echo '<meta name="twitter:card" content="summary" />
	<meta name="twitter:site" content="@' . str_replace('@', '', $twitter) . '" />
	<meta name="twitter:title" content="' . $title . '" />
	<meta name="twitter:description" content="' . $description . '" />';
    }
}
Exemplo n.º 2
0
function my_get_description($len = 500)
{
    if (!Registry::get('article')) {
        $description = site_description();
    } else {
        $description = trim(Registry::prop('article', 'description'));
        if (empty($description)) {
            $description = parse(Registry::prop('article', 'html'));
        }
        $description = trim(preg_replace('#<[^>]+>#', ' ', $description));
    }
    if (strlen($description) > $len) {
        $description = substr($description, 0, $len - 3) . '...';
    }
    return preg_replace('/[\\n\\r\\t]+/', ' ', preg_replace('/\\s+/', ' ', $description));
}
Exemplo n.º 3
0
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title><?php 
echo page_title();
?>
 - <?php 
echo site_name();
?>
</title>

		<meta name="description" content="<?php 
echo site_description();
?>
">

		<link rel="stylesheet" href="<?php 
echo theme_url('/css/reset.css');
?>
">
		<link rel="stylesheet" href="<?php 
echo theme_url('/css/style.css');
?>
">
		
		<link rel="alternate" type="application/rss+xml" title="RSS" href="<?php 
echo rss_url();
?>
">
Exemplo n.º 4
0
Arquivo: head.php Projeto: cutout/ptd
        <link rel="stylesheet" href="<?php 
echo css_path('css/styles.css');
?>
" />
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:100,300,400,300italic" />
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.css" />

        <link type="text/plain" rel="author" href="<?php 
echo path('humans.txt');
?>
" />

        <meta name="google-site-verification" content="VDLz-TZD53CTCmTol81Cd1UoOyz5RuAjdyjiP4irmsk" />
        <meta name="description" content="<?php 
site_description('', true);
?>
">

        <script>
            var GUMROAD_ACTIVE = '<?php 
echo DISABLE_GUMROAD ? 'false' : 'true';
?>
';
        </script>
<?php 
include 'head-open-graph.php';
if ('prod' == ENV) {
    include 'tracking.php';
}
?>
Exemplo n.º 5
0
    if (!($plugins = plugins_get_by_tag($tag))) {
        Flight::notFound();
    }
    Flight::render($view, array('tag' => $tag, 'plugins' => $plugins));
});
/**
 * 404
 */
Flight::map('notFound', function () {
    site_title('404 - not found :(');
    $request = Flight::request();
    // see if a page exists
    if ($page_info = page_exists($request->url)) {
        site_title($page_info['title']);
        if (null !== $page_info['description']) {
            site_description($page_info['description']);
        }
        Flight::render($page_info['view']);
        die;
    }
    // see if there's a valid permanent redirect, and if there is send the user to the new location
    if ($redirect_url = redirect_destination($request->url)) {
        Flight::redirect($redirect_url, 301);
        die;
    }
    header('HTTP/1.0 404 Not Found');
    site_header_title('404 :(');
    site_description('<a href="' . path() . '">Visit the homepage <i class="fa fa-arrow-right"></i></a>');
    Flight::render('404.php');
    die;
});
Exemplo n.º 6
0
                ?>
" content="<?php 
                echo $value;
                ?>
" />
<?php 
            }
        }
    }
}
/**
 * Check if Gumroad is enabled and if it is then add the Gumroad script
 */
function site_enable_purchase()
{
    if (!DISABLE_GUMROAD) {
        site_script('https://gumroad.com/js/gumroad.js', true);
    }
}
// Set Defaults
// default site description
site_description('Designing <strong>Professional WordPress Themes</strong> since 2007.');
// default site title
site_title('Pro Theme Design - WordPress Themes and Plugins');
// default site page header title
site_header_title('Pro Theme Design');
// default site og:type
site_meta('og:type', 'website');
// default site scripts
site_script('https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js');
site_script(js_path('main.min.js'));