Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions src/wp-includes/theme-compat/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,7 @@
);
?>

<hr />
<div id="footer" role="contentinfo">
<!-- If you'd like to support WordPress, having the "powered by" link somewhere on your blog is the best way; it's our only promotion or advertising. -->
<p>
<?php
printf(
/* translators: 1: Site name, 2: WordPress */
__( '%1$s is proudly powered by %2$s' ),
get_bloginfo( 'name' ),
'<a href="https://wordpress.org/">WordPress</a>'
);
?>
</p>
</div>
</div>

<!-- Gorgeous design by Michael Heilemann - http://binarybonsai.com/ -->
<?php /* "Just what do you think you're doing Dave?" */ ?>

Comment on lines -19 to -37
Copy link
Copy Markdown
Owner Author

@sabernhardt sabernhardt Jun 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removes horizontal rule, footer, and the design credit (which does not fit the active theme)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trac 50171 did not remove the design credit, but the changes proposed in this PR would remove some vestiges of the Kubrick design.

<?php wp_footer(); ?>
<?php wp_footer(); ?>
</body>
</html>
57 changes: 22 additions & 35 deletions src/wp-includes/theme-compat/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,44 +18,31 @@
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<link rel="profile" href="https://gmpg.org/xfn/11" />
<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />

<title><?php echo wp_get_document_title(); ?></title>

<link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" type="text/css" media="screen" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />

<?php if ( file_exists( get_stylesheet_directory() . '/images/kubrickbgwide.jpg' ) ) { ?>
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removes (check for) Kubrick background image

<style type="text/css" media="screen">

<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php echo wp_get_document_title(); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="profile" href="https://gmpg.org/xfn/11" />
Copy link
Copy Markdown
Owner Author

@sabernhardt sabernhardt Jun 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • updates charset meta, from TT1
  • retains the hardcoded title tag, as the theme-compat was intended for older themes
  • adds viewport meta (from TT1)
  • moves XFN profile link down

<link rel="stylesheet" href="<?php echo esc_url( get_stylesheet_uri() ); ?>" type="text/css" media="all" />
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stylesheet link uses get_stylesheet_uri function, as Twenty Ten and Twenty Eleven do, and this changes media to all

<?php
// Checks to see whether it needs a sidebar.
if ( empty( $withcomments ) && ! is_single() ) {
?>
#page { background: url("<?php bloginfo( 'stylesheet_directory' ); ?>/images/kubrickbg-<?php bloginfo( 'text_direction' ); ?>.jpg") repeat-y top; border: none; }
<?php } else { // No sidebar. ?>
#page { background: url("<?php bloginfo( 'stylesheet_directory' ); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
<?php } ?>

</style>
<?php } ?>

<?php
if ( is_singular() ) {
wp_enqueue_script( 'comment-reply' );
}
?>

<?php wp_head(); ?>
if ( is_singular() && pings_open() ) {
echo '<link rel="pingback" href="', esc_url( get_bloginfo( 'pingback_url' ) ), '" />', "\n";
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checks whether pings are open for post before printing (from TT1, but adding self-closing slash and line break)

}
if ( is_singular() ) {
wp_enqueue_script( 'comment-reply' );
Copy link
Copy Markdown
Owner Author

@sabernhardt sabernhardt Jun 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retains the comment-reply script, but this checks whether comments are open and threaded before printing the script (as themes since Twenty Twelve have done)

}
?>
<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<div id="page">

<div id="header" role="banner">
<div id="headerimg">
<h1><a href="<?php echo home_url(); ?>/"><?php bloginfo( 'name' ); ?></a></h1>
<div class="description"><?php bloginfo( 'description' ); ?></div>
<?php if ( ! empty( get_bloginfo( 'name' ) ) ) : ?>
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checks whether the site has a site title before printing the header (avoiding an empty link and heading)

<div id="header" role="banner">
<div id="headerimg">
<h1><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

escapes home_url and adds rel="home" to the link, similar to themes such as Twenty Seventeen

<div class="description"><?php bloginfo( 'description' ); ?></div>
</div>
</div>
</div>
<hr />
<hr aria-hidden="true" />
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retains horizontal rule for visual separation, but hides it from screen readers because it has no semantic value

<?php endif; ?>