Tag Archive for 'WordPress'

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.

Simon Says and use Mojeek

The Simon Says blog has been online for a long time. Here is an entry from 2008 about ripping CDs on a Mac.  In a way this site shows what is wrong with the web.  Twenty years ago blogs and websites had favorites and blog rolls.  Through this people discovered many great sites.  Around 2012 WordPress removed the Link Manager from the default WordPress and the blog-sphere began to fade away because the links began to fray.  From there, Google began to limit search results to the chosen few.  Recently Bing search has begun allowing scrolling to many different search results again. I went to page 16 the other day just to see.  To use a Search Engine like it’s 2009, which was way better than now, use Mojeek.  I hope they don’t break it.  That’s how I found that 2008 entry about ripping CDs on a Mac.  That is a discovery that one would never find on Google.  It was like stepping into a time machine.