The most effective way to remove a git submodule (source):
git submodule deinit <path_to_submodule>
git rm <path_to_submodule>
git commit -m "Removed submodule "
rm -rf .git/modules/<path_to_submodule>
<?php | |
/** | |
* Plugin Name: Disable Site Health | |
* Description: Disables WordPress Site Health notifications, dashboard widget and PHP update notice | |
* Version: 1.1.0 | |
* Author: Daniel M. Hendricks | |
* Author URI: https://daniel.hn/ | |
* Plugin URI: https://gist.github.com/dmhendricks/2d2c51da8a17d7a47b41bcfd26c3314d | |
*/ | |
namespace MU_Plugins; |
The most effective way to remove a git submodule (source):
git submodule deinit <path_to_submodule>
git rm <path_to_submodule>
git commit -m "Removed submodule "
rm -rf .git/modules/<path_to_submodule>
This plugin is a fork of the Scheduled Post Trigger plugin, modified for slight performance i
<?php | |
/** | |
* @wordpress-plugin | |
* Plugin Name: Remove Script Versions | |
* Description: Removes the script version from linked CSS and JS scripts to improve cacheability. | |
* Plugin URI: https://gist.github.com/dmhendricks/fbf4c69b3c7a13ffa04526427083742a/ | |
* Version: 1.0.0 | |
* Author: Daniel M. Hendricks | |
* Author URI: https://daniel.hn/ | |
* License: GPLv2 or later |
/** | |
* Because searching for a simple example of how to Base64 encode/decode in Java | |
* that hasn't been deprecated since the Crimean War is an exercise in madness... | |
* | |
* Requires Java 8 or higher | |
*/ | |
package hn.daniel; | |
import java.util.Base64; |
Let's say that you want to point multiple domain names to the same WordPress instance. Normally, if you do this, WordPress will siimply redirect to the home
URL in the database as configured in WP Admin > Settings > General > Site Address (URL).
There may be a case where you want multiple domains pointing to the same site - perhaps for referral tracking, to migrate an old domain, to allow the use of short URL (for example, my-really-long-domain.com
and shrturl.co
), etc without using a redirect.
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Boilerplate</title> | |
<meta name="description" content="Boilerplate" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<link rel="canonical" href="https://example.com/" /> |
/** | |
* Bind querySelector to dollar sign ($) to easily reference DOM elements without jQuery | |
* Source: https://twitter.com/MrAhmadAwais/status/1113094169025708033 | |
*/ | |
// In case you're also loading jQuery | |
jQuery.noConflict(); | |
// Example - Change an element's background color | |
// Shorthand for: document.querySelector( '.selector' ).style.background = '#BADA55'; |