This file contains hidden or 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
/** | |
* 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'; | |
} |
This file contains hidden or 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 | |
/** | |
* 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; |
This file contains hidden or 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
.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; |
This file contains hidden or 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 | |
/* 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. |
This file contains hidden or 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
/** | |
* Block dependencies | |
*/ | |
//import icon from './icon'; | |
/** | |
* Internal block libraries | |
*/ | |
const { __ } = wp.i18n; | |
const { registerBlockType, Editable } = wp.blocks; |
This file contains hidden or 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
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%) |
This file contains hidden or 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
advanced-new-file - Version :0.5.0 | |
Align - Version :0.2.0 | |
auto-close-tag - Version :0.5.2 | |
beautify - Version :1.1.1 | |
bracket-pair-colorizer - Version :0.10.10 | |
code-settings-sync - Version :2.8.3 | |
CreateModule - Version :0.0.5 | |
CSSLint - Version :0.0.3 | |
debugger-for-chrome - Version :3.4.0 | |
docthis - Version :0.6.0 |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="webinar-timer"> | |
<span class="webinar-countdown"></span> |
This file contains hidden or 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
/** | |
* @ticket 38486 | |
*/ | |
function test_class_applied_to_page_for_posts_on_custom_post_type() { | |
$page_id = self::factory()->post->create( array( 'post_type' => 'page', 'post_title' => 'Home Page' ) ); | |
update_option( 'page_for_posts', $page_id ); | |
$cpt_id = self::factory()->post->create( array( 'post_type' => 'cpt', 'post_name' => 'cpt-name' ) ); | |
wp_update_nav_menu_item( $this->menu_id, 0, array( |
This file contains hidden or 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 test_class_not_applied_to_page_item() { | |
$page_id1 = self::factory()->post->create( array( 'post_type' => 'page', 'post_title' => 'Home Page' ) ); | |
update_option( 'page_on_front', $page_id1 ); | |
$page_id2 = self::factory()->post->create( array( 'post_type' => 'page', 'post_title' => 'Test Page' ) ); | |
wp_update_nav_menu_item( $this->menu_id, 0, array( | |
'menu-item-type' => 'post_type', | |
'menu-item-object' => 'page', | |
'menu-item-object-id' => $page_id1, |
NewerOlder