Skip to content

Commit

Permalink
Use name instead of short_name for meta tags when latter is not avail…
Browse files Browse the repository at this point in the history
…able
  • Loading branch information
westonruter committed Jun 11, 2019
1 parent 24e78a6 commit cfd8c7a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wp-includes/class-wp-web-app-manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ public function manifest_link_and_meta() {
<?php if ( ! empty( $icon ) ) : ?>
<link rel="apple-touch-startup-image" href="<?php echo esc_url( $icon['src'] ); ?>">
<?php endif; ?>
<meta name="apple-mobile-web-app-title" content="<?php echo esc_attr( $manifest['short_name'] ); ?>">
<meta name="application-name" content="<?php echo esc_attr( $manifest['short_name'] ); ?>">

<?php $name = isset( $manifest['short_name'] ) ? $manifest['short_name'] : $manifest['name']; ?>
<meta name="apple-mobile-web-app-title" content="<?php echo esc_attr( $name ); ?>">
<meta name="application-name" content="<?php echo esc_attr( $name ); ?>">
<?php
}

Expand Down

0 comments on commit cfd8c7a

Please sign in to comment.