コード例 #1
0
ファイル: footer.php プロジェクト: noelsaw/QuickLaunch.me
<?php

$ql_widgets = get_option('ql_widgets');
$ql_title_tagline = get_option('ql_title_tagline');
?>

		</div>
		<!-- End inner wrapper -->
	</div>
	<!-- End Page Wrapper -->

	<?php 
wp_footer();
if (ql_is_personalizing()) {
    get_template_part('template-admin-palette');
}
?>
	<script src="http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"></script>
	<script type="text/javascript">
			<?php 
if ($ql_title_tagline['font']) {
    ?>
			WebFont.load({
				google: {
					families: ['<?php 
    echo $ql_title_tagline['font'];
    ?>
']
				},
				active:function(){
					var style = 'header h1{ font-family: "<?php 
コード例 #2
0
ファイル: functions.php プロジェクト: noelsaw/QuickLaunch.me
/**
 * Automatically adds links to valid URLs in our post content.
 *
 * @param string $content the post content
 * @return string
 * @since 1.1
 * @credit http://www.couchcode.com/php/auto-link-function/
 */
function ql_auto_link($content)
{
    if (!ql_is_personalizing()) {
        $pattern = "/(((http[s]?:\\/\\/)|(www\\.))(([a-z][-a-z0-9]+\\.)?[a-z][-a-z0-9]+\\.[a-z]+(\\.[a-z]{2,2})?)\\/?[a-z0-9._\\/~#&=;%+?-]+[a-z0-9\\/#=?]{1,1})/is";
        $content = preg_replace($pattern, " <a href='\$1'>\$1</a>", $content);
        $content = preg_replace("/href='www/", "href='http://www", $content);
        return $content;
    } else {
        return $content;
    }
}