Remove Theme Version

Hi,

I want to remove theme version.
I know,I can remove "Version:" line from style.css but is it secure for updates?
Or is there any way to modify wp-admin/themes.php file?

Thanks.

  • Philip John
    • DEV MAN’s Apprentice

    Okey doke...

    Just had a perusal through the relevant code and there's no filter available for this...

    It seems that the version is set amongst other data in an option called current_theme, which you can retrieve using
    get_option('current_theme');

    You'll have to modify the contents of that option to blank the version. Take a look at the current_theme_info() function on line /wp-admin/theme.php to see the make up of that array.

    Thanks,
    Phil

  • Mustafa
    • Syntax Hero

    Wrong address dude :slight_smile:
    I've checked

    Function and Method Cross Reference
    current_theme_info()
    Defined at:

    /wp-admin/includes/theme.php -> line 9

    Referenced 4 times:

    /wp-admin/includes/dashboard.php -> line 387
    /wp-admin/includes/dashboard.php -> line 1319
    /wp-admin/includes/theme.php -> line 148
    /wp-admin/includes/class-wp-themes-list-table.php -> line 23

    Anyway in the class-wp-themes-list-table.php file add comment line (//) before
    //$version = $themes[$theme_name]['Version']; fixed my problem.

    Thanks Phil :wink:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.