Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #1 from cmc12028/master
adding webfont to grandchild theme
  • Loading branch information
bcd04001 committed Apr 7, 2016
2 parents 5124b12 + 08bb8ed commit 1824513
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 7 deletions.
5 changes: 5 additions & 0 deletions _notes/dwsync.xml
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="grandchild-functions.php" server="development.wordpress.uconn.edu/edu.uconn.wordpress.development/public_html/wp-content/" local="131045124834778163" remote="131045124820000000" Dst="2" />
<file name="grandchild-styles.css" server="development.wordpress.uconn.edu/edu.uconn.wordpress.development/public_html/wp-content/" local="131045143970231517" remote="131045143960000000" Dst="2" />
</dwsync>
7 changes: 7 additions & 0 deletions fonts/_notes/dwsync.xml
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="altgoth.eot" server="development.wordpress.uconn.edu/edu.uconn.wordpress.development/public_html/wp-content/" local="131037694040000000" remote="131045128600000000" Dst="2" />
<file name="altgoth.ttf" server="development.wordpress.uconn.edu/edu.uconn.wordpress.development/public_html/wp-content/" local="131037694020000000" remote="131045128600000000" Dst="2" />
<file name="altgoth.woff" server="development.wordpress.uconn.edu/edu.uconn.wordpress.development/public_html/wp-content/" local="131037694040000000" remote="131045128600000000" Dst="2" />
<file name="altgoth.woff2" server="development.wordpress.uconn.edu/edu.uconn.wordpress.development/public_html/wp-content/" local="131037694060000000" remote="131045128600000000" Dst="2" />
</dwsync>
Binary file added fonts/altgoth.eot
Binary file not shown.
Binary file added fonts/altgoth.ttf
Binary file not shown.
Binary file added fonts/altgoth.woff
Binary file not shown.
Binary file added fonts/altgoth.woff2
Binary file not shown.
47 changes: 47 additions & 0 deletions grandchild-functions.php
@@ -0,0 +1,47 @@
<?php
/*
Plugin Name: CIRCA
Description: Sample grandchild theme built as a plugin.
Author: Web Dev
Author URI: http://www.your-website.com
Version: 1.0
*/


require_once( plugin_dir_path( __FILE__ ) . 'template-class.php' );
add_action( 'plugins_loaded', array( 'Page_Template_Plugin', 'get_instance' ) );

// Adds our new file with styles
function grandchild_add_scripts_styles() {
wp_register_script( 'grandchild-script', plugins_url( 'grandchild-scripts.js', __FILE__ ), array( 'jquery' ), '1.0' );
wp_enqueue_script( 'grandchild-script' );

wp_register_style( 'grandchild-style', plugins_url( 'grandchild-styles.css', __FILE__ ), array(), '1.0' );
wp_enqueue_style( 'grandchild-style' );
}
add_action( 'wp_enqueue_scripts', 'grandchild_add_scripts_styles', 99999999 );

// Search for templates in plugin 'templates' dir, and load if exists
function grandchild_template_include( $template ) {
if ( file_exists( untrailingslashit( plugin_dir_path( __FILE__ ) ) . '/templates/' . basename( $template ) ) )
$template = untrailingslashit( plugin_dir_path( __FILE__ ) ) . '/templates/' . basename( $template );

return $template;
}
add_filter( 'template_include', 'grandchild_template_include', 11 );

// We are hooking to the 'load_custom_header' filter
// and return a value of 'true' meaning that we want to
// load a custom header
/*add_filter( 'load_custom_header', '__return_true', 99 );
add_filter( 'get_custom_header', function( $header ) {
return plugin_dir_path( __FILE__ ).'templates/header.php';
}, 99 );
add_filter( 'load_custom_footer', '__return_true', 99 );
add_filter( 'get_custom_footer', function( $footer ) {
return plugin_dir_path( __FILE__ ).'templates/footer.php';
}, 99 );
*/
34 changes: 34 additions & 0 deletions grandchild-styles.css
@@ -0,0 +1,34 @@
/* @import must be at top of file, otherwise CSS will not work */
@import url("//hello.myfonts.net/count/30bca5");


@font-face {font-family: 'altgoth';
src: url('fonts/altgoth.eot');
src: url('fonts/altgoth.eot?#iefix') format('embedded-opentype'),url('fonts/altgoth.woff2') format('woff2'),url('fonts/altgoth.woff') format('woff'),url('fonts/altgoth.ttf') format('truetype');}

h1, h2, h3, h4, h5, h6 {
font-family: 'altgoth', helvetica, arial, sans-serif;
}

h1 {
font-size: 32px;
}

h2 {
font-size: 29px;
}

h3 {
font-size: 26px;
}

h4 {
font-size: 24px;
}

h5 {
font-size: 22px;
}
h6 {
font-size: 21px;
}
7 changes: 0 additions & 7 deletions hola-world.rtf

This file was deleted.

0 comments on commit 1824513

Please sign in to comment.