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
Created January 22, 2026 21:50
attempt to play player when playlist item clicked
@wplit
wplit / bricksextras.pot
Last active January 22, 2026 02:40
BricksExtras translations POT file (for in-builder / admin translations)
# Copyright (C) 2026 BricksExtras
# This file is distributed under the same license as the BricksExtras plugin.
msgid ""
msgstr ""
"Project-Id-Version: BricksExtras\n"
"Report-Msgid-Bugs-To: https://bricksextras.com\n"
"POT-Creation-Date: 2026-01-21 01:05+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@wplit
wplit / code.php
Created January 17, 2026 00:21
add new breadcrunk link to breadcrumbs
<?php
add_filter( 'bricksextras/breadcrumbs/', function( $crumbs ) {
$crumbPosition = 1;
$url = 'https://kevinc366.sg-host.com/tournaments/';
$text = 'Tournaments';
/* if single event, add new breadcrumb */
@wplit
wplit / code.php
Last active January 10, 2026 21:24
Redirect WordPress search to WPGB search format
<?php
/**
* Redirect WordPress search to WPGB search format
*/
add_action('template_redirect', function() {
if (isset($_GET['s']) && !empty($_GET['s'])) {
$search_query = sanitize_text_field($_GET['s']);
@wplit
wplit / footer-scripts.html
Last active December 29, 2025 00:30
do something when page tour step hides
@wplit
wplit / footer-scripts.html
Last active December 11, 2025 04:06
re-init page tour after WSForm has initialsed so the elements exist
@wplit
wplit / style.css
Created December 6, 2025 02:08
add fade to either side of the slider depending on if first/last slide is visible. (add to element CSS settings)
%root% .splide__track {
--x-slider-mask-edge: 20%;
--x-slider-mask-edge-slope: 2;
mask-image: linear-gradient(to right, black 0%, black 100%);
-webkit-mask-image: linear-gradient(to right, black 0%, black 100%);
}
@wplit
wplit / footer-scripts.html
Created December 5, 2025 00:57
clear header search input value when opened
@wplit
wplit / style.css
Last active December 1, 2025 04:52
Force equal heights on Pro Tabs (add to CSS settings on pro tabs element)
%root% .x-tabs_content:not(.x-tabs_content-accordion) {
flex-direction: row;
}
%root% .x-tabs_content:not(.x-tabs_content-accordion) .x-tabs_panel {
display: flex!important; /* undo "display: none;" */
opacity: 0;
visibility: hidden;
width: 100%;
}
@wplit
wplit / footer-scripts.html
Last active December 2, 2025 03:14
Media Player 'Reset on play' feature but for hover rather than for autoplay