Skip to content

Instantly share code, notes, and snippets.

Working from home

Joshua Vandercar uamv

Working from home
View GitHub Profile
uamv / ticktick-kanban-styling.css
Created Jun 17, 2020
Style TickTick Kanban Boards
View ticktick-kanban-styling.css
.column-list-view .column-list .column-list-content {
flex-direction: column;
flex-wrap: wrap;
max-height: calc( 100vh - 72px );
width: fit-content;
.column-list-view .column {
margin: 0 1.5em 2em 6px;
height: fit-content;
uamv / multi-column-list-populate.php
Last active Apr 11, 2019
Populate first column of Gravity Form multi-column list and mark as readonly
View multi-column-list-populate.php
Dynamically populates the first column of a Gravity Form multi-column list field
(1) The end of the the `gform_field_value_$parameter_name` filter must match the parameter you've set to allow field to be populated dynamically
(2) The key in each row's array element must match the header you have set for the column.
add_filter( 'gform_field_value_certifications', 'typewheel_prefill_certifications_list' );
uamv / gf-notification-interception.php
Created Feb 19, 2019
Send all Gravity Form notifications to specified email addres
View gf-notification-interception.php
add_filter( 'gform_notification', function ( $notification, $form, $entry ) {
$notification['toType'] = 'email';
$notification['to'] = '';
return $notification;
}, 10, 3 );
uamv / gf-custom-merge-tags.php
Last active Apr 23, 2019
Add custom merge tags to Gravity Forms
View gf-custom-merge-tags.php
add_filter( 'gform_replace_merge_tags', 'typewheel_custom_merge_tags', 10, 7 );
function typewheel_custom_merge_tags( $text, $form, $entry, $url_encode, $esc_html, $nl2br, $format ) {
$custom_merge_tags = array(
'{date_ymd}' => date( 'Y.m-M.d', strtotime( $entry['date_created'] ) ),
'{timestamp}' => time(),
'{site_url}' => get_site_url(),
'{site_name}' => get_bloginfo( 'name' )
uamv / gf-map-class-to-post-meta.php
Last active Jun 26, 2020
Save Gravity Form field data to post meta by adding a class to the field.
View gf-map-class-to-post-meta.php
* Save Gravity Form field data to post meta by adding a class to any field.
* Meta is mapped so that it is readable by Advanced Custom Fields
* Format class as…
* post_meta-{meta_key} -- for simple fields & writing lists as array to single meta record
* post_meta-{meta_key}-.3 -- for multi-input fields
* post_meta-{repeater_key}-1.{meta_key} -- for list fields mapped to meta readable by ACF
// Run this function after the Gravity Form has created a post
uamv / typewheel-itsec-notification-center-assistant.php
Created Jul 26, 2018
Enhances your control of the iThemes Security Control Center options
View typewheel-itsec-notification-center-assistant.php
add_action('admin_footer', 'typewheel_notification_assistant' );
function typewheel_notification_assistant() {
// Add script if current screen belongs to iThemes Security
if ( get_current_screen()->id == 'toplevel_page_itsec' ) { ?>
let myUser = '';
uamv / suppress-privacy-notice-pointer-wp496
Last active May 22, 2018
Run once to automatically dismiss the Privacy Notice pointer in WP 4.9.6 for all users.
View suppress-privacy-notice-pointer-wp496
add_action( 'admin_init', 'typewheel_remove_privacy_notice_pointer_wp496' );
function typewheel_remove_privacy_notice_pointer_wp496() {
$users = get_users();
foreach ( $users as $user ) {
$dismissed = array_filter( explode( ',', (string) get_user_meta( $user->ID, 'dismissed_wp_pointers', true ) ) );
$pointer = 'wp496_privacy';
uamv / suppress-gutenberg-teaser
Created Mar 23, 2018
Suppress Gutenberg Teaser in WP 4.9.5
View suppress-gutenberg-teaser
add_action( 'admin_init', 'typewheel_remove_gutenberg_teaser' );
function typewheel_remove_gutenberg_teaser() {
remove_action( 'try_gutenberg_panel', 'wp_try_gutenberg_panel' );
uamv / Serialized_Post_Meta_Datastore.php
Created Oct 5, 2017
The following class allows you to store post meta fields as a serialized array instead of multiple database rows.
View Serialized_Post_Meta_Datastore.php
use Carbon_Fields\Field\Field;
use Carbon_Fields\Datastore\Datastore;
* Stores serialized values in the database
class Serialized_Post_Meta_Datastore extends Datastore {
uamv / mainwp-client-report-monthly.html
Created Jul 7, 2017
HTML Text Used for MainWP Monthly Client Report
View mainwp-client-report-monthly.html
<table style="width: 600px; margin: 0 auto; padding: 0; border-spacing: 0; border-collapse: collapse;"><tbody><tr><td style="background: #040404; margin-top: 0; padding: 0;"><img style="display: block; border: 0; line-height: 1;" src="" alt="Typewheel" width="600" /></td></tr><tr><td style="padding: 2em; background-image: linear-gradient( to bottom, #D7D7D7, #E7D3BA);"><p style="margin: 0 2em 2em;">Hello []! Here's an overview of the things I am doing to keep your site updated, optimized, and secure.</p><p style="text-align: center; margin: 0 0 1.5em;"><img style="display: block; margin: 0 auto .5em;" src="[client.logo.url]" alt="[] Logo" height="100" /><span style="text-align: center; font-size: 28px;"><strong>[report.daterange]</strong></span><br /><span style="text-align: center; font-size: 28px;"><strong><a style="color: #040404; text-decoration: none;" href="[]">[]</a></strong></span><
You can’t perform that action at this time.