Skip to content

Instantly share code, notes, and snippets.

@salcode
salcode / yoast-setup-notes.md
Last active August 10, 2016 17:26
Note to self when setting up Yoast SEO

Setting Up Yoast SEO

  • Enable Twitter cards: /wp-admin/admin.php?page=wpseo_social#top#twitterbox Enable and Summary with Large Image
  • Change Title separator to |
@salcode
salcode / wp-auto-update-everything.php
Last active November 29, 2021 10:08
By default, WordPress only automates minor versions of core when there is no VCS information present. This code enables auto-updates for everything (core, plugins, and themes).
<?php
/**
* Enable Auto Updates for Everything
* https://gist.github.com/salcode/b60df55598c21c5970600a56715a2b1c
*
* Please put this file in the `mu-plugins` directory.
*
* curl -O https://gist.githubusercontent.com/salcode/b60df55598c21c5970600a56715a2b1c/raw/wp-auto-update-everything.php
*/
@salcode
salcode / 2017-nearby-wordcamps.md
Last active October 5, 2017 22:45
2017 WordCamps Near Me
@salcode
salcode / myThoughts.md
Created September 8, 2017 15:45
Display PHP output on a WordPress page

Context

https://twitter.com/felafel/status/906162644125659136

@salcode Met you at WC Lancaster. Looking to embed existing php code (not a snippet) in a WP page. Tried a few plugins. Suggestion?

My Thoughts

Displaying PHP output on a WordPress page can vary depending on where you want to display the output.

@salcode
salcode / beaver.php
Last active September 21, 2017 09:50 — forked from craigsimps/beaver.php
<?php
/**
* Modify theme to support Beaver Builder better.
*
* - Set the theme layout to full width.
* - Remove the `site-inner` markup.
* - Remove the `content-sidebar-wrap` markup.
* - Remove the entry header and page/ post title.
*
* @package Generico\Core

Keybase proof

I hereby claim:

  • I am salcode on github.
  • I am salcode (https://keybase.io/salcode) on keybase.
  • I have a public key ASBSYDWGe_itOiSiI6BnWuSnvvlLjok8KPK_E5OrUDofnAo

To claim this, I am signing this object:

@salcode
salcode / wp-cli-test-stop-emails.php
Created May 2, 2018 03:14
WordPress plugin proof of concept for disabling the Stop Emails plugin from logging emails when run from the command line. See https://github.com/salcode/stop-emails/issues/15
<?php
/**
* Plugin Name: WP CLI Test Stop Emails
* Plugin URI: https://github.com/salcode/stop-emails/issues/15
* Description: Test plugin for <a href="https://github.com/salcode/stop-emails/issues/15">Issue 15</a>
* Author: Sal Ferrarello
* Author URI: https://salferrarello.com/
* Text Domain: wp-cli-test-stop-emails
* Domain Path: /languages
* Version: 0.1.0
@salcode
salcode / .editorconfig
Last active October 15, 2022 21:22
WordPress .editorconfig - modified version of the WordPress coding standards
# EditorConfig helps keep your project formatting consistent.
# See https://EditorConfig.org
#
# This is a modified version of the WordPress coding standards.
#
# Author: Sal Ferrarello (@salcode)
# https://salferrarello.com/wordpress-editorconfig/
#
# You can download this file directly
# to your project from the command-line with
@salcode
salcode / .editorconfig
Last active January 16, 2020 01:47
PHP PSR-2 EditorConfig
# EditorConfig helps keep your project formatting consistent.
# See https://EditorConfig.org
#
# PHP PSR-2 Coding Standards
# http://www.php-fig.org/psr/psr-2/
#
# Author: Sal Ferrarello (@salcode)
#
# You can download this file directly
# to your project from the command-line with
@salcode
salcode / PostStatus.php
Last active October 10, 2019 17:23 — forked from JasonTheAdams/PostStatus.php
Enumeration example of the Object Value Design Pattern
<?php
class PostStatus
{
const PRIVATE = 'private';
const DRAFT = 'draft';
const PUBLISHED = 'published';
const TRASHED = 'trash';
/**