Skip to content

Instantly share code, notes, and snippets.

Jared Atchison jaredatch

Block or report user

Report or block jaredatch

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
@jaredatch
jaredatch / _pin_it.scss
Created Jun 7, 2018
Pin button overlays for content images
View _pin_it.scss
/* Pinterest images */
.pin-it-image {
display: block;
position: relative;
img {
display: block;
}
@jaredatch
jaredatch / wpforms-input-masks.md
Last active Dec 3, 2019
WPForms Input Masks
View wpforms-input-masks.md

Basic Masks

Basic input masks use symbols to create the mask.

  • 9: Numeric
  • a: Alphabetical
  • A: Alphabetical (forces uppercase)
  • *: Alphanumeric
  • &: Alphanumeric (forces uppercase)
@jaredatch
jaredatch / phpcs-mamp.md
Created Feb 12, 2018
Install PHPCS with MAMP Pro
View phpcs-mamp.md

Install PHPCS with MAMP Pro

PHPCS

There are different ways to install PHPCS, the method below uses PEAR which installs it within your PHP installation.

First, locate the active MAMP Pro PHP installation.

$ which php
@jaredatch
jaredatch / functions.php
Created Feb 8, 2018
WPForms manually run the 1.4.3 entries database upgrade routine
View functions.php
<?php
/**
* Manually run the v1.4.3 entries upgrade routine.
*
*/
function wpf_v143_upgrade_manual() {
// Fetch all entries.
$entries = wpforms()->entry->get_entries(
array(
@jaredatch
jaredatch / functions.php
Created Feb 6, 2018
WPForms limit form entries
View functions.php
<?php
/**
* Check entry limit, if past limit display a message.
*
* @param array $form_data
* @param object $form
*/
function wpf_form_check_entry_limit( $form_data, $form ) {
global $wpf_form_open;
@jaredatch
jaredatch / functions.php
Last active Feb 6, 2018
WPForms register/create new smart tag
View functions.php
<?php
/**
* Registers the Request URI smart tag.
*
* @param array $tags
* @return array
*/
function wpf_smarttag_request_uri_register( $tags ) {
$tags['request_uri'] = 'Request URI';
@jaredatch
jaredatch / mailhog-mamp.md
Created Jan 30, 2018
Install MailHog with MAMP Pro
View mailhog-mamp.md

Install MailHog with MAMP Pro, using HomeBrew.

MailHog

First let's make sure HB is updated. Open up terminal for the following steps.

$ brew update
@jaredatch
jaredatch / pimp-my-log-mamp-pro.md
Last active Jan 28, 2020
Install Pimp my Log with MAMP Pro (for use with WordPress development)
View pimp-my-log-mamp-pro.md

Install Pimp My Log with MAMP Pro (for use with WordPress development)

Pimp my Log

  1. Enable PHP logging in MAMP Pro, under the PHP settings (screenshot)

  2. Inside your MAMP Sites directory (or equivalent), create a new directory pimpmylog

  3. Create a new host, such as phplog.local, in MAMP for easy access (screenshot)

@jaredatch
jaredatch / functions.php
Created May 15, 2017
WPForms dynamic choices display by category
View functions.php
<?php
/**
* Narrow down post displayed by category.
*
* See https://codex.wordpress.org/Template_Tags/get_posts
*
* @param array $args
* @param array $field
* @param int $form_id
* @return array
@jaredatch
jaredatch / functions.php
Created May 10, 2017
WPForms smart tags inside checkbox labels
View functions.php
<?php
/**
* Process smart tags inside checkbox choice labels,
*
* @param array $field
* @param array $deprecated
* @param array $form_data
* @return array
*/
function wp_checkbox_choices_process_smarttags( $field, $deprecated, $form_data ) {
You can’t perform that action at this time.