Skip to content

Instantly share code, notes, and snippets.

View wplit's full-sized avatar
💭
I may be slow to respond.

David Browne wplit

💭
I may be slow to respond.
View GitHub Profile
@wplit
wplit / footer-scripts.html
Last active November 2, 2026 21:36
do something when lightbox slide changes on the visible slide
@wplit
wplit / footer-scripts.html
Created October 18, 2026 23:13
Don't save or restore the playback position for vimeo embeds, which doesn't support it.
@wplit
wplit / footer-scripts.html
Created October 15, 2026 02:47
add referrerpolicy policy to youtube embeds inside media player
@wplit
wplit / footer-scripts.html
Created October 12, 2026 23:13
Pannellum scroll in FF
@wplit
wplit / code.php
Last active September 22, 2026 08:25
add new slide options to pro slider element using Bricks' filter bricks/element/render_attributes
<?php
add_filter( 'bricks/element/render_attributes', function( $attributes, $key, $element ) {
/* add your slider element id */
$element_id = 'clmuqy';
/* add any additional Splide options */
$splide_options = array(
'slideFocus' => false,
@wplit
wplit / footer-scripts.html
Last active September 22, 2026 08:25
add new splide options to pro slider
@wplit
wplit / footer-scripts.html
Last active September 21, 2026 22:37
get variation image, look for it inside slider and move slider to that image
@wplit
wplit / footer-scripts.html
Created September 16, 2026 10:19
reset tabs height when modal opened
@wplit
wplit / clear.php
Last active September 6, 2026 23:53
clear edd update cache (test sites only)
// Run once: clear plugin update caches and force a fresh check.
add_action( 'admin_init', function () {
if ( ! current_user_can( 'update_plugins' ) ) {
return;
}
global $wpdb;
// EDD-style updater caches (current and legacy key formats) + failed-request lock.
$wpdb->query(
@wplit
wplit / footer-script.html
Last active August 27, 2026 11:36
accordion header