Skip to content

Instantly share code, notes, and snippets.

John Regan johnregan3

Block or report user

Report or block johnregan3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@johnregan3
johnregan3 / gutenberg-custom-editor-styles.php
Last active Apr 16, 2019
Gutenberg Custom Editor Styles - PHP
View gutenberg-custom-editor-styles.php
<?php
/**
* Enqueue the Gutenberg editor stylesheet.
*
* Put this in your functions.php.
*
* @action enqueue_block_editor_assets
*/
function jr3_enqueue_gutenberg() {
// Make sure you link this to your actual file.
@johnregan3
johnregan3 / full-width-image-theme-support.css
Last active Dec 19, 2018
Add Full Width Image Support in a WordPress Theme - CSS
View full-width-image-theme-support.css
.alignwide {
/* Set these margins to work with your own theme. */
margin-left: -80px;
margin-right: -80px;
max-width: 100vw;
}
.alignfull {
margin-left: calc(-100vw / 2 + 100% / 2);
margin-right: calc(-100vw / 2 + 100% / 2);
@johnregan3
johnregan3 / full-width-image-theme-support.php
Last active Dec 19, 2018
Add Full Width Image Support in a WordPress Theme - PHP
View full-width-image-theme-support.php
<?php
/**
* Add Theme Support for wide and full-width images.
*
* Add this to your theme's functions.php, or wherever else
* you are adding your add_theme_support() functions.
*
* @action after_setup_theme
*/
function jr3_theme_setup() {
@johnregan3
johnregan3 / keybase.md
Created May 17, 2017
Keybase Verification
View keybase.md

Keybase proof

I hereby claim:

  • I am johnregan3 on github.
  • I am johnregan3 (https://keybase.io/johnregan3) on keybase.
  • I have a public key whose fingerprint is BF11 701D 8DF1 68F1 8796 28ED A894 0B45 6721 8112

To claim this, I am signing this object:

View local.overrides.php
<?php
define('DOMAIN_CURRENT_SITE', 'local-www.kiss925.com');
// ** Site URL settings ** //
define('WP_SITEURL', 'local-www.kiss925.com');
define('WP_HOME', 'local-www.kiss925.com');
View gist:29ffb3fd78c462fa47b8d1b5a7576c06
server {
listen 80;
listen 443 ssl;
server_name local-www.network.rogersradio.ca local-www.kiss925.com local-www.sonic1029.com local-www.jackfm.com;
root /srv/www/musicradio/build/webroot;
include /etc/nginx/nginx-wp-common.conf;
}
@johnregan3
johnregan3 / wp-amp-tutorial-style.php
Last active Jul 21, 2016
Brief example of CSS for WP AMP style.php
View wp-amp-tutorial-style.php
<?php
/**
* Slightly modified version of the default WP AMP stylesheet, style.php.
*
* This is pared down for clarity.
*
* @link https://github.com/Automattic/amp-wp/blob/master/templates/style.php
*/
?>
/* Merriweather fonts */
@johnregan3
johnregan3 / wp-amp-tutorial-featured-images.php
Created Jul 21, 2016
Add Featured Images to a WordPress AMP Template
View wp-amp-tutorial-featured-images.php
@johnregan3
johnregan3 / wp-amp-tutorial-strip-shortcodes.php
Last active Sep 28, 2016
Strip out all Shortcodes for a WordPress AMP template.
View wp-amp-tutorial-strip-shortcodes.php
<?php
/**
* Strip out all shortcode content.
*
* This is a quick and dirty way
* to ensure no shortcodes introduce
* invalid markup into an amp template.
*
* @param string $content WP Post content.
*
@johnregan3
johnregan3 / wp-amp-tutorial-component-scripts.php
Last active Sep 28, 2016
Add component scripts to WP AMP
View wp-amp-tutorial-component-scripts.php
<?php
/**
* Register the amp-sidebar and amp-accordion component scripts with WP AMP.
*
* This goes in your amp.php
*/
function jr3_amp_component_scripts( $data ) {
$data['amp_component_scripts']['amp-sidebar'] = 'https://cdn.ampproject.org/v0/amp-sidebar-0.1.js';
$data['amp_component_scripts']['amp-accordion'] = 'https://cdn.ampproject.org/v0/amp-accordion-0.1.js';
You can’t perform that action at this time.