Skip to content

Instantly share code, notes, and snippets.

Avatar

Tonya Mork hellofromtonya

View GitHub Profile
View testcpt.php
<?php
/**
* Test CPT with TT2.
*
* Plugin Name: Test CPT
* Plugin URI: https://github.com/tester/testcpt/
* Description: Tests custom post type blank screen with TT2
* Version: 1.0
* Author: tester
* Author URI: https://github.com/tester/testcpt/
@hellofromtonya
hellofromtonya / TEST_REPORT.md
Created Nov 5, 2021
Test Report experimentation with validating webfonts schema
View TEST_REPORT.md

Test Report

All tests are done the Validator commented out, i.e. no validation.

Testing Environment: *

  • Browser: Chrome
  • Theme: Twenty-Twenty Two (modified to use the Webfonts API)
  • Webfonts: Local and Google Fonts
@hellofromtonya
hellofromtonya / bio.md
Created Oct 11, 2021
Tonya's speaker bio
View bio.md

Tonya Mork is an engineering leader, engineer², strategist, and coach. Her story began in the mid-1980s with building high-tech automated manufacturing systems. Then life threw her a curve ball. She shifted her focus to helping developers and organizations excel. These days you'll find her focused on empowering people and tech to make the web better. Tonya is based in the US and is a full-time sponsored WordPress Core committer and open source contributor.

@hellofromtonya
hellofromtonya / test-trac53770.php
Last active Jul 28, 2021
Test script for rendering a table for the 'site_logo' & theme mod 'custom_logo' options
View test-trac53770.php
<?php
// Add this test script to wp-content/mu-plugins/test-trac53770.php
// Add the function into the theme where the site logo is rendered.
function test_trac53770_logo() {
$theme = get_option( 'stylesheet' );
$mods = get_theme_mods();
$options = array(
'get theme mods' => array(
@hellofromtonya
hellofromtonya / t53165.php
Created Jul 19, 2021
Trac ticket 53165 - Test Custom Taxonomy added as a must-use plugin
View t53165.php
<?php
// Location of this code: wp-content/mu-plugins/t53165.php.
namespace Test\t53165;
add_action( 'init', __NAMESPACE__ . '\register_test_taxonomy' );
function register_test_taxonomy() {
$labels = array(
'name' => 'Tests',
'singular_name' => 'Test',
@hellofromtonya
hellofromtonya / 28020.php
Created Apr 29, 2021
Testing script for WordPress Trac ticket 28020
View 28020.php
<?php
namespace Test\trac28020;
/**
* Add this file into the wp-content/mu-plugins folder.
*/
add_action( 'init', function() {
// Bail out if in the backend (Admin area). Only want to run this in the frontend.
if ( is_admin() ) {
@hellofromtonya
hellofromtonya / 51423.php
Created Mar 23, 2021
Core Ticket 51423: test script to make `wp_json_encode` fail during generation of personal data export JSON file.
View 51423.php
<?php
namespace Testing\Ticket51423;
add_action( 'wp_privacy_personal_data_export_file', __NAMESPACE__ . '\setup_testing_export_file', 5 );
function setup_testing_export_file( $request_id ) {
$GLOBALS['testing_51423'] = array(
'request_id' => $request_id,
'_export_data_grouped' => get_post_meta( $request_id, '_export_data_grouped', true ),
);
@hellofromtonya
hellofromtonya / sample.html
Created Nov 25, 2020
Sample HTML for benchmarking
View sample.html
<!DOCTYPE html>
<html lang="en-US" class="js svg background-fixed">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>
<title>Blog - Testing page</title>
<link rel="dns-prefetch" href="//fonts.googleapis.com">
<link href="https://fonts.gstatic.com" crossorigin="" rel="preconnect">
@hellofromtonya
hellofromtonya / 50787.php
Last active Oct 15, 2020
Ticket 50787 WordPress Core
View 50787.php
/**
* Return compatibility strings.
*
* @since 5.6.0
*
* @param string $key The key for the particular string.
* Default is false.
* @param string $name Plugin or theme name.
*
* @return string The appropriate compatibilty string.
@hellofromtonya
hellofromtonya / mu_autoloader.php
Created Aug 16, 2020
Making Debug Toolkit plugin a must-use.
View mu_autoloader.php
<?php
require_once __DIR__ . '/debug-toolkit/debug-toolkit.php';