Skip to content

Instantly share code, notes, and snippets.

View Dorf's full-sized avatar

David Smyth Dorf

View GitHub Profile
@Dorf
Dorf / mundopepsi.com-mobile_2022-08-19.lighthouse.report.json
Last active August 19, 2022 22:10
[Mundo Pepsi Lighthouse Mobile | web.dev/measure] homepage Aug 19 https://googlechrome.github.io/lighthouse/viewer/?gist=7a08ccf09e6b6eda6dabe1e968db013d #lighthouse #audit #pepsi #mobile
{
"requestedUrl": "https://mundopepsi.com/",
"finalUrl": "https://mundopepsi.com/",
"lighthouseVersion": "9.6.5",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/102.0.5005.115 Safari/537.36",
"fetchTime": "2022-08-19T22:04:40.374Z",
"environment": {
"networkUserAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4695.0 Mobile Safari/537.36 Chrome-Lighthouse",
"hostUserAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/102.0.5005.115 Safari/537.36",
"benchmarkIndex": 1680.5
@Dorf
Dorf / gf_form_notification.txt
Created September 2, 2022 15:05
[Gravity Forms Admin Notice Text] Copy/Paste boilerplate admin notice #wordpress #gravityforms #notifications #boilerplate
This was submitted on: {embed_url}
All form submissions can be viewed at: https://domain.com/wp-admin/admin.php?page=gf_entries&id=1
Below is all the info submitted.
{all_fields}
 
@Dorf
Dorf / wp-config.php
Last active November 8, 2022 15:54
[wp-config local] basic setup #wp #wp-config #wordpress #setup
define( 'WP_CACHE', false );
// define( 'WP_ENVIRONMENT_TYPE', 'development' );
define( 'WP_ENVIRONMENT_TYPE', 'local' ); // https://wordpress.org/plugins/display-environment-type/
/* Modified directories can be used for version control */
define( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] ); // alt: define( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/path/to/wordpress' );
define( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] ); // alt: define( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/path/to/wordpress' );
define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/path/to/wp-content' );
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/path/to/wp-content' );
define( 'UPLOADS', 'media' );
@Dorf
Dorf / mu-remove.php
Created July 15, 2023 18:08
[Remove Blocks in Gutenberg] add to mu or functions #php #gutenberg #wordpress
/*
* Blacklist specific Gutenberg blocks
*
* @author Misha Rudrastyh
* @link https://rudrastyh.com/gutenberg/remove-default-blocks.html#blacklist-blocks
* @link https://wpturbo.dev/disable-wordpress-blocks/
*/
add_filter( 'allowed_block_types_all', 'misha_blacklist_blocks' );
function misha_blacklist_blocks( $allowed_blocks ) {
@Dorf
Dorf / functions.php
Created October 16, 2023 13:02
[remove Jetpack nag in Woocommerce] #woo #mu-plugin #nag
add_filter( 'jetpack_just_in_time_msgs', '__return_false' );