Skip to content

Instantly share code, notes, and snippets.

@chrisk2020
chrisk2020 / remove_wp_selfies.php
Last active December 13, 2017 18:15 — forked from cfxd/remove_wp_selfies.php
Remove Existing Self Linking Images ("WP Selfies") in WordPress. See http://cfxdesign.com/remove-existing-self-linking-images-in-wordpress
<?php
function remove_self_linking_images() {
$all_ids = new WP_Query(array(
'post_type' => array('post', 'page'), // feel free to add custom post types here if necessary
'posts_per_page' => -1,
'post_status' => 'any',
'fields' => 'ids'
));
@chrisk2020
chrisk2020 / readyExec.js
Created January 18, 2016 22:06 — forked from miguel-perez/readyExec.js
How to add the ability to re-run $(document).ready() functions
/**
* Replace jQuery's $.fn.ready() function with a mod exec
*
* Sites that make heavy use of the $(document).ready function
* are generally incompatable with asynchrounous content. The
* the $.fn.ready function only runs once. This script replaces
* the ready function with a module execution controller that
* let's us register functions and execute all of the functions
* as we need them. This is useful after HTML gets injected on the
* page and we want to rebind functionally to the new content.