Skip to content

Instantly share code, notes, and snippets.

View carolinan's full-sized avatar
💭
I may be slow to respond.

Carolina Nymark carolinan

💭
I may be slow to respond.
View GitHub Profile
<!-- wp:pullquote -->
<figure class="wp-block-pullquote"><blockquote><p>default pull quote, no alignment</p><cite>citation</cite></blockquote></figure>
<!-- /wp:pullquote -->
<!-- wp:pullquote {"align":"wide"} -->
<figure class="wp-block-pullquote alignwide"><blockquote><p>default pull quote, wide</p><cite>citation</cite></blockquote></figure>
<!-- /wp:pullquote -->
<!-- wp:pullquote {"align":"full","className":"is-style-default"} -->
<figure class="wp-block-pullquote alignfull is-style-default"><blockquote><p>default pull quote full</p><cite>citation</cite></blockquote></figure>
@carolinan
carolinan / gist:53cf8c92b77c8ad6babd3b38d0a07530
Last active September 22, 2020 09:10
Content for testing forms and buttons
<!-- wp:group -->
<div class="wp-block-group"><div class="wp-block-group__inner-container"><!-- wp:html -->
<label>Text field wrapped in label <input type="text"></label>
<br>
<label>Text Area <textarea></textarea></label>
<br>
<input type="radio"><label>Radio</label>
<br>
<input type="radio" checked><label>Radio Checked</label>
<br>
@carolinan
carolinan / block-patterns.php
Created August 23, 2020 06:43
Block pattern
<?php
/**
* Register block patterns.
* Include this file in your theme, and update image paths, prefix and text domain.
*
* @link https://developer.wordpress.org/block-editor/developers/block-api/block-patterns/
*/
/**
* Make sure that block patterns are enabled before registering.
/**
* External dependencies
*/
import { map, filter } from 'lodash';
import classnames from 'classnames';
/**
* WordPress dependencies
*/
import {
Things we do allow
The links:
https://fonts.googleapis.com/css
//fonts.googleapis.com/css
https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js
https://fonts.gstatic.com
The code examples:
Things we do not allow:
function qqq_scripts() {
wp_enqueue_style( 'bootstrapcss', 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css');
wp_enqueue_script( 'popperjs', 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js', array( 'jquery'), '1.14.7', true );
wp_enqueue_script( 'bootstrapjs', 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js', array( 'jquery'), '4.1.3', true );
wp_enqueue_style( 'font-awesome', 'https://use.fontawesome.com/releases/v5.8.1/css/all.css' );
}
function qqq_scripts() {
<?php
/**
* @package aaron
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('aaron-border'); ?>>
<header class="entry-header">
<?php
if ( !aaron_get_meta( 'aaron_replace_title' ) ){
<?php
/**
* The template used for displaying page content in page.php
*
* @package aaron
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
<?php
function aaron_highlights() {
/*
* Frontpage Highlights
*/
if( !get_theme_mod( 'aaron_hide_highlight' ) ){
for ($i = 1; $i < 10; $i++) {
//Is this highlight visisble?
if ( !get_theme_mod( 'aaron_highlight' . $i . '_hide' ) ){
<?php
/**
* Template Name: Static and Featured
*
* Description: A Page Template that displays your static frontpage and featured content,
* @package aaron
*/
get_header();