Blog code and general code release note system

Today’s site updates including removing the RSS feed links. Kinsta provided source code.1  The code for functions.php to remove it is:

remove_action( 'wp_head', 'feed_links_extra', 3 );
remove_action( 'wp_head', 'feed_links', 2 );

Kinsta also provided another very useful function2 and that was one that removed the various update notifications in the dashboard.

function kinsta_hide_update_nag() {
remove_action( 'admin_notices', 'update_nag', 3 );
}

add_action('admin_menu','kinsta_hide_update_nag');

Another very useful function for WordPress is one where you may add additional mime types for upload to the library.  This is useful for uploading compressed archives in different formats. Chris Meller’s venerable blog provides the source.3

add_filter('upload_mimes', 'custom_upload_mimes');
function custom_upload_mimes ( $existing_mimes=array() ) {

	// add your ext => mime to the array
	$existing_mimes['xz'] = 'application/x-xz';
        $existing_mimes['zip'] = 'application/zip';
	$existing_mimes['xml'] = 'application/xml';

	// add as many as you like
	// and return the new full result
	return $existing_mimes;

}

Somewhere along the way I picked up the following items to use as release notes within the scripts that I create.

E.g. 11/05/2024: [*] Changed URL to 1.1.1.1 from 8.8.8.8

[+] = Added
[*] = Changed  
[^] = Moved  
[=] = No Changes  
[x] = Deleted  
[!] = Bugs  
[_] = To Do  
[>] = Migrated  
[<] = Migrated

1. Kinsta®. “WordPress Disable RSS Feed,” August 30, 2016. https://kinsta.com/knowledgebase/wordpress-disable-rss-feed/.

2. Kinsta®. “How To Disable WordPress Update Notifications (Plugin or Code),” July 4, 2022. https://kinsta.com/knowledgebase/disable-wordpress-update-notification/.

3. Meller, Chris. “Modifying Allowed Upload Types in WordPress | Chris Meller,” July 26, 2007. https://blog.chrismeller.com/modifying-allowed-upload-types-in-wordpress.