This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
<?php | |
/** | |
* WP_HTML_Table_Processor | |
* @author Seth Rubenstein | |
*/ | |
/** | |
* Pass in a table and get back an array of the header, rows, and footer cells quickly and effeciently. | |
* | |
* The WP_HTML_Tag_Processor bookmark tree navigation is heavily cribbed from WP_Directive_Processor class https://github.com/WordPress/block-interactivity-experiments/pull/169/files#diff-ad36045951e27010af027ae380350ae4b07b56a659a3127b40b7967b2308d5bc |
<?php | |
$url = 'https://bhargavb.com/'; | |
$qr_link = 'https://chart.googleapis.com/chart?chs=224x224&cht=qr&chl='. $url .'&choe=UTF-8'; | |
printf( '<img src="%s" alt="QR Code">', $qr_link ); |
<?php | |
namespace UniversalYums\Admin\Performance; | |
class OrdersList { | |
/** | |
* The single instance of the class. | |
*/ | |
protected static $instance; |
<?php | |
/** | |
* High volume modifications to Action Scheduler. | |
* | |
* Adapted from https://github.com/woocommerce/action-scheduler-high-volume/ | |
* | |
* Increase Action Scheduler batch size, concurrency, timeout period, and claim action query | |
* ORDER BY to process large queues of actions more quickly on servers with more server resources. | |
* | |
* @package UniversalYums\ActionScheduler |
# Code Potent's official .htaccess directives to make your ClassicPress site ROCK! | |
# Prevent directory browsing. | |
Options -Indexes | |
# Enable rewrite engine - you may already have these 2 lines... don't duplicate, if so. | |
RewriteEngine On | |
RewriteBase / | |
# Force SSL connection to everything (URLs, images, scripts, styles, etc) |
// License: GPLv2+ | |
var el = wp.element.createElement, | |
registerBlockType = wp.blocks.registerBlockType, | |
ServerSideRender = wp.components.ServerSideRender, | |
TextControl = wp.components.TextControl, | |
InspectorControls = wp.editor.InspectorControls; | |
/* | |
* Here's where we register the block in JavaScript. |
npm init to create package.js | |
create gulpfile.js | |
Install Local dependecies | |
npm install --save-dev gulp gulp-autoprefixer gulp-sass gulp-uglify gulp-concat | |
Write gulp tasks like | |
const gulp = require('gulp'); | |
const sass = require('gulp-sass'); |
<?php | |
add_action( 'admin_enqueue_scripts', 'mytheme_backend_scripts'); | |
if ( ! function_exists( 'mytheme_backend_scripts' ) ){ | |
function mytheme_backend_scripts($hook) { | |
wp_enqueue_media(); | |
wp_enqueue_style( 'wp-color-picker'); | |
wp_enqueue_script( 'wp-color-picker'); | |
} |