This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Add alt text and dimensions columns to the media library | |
| */ | |
| add_filter('manage_media_columns', function (array $columns): array { | |
| $columns['alt'] = 'Alt Text'; | |
| $columns['dimensions'] = 'Dimensions'; | |
| return $columns; | |
| }); | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function () { | |
| const POLICY = "strict-origin-when-cross-origin"; | |
| function applyPolicy(root) { | |
| (root || document) | |
| .querySelectorAll('iframe[src*="youtube.com"], iframe[src*="youtu.be"]') | |
| .forEach((el) => el.setAttribute("referrerpolicy", POLICY)); | |
| } | |
| // Run once on load/DOM ready |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Add image sizes | |
| */ | |
| add_action('after_setup_theme', function (): void { | |
| $imageSizeColumnsAll = [3, 6, 9, 12, 18, 24]; | |
| $biggestImageSize = 1600; | |
| foreach ($imageSizeColumnsAll as $column) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| CONFIGURE HERE | |
| - TARGET_TEXTS: all text variants of the phone number on your site to replace. | |
| - TARGET_TEL: digits-only version of the phone number (for tel: links). | |
| - CAMPAIGN_NUMBERS: map of se_campaign value => replacement number display format (tel is auto-generated). | |
| - STORAGE_KEY/STORAGE_DAYS: storage settings (uses localStorage if available, cookie fallback). | |
| */ | |
| (function () { | |
| var TARGET_TEXTS = [ | |
| "(555) 555-1212", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| APP_URL=http://whatever-your-local-domain-is.test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Set up variables | |
| DBUSER="" | |
| DBPASSWORD="" | |
| DESTINATION="/volumes/external/mariadb" | |
| EXCLUDE_DB="information_schema|performance_schema|mysql|sys" # Add any databases you want to exclude | |
| # Get the list of databases | |
| DBS=$(mysql -u $DBUSER -p$DBPASSWORD -e "SHOW DATABASES;" | grep -Ev "Database|$EXCLUDE_DB") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Temporary fix for Gravity Forms merge tags on form notification edit screens | |
| * | |
| * @see https://github.com/roots/acorn/issues/198 | |
| */ | |
| add_action('admin_footer', function (): void { | |
| // Only on GF admin pages | |
| if (!class_exists('GFForms') || !isset($_GET['page']) || 'gf_edit_forms' !== $_GET['page']) { | |
| return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: Solid Security configuration | |
| * Plugin URI: https://joshuafredrickson.com | |
| * Version: 1.0.0 | |
| * Description: Filter notifications in non-production environments. | |
| * Author: Kinetic | |
| * Author URI: https://joshuafredrickson.com | |
| * License: GNU General Public License v2 | |
| * License URI: http://www.gnu.org/licenses/gpl-2.0.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Hook into the Gravity Forms submission process to show a loading state | |
| */ | |
| const wrapper = document.querySelector( | |
| '.gform_wrapper' | |
| ); | |
| const gfSubmitting = `gf_submitting_${ | |
| wrapper.querySelector('form').dataset.formid | |
| }`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Remove Slider Revolution metabox from certain post types. | |
| * This includes removing it from the top of ACF field groups. | |
| */ | |
| add_action('do_meta_boxes', function (): void { | |
| if (!is_admin()) { | |
| return; | |
| } |
NewerOlder