Skip to content

Instantly share code, notes, and snippets.

View n8finch's full-sized avatar

Nate Finch n8finch

View GitHub Profile
{
"steps": [
{
"step": "login"
},
{
"step": "installTheme",
"themeZipFile": {
"resource": "wordpress.org/themes",
"slug": "pendant"
/* Prismatic - Highlight.js Block */
var
el = wp.element.createElement,
Fragment = wp.element.Fragment,
registerBlockType = wp.blocks.registerBlockType,
RichText = wp.editor.RichText,
PlainText = wp.editor.PlainText,
RawHTML = wp.editor.RawHTML,
InspectorControls = wp.editor.InspectorControls,
<nav
class="elementor-pagination"
role="navigation"
aria-label="Pagination"
>
<span class="page-numbers prev">« Previous</span>
<span aria-current="page" class="page-numbers current"
><span class="elementor-screen-only">Page</span>1</span
>
<a
function capital_P_dangit( $text ) {
// Simple replacement for titles.
$current_filter = current_filter();
if ( 'the_title' === $current_filter || 'wp_title' === $current_filter ) {
return str_replace( 'Wordpress', 'WordPress', $text );
}
// Still here? Use the more judicious replacement.
static $dblq = false;
if ( false === $dblq ) {
$dblq = _x( '&#8220;', 'opening curly double quote' );
#############################
# GIT STUFFS
#############################
alias gits="git status"
alias gita="git add ."
alias gitap="git add -p"
alias gitco="git checkout"
alias gitcop="git checkout @{-1}"
alias gitcob="git checkout -b"
alias gitmprev="git merge @{-1}"
@n8finch
n8finch / wp-strictly-mu-plugins-plugins-themes-gitignore
Last active April 18, 2023 19:06
This gitignore will ignore anything that isn't in mu-plugins, plugins, and themes directories of your wp-content directory.
# Ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!wp-content/
# Ignore everything in the "wp-content" directory, except the "mu-plugins", "plugins", and "themes" directories.
wp-content/*
!wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/
@n8finch
n8finch / no-wp-core-gitignore
Created December 16, 2020 15:28
This is a gist for to ignore WordPress core files, and some other selected files.
*~
.DS_Store
.svn
.cvs
*.bak
*.swp
Thumbs.db
# wordpress specific
wp-config.php
@n8finch
n8finch / vsc-settings.json
Created July 24, 2018 15:22
Visual Studio Code settings
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 15,
"editor.wordWrap": "on",
"editor.minimap.enabled": false,
"workbench.colorTheme": "Atom One Dark",
"workbench.colorCustomizations": {
"editor.background": "#000000",
"sideBar.background": "#000000",
/**
* Get the Deliver store
* @param {[type]} theLocation [description]
* @return {[type]} Only one store location will be returned.
*/
const getTheDeliveryStore = function( theLocation ) {
var data = null;
var xhr = new XMLHttpRequest();
#!/bin/bash
#Double-check you're ready to rock and roll with an update
read -r -p "Are you sure you want to update all specified directories? [y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
#Set the array of folders
DIRECTORIES=( 'wordpress-default' 'wordpress-develop' );