View setup.php
add_action( 'init', function() { | |
// Remove the REST API endpoint. | |
remove_action('rest_api_init', 'wp_oembed_register_route'); | |
// Turn off oEmbed auto discovery. | |
// Don't filter oEmbed results. | |
remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10); | |
// Remove oEmbed discovery links. |
View filters.php
// REMOVE WP EMOJI | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('wp_print_styles', 'print_emoji_styles'); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); |
View filters.php
/** | |
* Use Lozad (lazy loading) for attachments/featured images | |
*/ | |
add_filter('wp_get_attachment_image_attributes', function ($attr, $attachment) { | |
// Bail on admin | |
if (is_admin()) { | |
return $attr; | |
} | |
$attr['data-src'] = $attr['src']; |
View parse.html
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Parse XML</title> | |
<script> | |
function getXML(fileUrl) | |
{ |
View style.css
img:not([src]) { | |
visibility: hidden; | |
} | |
/* IE/Edge */ | |
img[data-src]:not([src]), | |
img[data-srcset]:not([src]) { | |
display: block; | |
min-height: 1px; | |
} |
View jquery-passive-listener.js
jQuery.event.special.touchstart = { | |
setup: function( _, ns, handle ){ | |
if ( ns.includes("noPreventDefault") ) { | |
this.addEventListener("touchstart", handle, { passive: false }); | |
} else { | |
this.addEventListener("touchstart", handle, { passive: true }); | |
} | |
} | |
}; |
View copyToClipboard.js
document.querySelectorAll('.copy-text').forEach(function(elem) { | |
elem.addEventListener('click', function() { | |
var copyText = this.getAttribute('data-copyText'); | |
copyToClipboard(copyText); | |
}); | |
}); | |
function copyToClipboard(text) { | |
var selected = false; |
View certgen.sh
#!/bin/bash | |
source /usr/bin/cprintf.sh | |
########################################################### | |
# Generate a new SSL | |
# @param string $1 domain | |
if [ -n "$1" ]; then | |
domain="$1" |
View actions.php
add_action( 'init', function() { | |
// Remove the REST API endpoint. | |
remove_action('rest_api_init', 'wp_oembed_register_route'); | |
// Turn off oEmbed auto discovery. | |
// Don't filter oEmbed results. | |
remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10); | |
// Remove oEmbed discovery links. |
View settings.json
{ | |
// -> Files | |
"files.trimTrailingWhitespace": true, | |
// -> Editor | |
"editor.defaultFormatter": "esbenp.prettier-vscode", | |
"editor.formatOnSave": true, | |
"editor.renderWhitespace": "all", | |
"editor.formatOnPaste": true, | |
"editor.codeActionsOnSave": { |
OlderNewer