Skip to content

Instantly share code, notes, and snippets.

View mbootsman's full-sized avatar

Marcel Bootsman mbootsman

View GitHub Profile
@timothyjensen
timothyjensen / functions.php
Last active June 4, 2019 19:20
Add hooks before Genesis structural wraps.
<?php
// Prefixing is recommended if you are not using a namespace.
// namespace TimJensen\GenesisStarter\Setup;
/**
* Adds hooks immediately before and after Genesis structural wraps.
*
* @version 1.1.0
*
* @return void
@mgibbs189
mgibbs189 / test.php
Created March 27, 2017 13:11
Pass the current post ID to FacetWP
<?php
// See https://facetwp.com/how-to-use-hooks/
add_action( 'wp_head', function() {
?>
<script>
(function($) {
$(document).on('facetwp-refresh', function() {
FWP_HTTP.post_id = '<?php echo $post->ID; ?>';
});
@brunolemos
brunolemos / linkedin-unfollow-everyone.js
Last active February 3, 2024 05:47
Unfollow everyone on Linkedin
(() => {
let count = 0;
function getAllButtons() {
return document.querySelectorAll('button.is-following') || [];
}
async function unfollowAll() {
const buttons = getAllButtons();