Skip to content

Instantly share code, notes, and snippets.

View mwhiteley16's full-sized avatar

Matt Whiteley mwhiteley16

View GitHub Profile
@mwhiteley16
mwhiteley16 / text.txt
Created November 30, 2023 14:25
Cassatt Mailer Records
CNAME - fwmail
Destination - u26000665.wl166.sendgrid.net
CNAME - s1._domainkey
Destination - s1.domainkey.u26000665.wl166.sendgrid.net
CNAME - s2._domainkey
Destination - s2.domainkey.u26000665.wl166.sendgrid.net
@mwhiteley16
mwhiteley16 / search-facet.json
Created November 6, 2023 14:29
Fire Permits Search Address Facet
{"facets":[{"name":"search_address","label":"Search Address","type":"autocomplete","source":"acf/field_5f1b037184e2c","placeholder":""}]}
@mwhiteley16
mwhiteley16 / functions.php
Created October 13, 2023 13:28
Camille Styles Image Sizes
/**
* Register custom thumbnail sizes.
*/
add_image_size( 'cs-square', 800, 800, true );
add_image_size( 'cs-square-small', 400, 400, true );
add_image_size( 'cs-landscape', 592, 396, true );
add_image_size( 'cs-portrait', 592, 741, true );
@mwhiteley16
mwhiteley16 / config.codekit3
Created August 18, 2023 17:50
Buncher CodeKit Config File
{
"AAInfo" : "This is a CodeKit 3 project config file. EDITING THIS FILE IS A POOR LIFE DECISION. Doing so may cause CodeKit to crash and\/or corrupt your project. Several critical values in this file are 64-bit integers, which JavaScript JSON parsers do not support because JavaScript cannot handle 64-bit integers. These values will be corrupted if the file is parsed with JavaScript. This file is not backwards-compatible with CodeKit 1 or 2. For details, see https:\/\/codekitapp.com\/",
"buildSteps" : [
{
"name" : "Process All Remaining Files and Folders",
"stepType" : 1,
"uuidString" : "7696841A-545F-48F3-9A59-C5242E3D740A"
}
],
"creatorBuild" : "34510",
@mwhiteley16
mwhiteley16 / Theme.json
Created June 28, 2023 11:27
Theme.json
"styles": {
"blocks": {
"core/button": {
"color": {
"background": "var(--wp--preset--color--primary)",
"text": "var(--wp--preset--color--background)"
},
"border": {
"color": "var(--wp--preset--color--primary)"
},
@mwhiteley16
mwhiteley16 / functions.php
Last active April 27, 2023 17:26
Post Payment Gravity Forms
/**
* Update puppy reservation status after payment is received.
*
* @link https://docs.gravityforms.com/gform_after_submission/
*
*/
add_action( 'gform_post_payment_completed', 'wd_gform_submission_updates', 10, 2 );
function wd_gform_submission_updates( $entry, $payment_id ) {
// Get form title of form that was submitted.
@mwhiteley16
mwhiteley16 / config.codekit3
Created April 14, 2023 14:40
Feast Build Stuff
{
"AAInfo" : "This is a CodeKit 3 project config file. EDITING THIS FILE IS A POOR LIFE DECISION. Doing so may cause CodeKit to crash and\/or corrupt your project. Several critical values in this file are 64-bit integers, which JavaScript JSON parsers do not support because JavaScript cannot handle 64-bit integers. These values will be corrupted if the file is parsed with JavaScript. This file is not backwards-compatible with CodeKit 1 or 2. For details, see https:\/\/codekitapp.com\/",
"buildSteps" : [
{
"name" : "Process All Remaining Files and Folders",
"stepType" : 1,
"uuidString" : "018EC27F-CDF8-4226-9947-B78C647B50E0"
}
],
"creatorBuild" : "34472",
@mwhiteley16
mwhiteley16 / feast-css-output.php
Created December 12, 2022 14:49
CSS Output for Feast
<?php
// function to output all the CSS
function feast_output_css() {
if ( function_exists( 'feast_css' ) ) {
$output = '';
$output .= '<style id="id-goes-here">';
feast_css();
$output .= '</style>';
@mwhiteley16
mwhiteley16 / output.php
Created December 12, 2022 13:11
Add Create Recipe Stars
if ( function_exists( 'mv_get_post_creations' ) ) {
$recipes = mv_get_post_creations( get_the_ID() );
if ( ! empty( $recipes ) ) {
// get Create recipe object
$recipe = $recipes[0];
$recipe_meta = mv_create_get_creation( $recipe );
// get the recipe rating, round it to the nearest half integer
$rounded_rating = round( $recipe_meta->rating * 2 ) / 2;
@mwhiteley16
mwhiteley16 / fsri-shortcode.php
Created December 9, 2022 14:05
Get Create Ratings
<?php
if ( function_exists( 'mv_get_post_creations' ) ) {
$recipes = mv_get_post_creations( get_the_ID() );
if ( ! empty( $recipes ) ) {
$recipe = $recipes[0];
$recipe_meta = mv_create_get_creation( $recipe );
$recipe_rating = 'Create Recipe Rating - ' . $recipe_meta->rating;
// print_r( $recipe_meta ); // show other available data
}
}