• I discovered something peculiar when I accidentally forgot to include a “header.php” file in my theme.
    Something automatically added a line of code referencing “kubrickbg-ltr.jpg” to my rendered pages:

    <style type="text/css" media="screen">
    #page { background: url("https://example.com/site/wp-content/themes/example/images/kubrickbg-ltr.jpg") repeat-y top; border: none; }
    </style>

    where “example.com” is my domain and “example” is the name of my theme.

    Is it possible that the WP core code is automatically adding this?
    My theme has nothing to do with Kubrick, is not at all based on it, so it is puzzling as to why this would show up.

    If I include header.php in my theme’s folder, the #page style above goes away.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Is it possible that the WP core code is automatically adding this?

    Yes. WP core does have fallbacks that are used if a given template is missing from a theme.

    Thread Starter bkjproductions

    (@bkjproductions)

    But why Kubrick? ??

    It seems to me, that if the core code is supplementing something that is missing, it is not a good assumption to make that there would be an image named kubrickbg-[whatevertextdirection]-.jpg. Seems like it would be better to have nothing (or a background color) or reference something that is definitely going to be around, maybe something from the wp-admin/images/ folder?

    I would love to find out where these fallbacks are referenced; is there a collection of them or is it something I have to look through the core code to find?

    After doing a search of a fresh install of WP for “kubrick”, I found:
    wp-includes\theme-compat\header.php
    which is where it shows up.

    Looks like the theme compatibility folder includes
    comments.php
    comments-popup.php
    footer.php
    header.php
    sidebar.php

    and within, there is a comment:
    * This file is here for Backwards compatibility with old themes and will be removed in a future version

    I think it’s probably a good idea to have a fallback, like if you forget to install a theme at all, but maybe it could be a slightly more bulletproof fallback with some commented documentation that would appear in rendered HTML.

    Anyway, I’m just putting this out there in case someone else runs into this strangeness…. for now, looks like if you encounter Kubrick remnants unexpectedly, and haven’t thought to do this, make sure you have header.php in your theme!

    Kubrick is the old default WordPress theme.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Kubrick remnant’ is closed to new replies.