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