To make things simple, we're going to make a semi-structured way to display a mailing address.
We're going to start with a file tree that looks like this:
address-block
├ blocks
| ├ address.jsx
<?php | |
/** | |
* A colophon-generating method for WordPress Special Projects Sites. | |
* | |
* team51_credits( 'separator= | ' ); | |
* | |
* @param array $args { | |
* Optional. An array of arguments. | |
* |
<?xml version="1.0" encoding="iso-8859-1" ?> | |
<!DOCTYPE muclient> | |
<muclient> | |
<plugin name="LotJ_Cargo_Scraper" author="@Daljo" id="e95b128bc53345a4a39b29b4" language="Lua" purpose="Scrape cargo data." requires="4.73" version="0.1" save_state="y"> | |
<description trim="y"> | |
<![CDATA[ | |
-- Cargo Scraper / Exporter -- | |
]]> |
/* global externalLinksNewTab */ | |
jQuery( document.body ).on( 'click', 'a', function( event ) { | |
if ( ! this.href ) { | |
return; | |
} | |
// If a target is already specified, let that win. | |
if ( this.target ) { | |
return; |
<?php | |
// Plugin name: Jetpack Infinite Scroll for Single Posts | |
/** | |
* Infinite scroll needs to be filtered to function on non-archive pages. | |
*/ | |
function jisfsp_archive_supported( $supported, $settings ) { | |
if ( is_singular( 'post' ) ) { | |
return true; |
jQuery(document).on( 'ready', function($){ | |
$('.categorychecklist').on( 'click', 'input[type="checkbox"]', function(){ | |
if ( ! $(this).is( ':checked' ) ) return; | |
$(this).closest( 'ul.children' ) | |
.parentsUntil( '.categorychecklist', 'li' ) | |
.children( 'label' ) | |
.children( 'input[type="checkbox"]' ) | |
.prop( 'checked', true ); | |
}); |
<?php | |
if ( ! headers_sent() ) { | |
nocache_headers(); | |
header( 'X-Robots-Tag: noindex, nofollow, noarchive, nosnippet' ); | |
wp_safe_redirect( admin_url() ); | |
} | |
?> | |
<!DOCTYPE html> |
<?php | |
add_filter( 'ppp_preview_link', 'my_ppp_preview_link', 10, 2 ); | |
function my_ppp_preview_link( $link, $post_id ) { | |
$found = preg_match( '#_ppp=([0-9A-F]{10})#i', $link, $matches ); | |
if ( ! $found ) { | |
return $link; | |
} |
<?php | |
/** | |
* Plugin Name: Multisite Login Consolidation | |
* Author: georgestephanis | |
* License: GPLv2+ | |
* Requires PHP: 7 | |
* Network: true | |
*/ |