Skip to content

Instantly share code, notes, and snippets.

@bgrgicak
bgrgicak / blueprint.json
Created June 3, 2025 11:46
Bookmark Playground
{
"landingPage": "/",
"preferredVersions": {
"php": "8.3",
"wp": "6.8.1"
},
"phpExtensionBundles": [
"kitchen-sink"
],
"features": {
#!/bin/bash
SKIP_BUILD=false
BUILD_PACKAGE=""
# Parse command line arguments
while [[ $# -gt 0 ]]; do
case "$1" in
--port=*)
PORT="${1#*=}"
@bgrgicak
bgrgicak / notes.md
Last active December 11, 2024 12:42
WordPress Playground for developers Workshop
<?php
/*
Plugin Name: Theme Starter Content
Description: Theme Starter Content Example Plugin
Version: 1.0.0
*/
add_action( 'after_setup_theme', function() {
add_theme_support( 'starter-content', array(
'posts' => array(
'homepage-section' => array(
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="https://www.w3schools.com/xml/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="https://www.w3schools.com/xml/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="https://www.w3schools.com/xml/">
<s:element name="FahrenheitToCelsius">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Fahrenheit" type="s:string" />
</s:sequence>
</s:complexType>
<?php
/**
* Plugin Name: Fail
* Description: Throw an exception on init
* Version: 1.0
* Author: bgrgicak
* Author URI: https://bero.dev
*/
function fail_plugin_init() {
Adventures
Blueprints
Build files
Buildsheets
Charts
Compositions
Craft books
Drawings
Funfiles
Funprints
<?php
/**
* Plugin Name: Fail
* Description: Throw an exception on init
* Version: 1.0
* Author: bgrgicak
* Author URI: https://bero.dev
*/
function fail_plugin_init() {
@bgrgicak
bgrgicak / blueprint.json
Created June 11, 2024 06:13
Load mardown as posts from uplods/markdown
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"landingPage": "/",
"steps": [
{
"step": "login"
},
{
"step": "writeFile",
"path": "/wordpress/wp-content/mu-plugins/rewrite.php",
{
"landingPage": "/pdf.php",
"steps": [
{
"step": "writeFile",
"path": "/wordpress/pdf.php",
"data": "<?php $pdf = '%PDF-1.1\n\n '; $pdf .= '1 0 obj\n '; $pdf .= '<<\n '; $pdf .= '/Type /Catalog\n '; $pdf .= '/Outlines 2 0 R\n '; $pdf .= '/Pages 3 0 R\n '; $pdf .= '>>\n '; $pdf .= 'endobj\n\n '; $pdf .= '2 0 obj\n '; $pdf .= '<<\n '; $pdf .= '/Type /Outlines\n '; $pdf .= '/Count 0\n '; $pdf .= '>>\n '; $pdf .= 'endobj\n\n '; $pdf .= '3 0 obj\n '; $pdf .= '<<\n '; $pdf .= '/Type /Pages\n '; $pdf .= '/Kids [4 0 R]\n '; $pdf .= '/Count 1\n '; $pdf .= '>>\n '; $pdf .= 'endobj\n\n '; $pdf .= '4 0 obj\n '; $pdf .= '<<\n '; $pdf .= '/Type /Page\n '; $pdf .= '/Parent 3 0 R\n '; $pdf .= '/MediaBox [0 0 595.28 841.89]\n '; $pdf .= '/Contents 5 0 R\n '; $pdf .= '/Resources << /Font << /F1 6 0 R >> >>\n '; $pdf .= '>>\n '; $pdf .= 'endobj\n\n '; $pdf .= '5 0 obj\n '; $pdf .= '<< /Length 44 >>\n '; $pdf .= 'stream\n '; $pdf .= 'BT\n '; $pdf .= '70 50 TD\n ';