Skip to content

Instantly share code, notes, and snippets.

Avatar
🐌
Happily roaming

Ante Sepic OriginalEXE

🐌
Happily roaming
View GitHub Profile
@OriginalEXE
OriginalEXE / ActivityBasedTimer.js
Last active Jul 6, 2020
An interface that handles timers based on the user activity
View ActivityBasedTimer.js
const ActivityBasedTimer = () => {
let globalTimerId = 0;
const timers = new Map();
const maybeExecuteTimerCallback = ({ timerId, forced = false }) => {
const timer = timers.get(timerId);
if (timer === undefined) {
return;
}
@OriginalEXE
OriginalEXE / pe-customize-controls.css
Last active Jun 23, 2020
Extending WordPress Customizer Panels and Sections to allow nesting
View pe-customize-controls.css
.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent,
#customize-theme-controls .customize-pane-child.current-section-parent {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
transform: translateX(-100%);
}
@OriginalEXE
OriginalEXE / gist:9051666
Last active Aug 29, 2015
Retrieve all instances of the specified shortcode (WordPress)
View gist:9051666
/**
* Retrieve all instances of the specified shortcode
*
* @since Never
*
* @global array $shortcode_tags
* @param string $tag
* @return boolean/array
*/
function oe_filter_shortcodes( $content, $tag, $result = array() ) {
You can’t perform that action at this time.