Last active 1730373940

Hide version in Yourls instance

plugin.php Raw
1<?php
2/*
3Plugin Name: Hide Version String
4Plugin URI: https://gist.gitlab.pm/rune/848db1196f6e4b5d9002fae1cccaf6f3
5Description: Plugin to hide the version string in the footer.
6Version: 0.1
7Author: Rune
8Author URI: https://blog.rune.pm
9*/
10
11if( !defined( 'YOURLS_ABSPATH' ) ) die();
12
13yourls_add_filter( 'html_footer_text', 'hide_version_string' );
14
15function hide_version_string( $value ) {
16 return preg_filter( '/ v .* \&ndash; /', ' &ndash; ', $value );
17}