Skip to content

Instantly share code, notes, and snippets.

Sal Ferrarello salcode

Block or report user

Report or block salcode

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@salcode
salcode / .editorconfig
Last active Jul 20, 2019
PHP PSR-2 EditorConfig
View .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 / .editorconfig
Last active Aug 30, 2019
WordPress .editorconfig - modified version of the WordPress coding standards
View .editorconfig
# 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 / wp-cli-test-stop-emails.php
Created May 2, 2018
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
View wp-cli-test-stop-emails.php
<?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
View keybase.md

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:

View 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
@salcode
salcode / myThoughts.md
Created Sep 8, 2017
Display PHP output on a WordPress page
View myThoughts.md

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 / 2017-nearby-wordcamps.md
Last active Oct 5, 2017
2017 WordCamps Near Me
View 2017-nearby-wordcamps.md
@salcode
salcode / wp-auto-update-everything.php
Last active Aug 15, 2016
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).
View wp-auto-update-everything.php
<?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 / yoast-setup-notes.md
Last active Aug 10, 2016
Note to self when setting up Yoast SEO
View yoast-setup-notes.md

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 / fe-prevent-slug-conflict.php
Created Jul 19, 2016
WordPress code to reserve some top level Permalink slugs.
View fe-prevent-slug-conflict.php
<?php
/**
* Prevent top level permalink slugs that will cause conflicts.
*
* New rewrite slugs are introduced when CPTs or Custom Taxonomies are created.
* This code adds a check when Pages or Posts are created, that their Permalink
* does not conflict with one of the reserved top level slugs you define.
*
* In the case of a bad (i.e conflicting slug), WordPress appends a "-2" to
* the permalink.
You can’t perform that action at this time.