This file contains 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
<iframe id="wp-playground" style="width: 100%; height: 100%" frameBorder="0"></iframe> | |
<script type="module"> | |
import { | |
startPlaygroundWeb | |
} from 'https://unpkg.com/@wp-playground/client/index.js'; | |
const client = await startPlaygroundWeb({ | |
iframe: document.getElementById('wp-playground'), | |
remoteUrl: `https://playground.wordpress.net/remote.html`, | |
blueprint: { | |
landingPage: '/wp-admin/options-general.php?page=faustwp-settings', |
This file contains 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
import React from 'react'; | |
import { FaustHooks, FaustPlugin } from '@faustwp/core'; | |
import { FaustToolbarNodes, ToolbarNodeSkeleton } from '@faustwp/core/toolbar'; | |
export class CustomToolbar implements FaustPlugin { | |
apply(hooks: FaustHooks) { | |
hooks.addFilter('toolbarNodes', 'faust', (toolbarNodes: FaustToolbarNodes) => { | |
const customToolbarNodes: FaustToolbarNodes = [ | |
{ |
This file contains 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
#!/usr/bin/env bash | |
# Exit if WP-CLI is not available. | |
if ! command -v wp &> /dev/null | |
then | |
echo "This script requires WP-CLI" | |
exit | |
fi | |
# Install WordPress plugins. |
This file contains 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
.container { | |
width: (10/12) * 100%; | |
} | |
.container { | |
width: percentage(10/12); | |
} |
This file contains 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
// My existing WordPress Project that requires MDL | |
// Assign namespace above MDL base-ui scss import. | |
// If no $namespace is assigned before importing MDL base-ui, | |
// no namespace is added. | |
$namespace: '#project-defined .specificity'; | |
// Import single MDL scss file from within node_modules (Mimmick MDL import) | |
// @import "~@masonite/base-ui/styles/style.scss"; |
This file contains 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
.rating { | |
&__bar { | |
// Generate our rating__bar data selectors. | |
@for $i from 0 through 10 { | |
&[data-value="#{$i}"] { | |
&:before{ | |
width: $i * 10%; | |
} | |
&:after{ | |
left: $i * 10%; |
This file contains 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 | |
/* | |
Valet driver for Wordpress Multisite | |
Usage: Drop this file into your ~/.valet/Drivers/ directory | |
*/ | |
class WordPressMultisiteValetDriver extends WordPressValetDriver | |
{ | |
/** |
This file contains 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
<!-- Keep unnecessary dev stuff out of backup --> | |
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.git/" doesNotContain="*" endsWith="*" hasFileExtension="*" /> | |
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.svn/" doesNotContain="*" endsWith="*" hasFileExtension="*" /> | |
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/vendor/" doesNotContain="*" endsWith="*" hasFileExtension="*" /> | |
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/bower_components/" doesNotContain="*" endsWith="*" hasFileExtension="*" /> | |
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/node_modules/" doesNotContain="*" endsWith="*" hasFileExtension="*" /> |
This file contains 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
#!/bin/bash | |
admin_email="[email protected]" | |
admin_username="admin" | |
admin_password="password" | |
db_prefix="demowp_" | |
sites_directory="$HOME/Demo" | |
# Create folder for site. | |
mkdir $sites_directory/$1 && cd $sites_directory/$1 |
This file contains 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
#!/bin/bash -e | |
DO_TOKEN_KEY="" # DigitalOcean token key | |
SP_CLIENTID="" # ServerPilot API Client ID | |
SP_APIKEY="" # ServerPilot API Key | |
SP_SYSUSERID="" # Systemuser ID for the specific server | |
PRODUCTION_ADMIN_USER="" # Your WordPress admin username | |
PRODUCTION_ADMIN_PASSWORD="" # Your WordPress admin user password | |
PRODUCTION_ADMIN_EMAIL="" # Your WordPress admin user email |
NewerOlder