This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am johnregan3 on github. | |
* I am johnxwp (https://keybase.io/johnxwp) on keybase. | |
* I have a public key whose fingerprint is 2D1B 7A65 8C07 4C6D C7F9 96B9 9204 900E DDA2 50A4 | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add custom Genesis favicon | |
* | |
* Dude, replace the default Genesis favicon so you don't look like a n00b. | |
* Create your custom favicon.ico and place it in your child theme's directory. | |
* Add this code to your child theme's functions.php | |
* | |
* Images can be converted to the .ico format here: http://www.favicon-generator.org/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Plugin Header... | |
* | |
* Note: This particular block of code won't actually run because it doesn't have | |
* the details of the register_post_type and register_taxonomy functions filled in. | |
*/ | |
class JR3_Books { | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: John Regan's Improved AWP Rules | |
* Plugin URI: https://gist.github.com/johnregan3/4a145185d97dd33806ad | |
* Version: 1.0 | |
* | |
* @see http://www.advancedwp.org/awp-contribution-rules/ | |
* | |
* Description: Yes, I get it -- this document was never intended to be technical, it's intended to be fun and readable. | |
* This is not intended to be a criticism of the original in any way; it's just a way for me to introduce myself to the group, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Register CPTs to be included with AMP integration. | |
* | |
* Be sure to visit Settings > Permalinks and save twice | |
* to ensure the rewrite rules are flushed after adding this. | |
* | |
* @action amp_init | |
*/ | |
function jr3_amp_register_post_types() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add a custom AMP template file. | |
* | |
* Registers templates in a templates subdirectory by post type slug. | |
* (e.g., "./templates/book.php") | |
* | |
* @filter amp_post_template_file | |
* | |
* @param string $file The file name input. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Hijack a hypothetical [podcast] custom shortcode for AMP. | |
* | |
* Replaces [podcast] output with amp-audio. | |
* | |
* Be sure you've added the amp-audio component script to the template. | |
* | |
* @filter the_content | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Include AMP component scripts. | |
* | |
* Be sure to only register the scripts for the extensions | |
* that you really need to reduce page load times. | |
* | |
* @filter amp_post_template_data | |
* | |
* @param array $data Input from filter. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html ⚡> | |
<head> | |
<meta charset="utf-8"> | |
<title>Sample document</title> | |
<link rel="canonical" href="./regular-html-version.html"> | |
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> | |
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> | |
<scrip |