This file contains 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 | |
/** | |
* Local Kitten images. | |
* | |
* Filters image URLs to load files from placekitten if they aren't present locally. | |
* | |
* @wordpress-plugin | |
* Plugin Name: Local Kitten Images | |
* Version: 1.0.2 | |
* Description: Loads missing image files from placekitten when using local environment. |
This file contains 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 | |
function exclude_post_categories( $exclude = '', $spacer = ' ' ) { | |
$categories = get_the_category(); | |
if ( empty( $categories ) ) { | |
return; | |
} | |
$exclude = explode( ',', $exclude ); | |
$counter = count( get_the_category() ) - count( $exclude ); | |
foreach ( $categories as $cat ) { |
This file contains 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
wp.blocks.registerBlockVariation( | |
'core/column', | |
{ | |
name: 'featured-column', | |
isDefault: false, | |
title: 'Featured Column', | |
description: 'A highlighted central column!', | |
attributes: { className: 'central' }, | |
} |
This file contains 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
( function( wp ) { | |
var el = wp.element.createElement; | |
wp.blocks.registerBlockType( 'tomjn/dynamic', { | |
title: 'Toms Dynamic Block', | |
edit: function( props ) { | |
return el( wp.serverSideRender, { | |
block: 'tomjn/dynamic', | |
attributes: props.attributes, | |
} ); | |
}, |
This file contains 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
Index: functions.php | |
=================================================================== | |
--- functions.php (revision 56804) | |
+++ functions.php (working copy) | |
@@ -7,9 +7,19 @@ | |
namespace P2020; | |
+function is_automattician() { | |
+ return false; |
This file contains 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
🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦 | |
🟦🟦🟦🟨🟨🟨🟨🟦🟦🟦🟦 | |
🟦🟦🟨🟨🟨🟨⬛🟨🟦🟦🟦 | |
🟦🟨🟨⬛🟨🟨⬛🟨🟨🟦🟦 | |
🟦🟨🟨⬛🟨🟨🟨🟨🟨🟦🟦 | |
🟦🟨🟨🟨🟨🟨🟨🟨🟨🟦🟦 | |
🟦🟨🟨🟨⬛⬛🟧🟧🟨🟦🟦 | |
🟦🟦🟨🟨🟧🟧🟧🟧🟧🟧🟦 | |
🟦🟦🟦🟨🟨🟨🟨🟧🟧🟧🟦 | |
🟦🟦🟦🟦🟦🟦🟦🟧🟧🟦🟦 |
This file contains 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 | |
$args = [ | |
// parameters go here | |
]; | |
$query = new WP_Query( $args ); | |
if ( $query->have_posts() ) { | |
while ( $query->have_posts() ) { | |
$query->the_post(); | |
// display the post |
This file contains 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: HTTP2 Push scripts | |
* Author: Tom J Nowell | |
*/ | |
function tomjn_get_dep_url( /*\WP_Dependency*/ $dep ) { | |
global $wp_version; | |
$relative = str_replace( site_url(), '', $dep->src ); | |
$ver = $dep->ver; |
This file contains 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
==> default: Running provisioner: utility-mte90-tideways (shell)... | |
default: Running: /var/folders/jx/3t2z3sgx7sb3mwlml6v2xskh0000gp/T/vagrant-shell20190115-33101-1pdjm18.sh | |
default: Installing Tideways & XHgui | |
default: File copied for php 7.0 | |
default: cp: | |
default: cannot stat ‘/home/vagrant/tideways.ini’ | |
default: : No such file or directory | |
default: cp: | |
default: cannot stat ‘/home/vagrant/mongodb.ini’ | |
default: : No such file or directory |
NewerOlder