Skip to content

Instantly share code, notes, and snippets.

View johnregan3's full-sized avatar

John Regan johnregan3

View GitHub Profile
@johnregan3
johnregan3 / gutenberg-custom-editor-styles.css
Last active December 21, 2018 22:48
Gutenberg Custom Editor Styles - CSS
/* Custom Editor Styles */
/*
* With some edits, this can be used as a base for your Custom Editor Styles.
* Note that this is for demonstration purposes only, and some elements may not
* be covered here.
*/
/* Approximate the theme width, except for full-width images. */
.wp-block:not( '.editor-block-list__block["data=full"]' ) {
@johnregan3
johnregan3 / gutenberg-custom-editor-styles.php
Last active April 16, 2019 16:08
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 December 19, 2018 05:29
Add Full Width Image Support in a WordPress Theme - 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 December 19, 2018 05:29
Add Full Width Image Support in a WordPress Theme - 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 17:10
Keybase Verification

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:

<?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');
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 July 21, 2016 19:28
Brief example of CSS for WP AMP 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 July 21, 2016 18:13
Add Featured Images to a WordPress AMP Template
@johnregan3
johnregan3 / wp-amp-tutorial-strip-shortcodes.php
Last active October 20, 2021 17:43
Strip out all Shortcodes for a WordPress AMP template.
<?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.
*