This file contains 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 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 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 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 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 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; | |
} |
This file contains 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: Content Security Policy | |
* Version: 1.0.0 | |
* Description: Adds a Content-Security-Policy header to all non-admin requests. | |
* License: GNU General Public License v2 | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
* Original Inspiration: https://gist.github.com/westonruter/c8b49406391a8d86a5864fb41a523ae9 | |
*/ |
This file contains 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 | |
use Illuminate\Support\Str; | |
/** | |
* Add `rel="preload"` to font files found in the manifest | |
*/ | |
add_filter('wp_head', function (): void { | |
echo collect( | |
json_decode(asset('manifest.json')->contents()) |
This file contains 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 EXIF data from .jpg when uploaded. | |
*/ | |
use Imagick; | |
/** | |
* Strip EXIF using Imagick, fallback to gd |
This file contains 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
import domReady from '@roots/sage/client/dom-ready'; | |
/** | |
* Alpine components | |
*/ | |
import Alpine from 'alpinejs'; | |
import * as components from './components/index.js'; | |
/** |
NewerOlder