Skip to content

Instantly share code, notes, and snippets.

View christophherr's full-sized avatar

Christoph Herr christophherr

View GitHub Profile
@christophherr
christophherr / failures.txt
Created November 23, 2017 20:51
Beans unit test failures on windows
c:\laragon\www\beans\wp-content\themes\Beans (windows-fix -> tonya)
λ composer test-unit
> "vendor/bin/phpunit" --testsuite unit
PHPUnit 5.7.25 by Sebastian Bergmann and contributors.
Runtime: PHP 7.1.11
Configuration: C:\laragon\www\beans\wp-content\themes\Beans\phpunit.xml.dist
Error: No code coverage driver is available
.....................................F...FFFFFFFFFFFFFF 55 / 55 (100%)
@christophherr
christophherr / index.js
Last active January 13, 2018 19:14
UI KIt Card GutenBlock
/**
* Block dependencies
*/
//import icon from './icon';
/**
* Internal block libraries
*/
const { __ } = wp.i18n;
const { registerBlockType, Editable } = wp.blocks;
<?php
/* Path to the WordPress codebase you'd like to test. Add a forward slash in the end. */
define( 'ABSPATH', dirname( __FILE__ ) . '/src/' );
/*
* Path to the theme to test with.
*
* The 'default' theme is symlinked from test/phpunit/data/themedir1/default into
* the themes directory of the WordPress install defined above.
.genesis-nav-menu .menu-item:hover > .sub-menu,
.genesis-nav-menu .menu-item:focus > .sub-menu {
display: block;
left: auto;
opacity: 1;
}
.genesis-nav-menu .sub-menu {
display: block;
clear: both;
<?php
/**
* Tests for add() method of _Beans_WP_Customize.
*
* @package Beans\Framework\Tests\Unit\API\WP-Customize
*
* @since 1.5.0
*/
namespace Beans\Framework\Tests\Unit\API\WPCustomize;
@christophherr
christophherr / change-custom-logo-schema-markup.php
Last active February 15, 2019 11:07
Change custom_logo Schema markup
/**
* Use one of the filters. Not multiple...
* I'd use the third.
*/
add_filter( 'wp_get_attachment_image_attributes', function ( $attr ) {
if ( isset( $attr['class'] ) && 'custom-logo' === $attr['class'] ) {
$attr['itemprop'] = 'image';
}