Skip to content

Instantly share code, notes, and snippets.

View maddisondesigns's full-sized avatar

Anthony Hortin maddisondesigns

View GitHub Profile
@maddisondesigns
maddisondesigns / MacOS Finder Touch Quick Action.md
Last active September 26, 2025 06:56
MacOS Automator Quick Action for Touching a File/Folder

Create a new Quick action using MacOS Automator that allows you to "touch" a file or folder

  1. Open up Automator.app from your Applications folder or through Launchpad
  2. Create a new workflow using File > New (⌘N)
  3. Choose ”Quick Action” in the dialog sheet when creating a new document
  4. In the Workflow receives current dropdown menu at the top of the "Canvas" on the right, select ”Files or Folders”.
  5. In the sidebar to the left, search for Get Selected Finder Items
  6. Drag this Action to the "canvas" on the right side
  7. In the sidebar to the left, search for Run Shell Script
  8. Drag this Action to the "canvas" on the right side
@maddisondesigns
maddisondesigns / ConvertFlacToM4A.sh
Last active June 30, 2025 06:35
Convert FLAC to M4A (AAC/ALAC) with ffmpeg
#!/bin/bash
#
# Convert FLAC to M4A with ffmpeg
# Usage: convert_music.sh source_dir destination_dir
# Requires: ffmpeg - https://ffmpeg.org/download.html
#
# Author: Rick Makes - https://www.rickmakes.com/batch-convert-lossless-audio-to-aac-shell-script/
# Modified: Anthony Hortin
#
@maddisondesigns
maddisondesigns / functions.php
Created June 10, 2025 10:28
Tweak the Step markup for a multi-step form (for Form ID 5)
/**
* Tweak the Step markup for a multi-step form (for Form ID 5)
*/
function hra_progress_steps_markup( $progress_steps, $form, $page ) {
$progress_steps = str_replace( '>1</span>', '>Step 1</span>', $progress_steps );
return $progress_steps;
}
add_filter( 'gform_progress_steps_5', 'hra_progress_steps_markup', 10, 3 );
@maddisondesigns
maddisondesigns / functions.php
Created April 6, 2025 05:26
Change logo and link on the WordPress login page
/**
* Change the logo on the WordPress login page from the WordPress logo to your own custom logo
*/
function mytheme_change_login_logo() {
echo '<style type="text/css">#login h1 a {background:url(' . trailingslashit( get_stylesheet_directory_uri() ) . 'images/your-logo.svg)' . ' no-repeat center center;width: 100%;background-size: contain}</style>';
}
add_action( 'login_enqueue_scripts', 'mytheme_change_login_logo' );
/**
* Change the logo link on the WordPress login page from wordpress.org to your own site URL
@maddisondesigns
maddisondesigns / functions.php
Created December 13, 2024 08:59
Increase the number of orders shown on the Orders page in My Acccount within WooCommerce
/**
* Increase the number of orders shown on the Orders page in My Acccount
*/
function mytheme_my_account_orders( $args ) {
// Use -1 to display all orders
$args['posts_per_page'] = 20;
return $args;
}
add_filter( 'woocommerce_my_account_my_orders_query', 'mytheme_my_account_orders', 10, 1 );
@maddisondesigns
maddisondesigns / functions.php
Last active November 30, 2024 04:12
Remove the WooCommerce Marketing Menu
/**
* Remove the WooCommerce Marketing Menu (which also moves the Coupons menu back under the main WooCommerce Menu item)
*/
function mytheme_remove_marketing_menu($features) {
$marketing = array_search('marketing', $features);
unset($features[$marketing]);
return $features;
}
add_filter('woocommerce_admin_features', 'mytheme_remove_marketing_menu' );
@maddisondesigns
maddisondesigns / functions.php
Created November 28, 2024 10:32
Remove the WooCommerce site visibility badge from the Dashboard Admin Bar
/**
* Remove the WooCommerce site visibility badge from the Dashboard Admin Bar
*/
function mytheme_remove_woocommerce_site_visibility_badge( $wp_admin_bar ) {
$wp_admin_bar->remove_node( 'woocommerce-site-visibility-badge' );
}
add_action( 'admin_bar_menu', 'mytheme_remove_woocommerce_site_visibility_badge', 100 );
@maddisondesigns
maddisondesigns / functions.php
Last active November 28, 2024 10:30
Remove the WooCommerce Payments top-level menu item
/**
* In WooCommerce 9.4.1 a new Payments menu item was introduced. For most users, this caused a blank page to be displayed when clicked.
* In WooCommerce 9.4.2 it was fixed so that it no longer shows a blank page, but instead, redirects you to the Payments tab in the WooCommerce Settings.
* When you're not using the WooCommerce Payments Payment Gateway, this menu is completely irrelevant and just adds to the existing clutter
* that WooCommerce already adds into your Dashboard!
*/
function mytheme_remove_payments_menu() {
remove_menu_page( 'admin.php?page=wc-settings&tab=checkout' );
}
add_action( 'admin_init', 'mytheme_remove_payments_menu' );
@maddisondesigns
maddisondesigns / functions.php
Created August 19, 2024 04:48
Remove WordPress PHP Dashboard Widget
/**
* Remove PHP Dashboard Widget
*/
function remove_site_wp_dashboard_widgets() {
remove_meta_box( 'dashboard_php_nag', 'dashboard', 'normal' );
}
add_action( 'wp_dashboard_setup', 'remove_site_wp_dashboard_widgets' );
@maddisondesigns
maddisondesigns / functions.php
Created August 19, 2024 04:47
Remove WordPress Site Health Dashboard Widget
/**
* Remove Site Health Dashboard Widget
*/
function remove_site_wp_dashboard_widgets() {
remove_meta_box( 'dashboard_site_health', 'dashboard', 'normal' );
}
add_action( 'wp_dashboard_setup', 'remove_site_wp_dashboard_widgets' );