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 / 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
@wplit
wplit / footer-scripts.html
Created November 25, 2025 01:32
change chart labels to dataset labels
@wplit
wplit / style.css
Last active November 12, 2025 22:12
hide media layout while waiting for new audio to load between playlist clicks - the key being the attribute [data-x-wait] that is only added while waiting for the next media to load.
/* hide layout while waiting for new media to load */
media-player media-layout {
transition: opacity 0.1s ease, visibility 0.1s ease;
}
media-player[data-x-wait] media-layout {
opacity: 0!important;
visibility: hidden;
}
@wplit
wplit / footer-scripts.html
Last active November 12, 2025 20:46
request media play after clicking playlist button
@wplit
wplit / footer-scripts.html
Last active November 11, 2025 23:03
toggle local storage on click
@wplit
wplit / footer-scripts.html
Last active November 3, 2025 01:18
custom code for programmitically play/pause media player from the outside ( player.paused true/false depending on if player already playing )
@wplit
wplit / footer-scripts.html
Created October 31, 2025 23:33
prevent open accordion item from being closed
@wplit
wplit / code.php
Last active October 29, 2025 00:53
add column to show number of user accounts that have favorited each post (the default 'post' post type) see screenshot in comment below code for end result.
<?php
// Add a custom column to display favorite count of each post
add_filter('manage_post_posts_columns', 'add_favorited_users_column');
function add_favorited_users_column($columns) {
$columns['favorited_users'] = 'Favorited Count';
return $columns;
}
@wplit
wplit / footer-scripts.html
Last active October 24, 2025 04:55
JS functon for sorting columns of dynamic table programmitcally