Skip to content

Commit

Permalink
Merge pull request #2027 from CityOfPhiladelphia/fix-img-tags
Browse files Browse the repository at this point in the history
added self closing character to img tags
  • Loading branch information
RitikaDesai98 committed Oct 31, 2023
2 parents b49b53d + 31b467e commit 9832965
Show file tree
Hide file tree
Showing 22 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function content_blocks_shortcode( $atts ) {
$block_image = isset( $array_value['phila_block_image'] ) ? $array_value['phila_block_image'] : '';

if ( !$block_image == '' ) {
$output .= '<img src="' . $block_image . '" alt="">';
$output .= '<img src="' . $block_image . '" alt="" />';
}

$block_title = isset( $array_value['phila_block_content_title'] ) ? $array_value['phila_block_content_title'] : '';
Expand All @@ -128,7 +128,7 @@ function content_blocks_shortcode( $atts ) {
$block_image = isset( $array_value['phila_block_image'] ) ? $array_value['phila_block_image'] : '';

if ( !$block_image == '' ) {
$output .= '<img src="' . $block_image . '" alt="">';
$output .= '<img src="' . $block_image . '" alt="" />';
}

$output .= '<div class="content-block">';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function program_tile_shortcode($atts){
$output .= '" href="' . get_the_permalink($id) . '">';
$img = rwmb_meta( 'prog_header_img', $args = array( 'size' => 'medium', 'limit' => 1 ), $id );
$img = reset( $img );
$output .= '<img src="' . $img['url'] . '" alt="' . $img['alt'] . '">';
$output .= '<img src="' . $img['url'] . '" alt="' . $img['alt'] . '" />';
$output .= '<div class="content-block"><h4 class="h3">'. get_the_title($id) . '</h4>';
$output .= '<p>' . rwmb_meta( 'phila_meta_desc', array() ,$id) . '</p>';
$output .= '</div>
Expand Down
4 changes: 2 additions & 2 deletions wp/wp-content/themes/phila.gov-theme/front-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="site-main home">
<main>
<div class="hero-content" style="background-image: url('<?php echo $desktop_homepage_image; ?>');">
<img class="show-for-small-only" src="<?php echo $mobile_homepage_image; ?>" alt="">
<img class="show-for-small-only" src="<?php echo $mobile_homepage_image; ?>" alt="" />
<div class="hero-wrap">
<div class="photo-credit small-text">
</div>
Expand Down Expand Up @@ -162,7 +162,7 @@
<div class="card hover-fade">
<a href="/parks-rec-finder/" class="hover-fade">
<?php $image = rwmb_meta('phila_v2_photo_callout_block__photo', array('size' => 'medium', 'limit' => 1), $post = '27984')[0]['url']; ?>
<img src="<?php echo $image ?>" alt="">
<img src="<?php echo $image ?>" alt="" />
<?php wp_reset_query(); ?>
<div class="card-description bg-ghost-gray phl pvm">
<h3>Parks & Recreation Finder</h3>
Expand Down
2 changes: 1 addition & 1 deletion wp/wp-content/themes/phila.gov-theme/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
</div>
<div class="small-16 medium-4 columns valign medium-push-0 logo-container">
<a href="<?php echo get_home_url(); ?>" class="logo" aria-label="City of Philadelphia">
<img src="<?php echo get_stylesheet_directory_uri() . "/img/city-of-philadelphia-logo.svg" ?>" data-fallback="//www.phila.gov/assets/images/city-of-philadelphia.png" alt="City of Philadelphia">
<img src="<?php echo get_stylesheet_directory_uri() . "/img/city-of-philadelphia-logo.svg" ?>" data-fallback="//www.phila.gov/assets/images/city-of-philadelphia.png" alt="City of Philadelphia" />
</a>
</div>
<div class="medium-16 columns pan show-for-medium desktop-nav">
Expand Down
4 changes: 2 additions & 2 deletions wp/wp-content/themes/phila.gov-theme/inc/custom-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<?php if ( get_header_image() ) : ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<img src="<?php header_image(); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="">
<img src="<?php header_image(); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="" />
</a>
<?php endif; // End header image check. ?>
Expand Down Expand Up @@ -118,7 +118,7 @@ function phila_gov_admin_header_image() {
<h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
<div class="displaying-header-text" id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
<?php if ( get_header_image() ) : ?>
<img src="<?php header_image(); ?>" alt="">
<img src="<?php header_image(); ?>" alt="" />
<?php endif; ?>
</div>
<?php
Expand Down
4 changes: 2 additions & 2 deletions wp/wp-content/themes/phila.gov-theme/js/dev/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (typeof phila_js_vars !== 'undefined') {
$.ajax(ajaxURL).done(function (response) {
var fullSizeImg = response._embedded["wp:featuredmedia"]["0"].media_details.sizes.full.source_url;
var featuredCaption = response._embedded["wp:featuredmedia"]["0"].caption.rendered;
$modal.html('<div class="lightbox-content"><img src="' + fullSizeImg + '" alt=""></div>');
$modal.html('<div class="lightbox-content"><img src="' + fullSizeImg + '" alt="" /></div>');

if(response._embedded["wp:featuredmedia"]["0"].meta_box.phila_media_credit.length) {
var featuredCredit = document.createElement("p");
Expand Down Expand Up @@ -126,7 +126,7 @@ $(function(){
//modal for any image that's been added to the page and linked to.
var $modal = $('#phila-lightbox');
function loadContent(url){
$modal.html('<div class="lightbox-content"><img src="' + url + '" alt=""></div>').foundation('open');
$modal.html('<div class="lightbox-content"><img src="' + url + '" alt=""/></div>').foundation('open');
$modal.append(closeButton);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="row">
<div class="small-24 columns">
<?php if( is_404() ) : ?>
<img src="<?php echo get_stylesheet_directory_uri() . '/img/city-skyline.svg' ?>">
<img src="<?php echo get_stylesheet_directory_uri() . '/img/city-skyline.svg' ?>" />
<?php endif; ?>
<div class="feedback-updated phm phn-mu <?php echo ( !is_404() ) ? 'mvs mtm-mu ' : '' ?>mbxl-mu">
<div class="row" data-toggle="feedback">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<section class="get-involved-row">
<div class="row-wrap">
<?php if ( $action_panel_bg != '') :?>
<img class="banner show-for-large" src="<?php echo $action_panel_bg;?>" alt="">
<img class="banner show-for-large" src="<?php echo $action_panel_bg;?>" alt="" />
<?php endif; ?>
<div class="row mbm ptm <?php if( $item_count > 1 ) echo 'equal-height';?>">
<?php foreach ( $action_panel_multi as $call_to_action ) :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<div class="cell phila-linked-image-grid__item large-7 medium-7 small-auto">
<a class="phila-linked-image-grid__item-photo hover-fade" href="<?php echo $linkURL ?>">
<?php if($imageUrl): ?> <img src="<?php echo $imageUrl ?>" alt=""><?php endif; ?>
<?php if($imageUrl): ?> <img src="<?php echo $imageUrl ?>" alt="" /><?php endif; ?>
<div href="<?php echo $linkURL ?>" class=" phila-linked-image-grid__item-title <?php echo $linkIsExternal ? 'external' : '' ?>"><?php echo $linkTitle ?></div>
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="ppr-feat-locationType__img-container">
<div class="ppr-feat-locationType__count-badge"><i class="fas fa-map-marker-alt" aria-hidden="true"></i><span data-count></span></div>
<a data-slug href="/parks-rec-finder/#/locations/">
<img data-location_type_photo class="ppr-feat-locationType__img" src="" alt="">
<img data-location_type_photo class="ppr-feat-locationType__img" src="" alt="" />
</a>
</div>
<a data-slug href="/parks-rec-finder/#/locations/">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<?php
$img = rwmb_meta( 'prog_header_img', $args = array( 'size' => 'medium', 'limit' => 1 ), $program_page );
$img = reset( $img );?>
<img src="<?php echo $img['url'] ?>" alt="<?php echo $img['alt']?>">
<img src="<?php echo $img['url'] ?>" alt="<?php echo $img['alt']?>" />
<div class="content-block">
<h4 class="h3 <?php echo !empty($off_site) ? 'external' : ''; ?>"><?php echo get_the_title($program_page); ?></h4>
<?php echo rwmb_meta( 'phila_meta_desc', $args = '', $program_page ); ?></h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<?php $logo = phila_get_department_logo_v2( $id ); ?>
<div class="row mtxl">
<div class="columns center">
<img src="<?php echo $logo['full_url'] ?>" class="department-logo" alt="<?php echo $logo['alt']; ?>">
<img src="<?php echo $logo['full_url'] ?>" class="department-logo" alt="<?php echo $logo['alt']; ?>" />
</div>
</div>
<?php endif;?>
Expand All @@ -36,7 +36,7 @@
<?php foreach ($ids as $id => $slug) :?>
<?php $img = rwmb_meta( 'phila_v2_department_logo', $args = array( 'size' => 'full', 'limit' => 1 ), $id ); ?>
<div class="cell center medium-6">
<img src="<?php echo $img[0]['full_url'] ?>" class="department-logo" alt="<?php echo $img[0]['alt'] ?>">
<img src="<?php echo $img[0]['full_url'] ?>" class="department-logo" alt="<?php echo $img[0]['alt'] ?>" />
</div>
<?php endforeach; ?>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<?php
$img = rwmb_meta( 'prog_header_img', $args = array( 'size' => 'medium', 'limit' => 1 ), $card );
$img = reset( $img );?>
<img src="<?php echo $img['url'] ?>" alt="<?php echo $img['alt']?>">
<img src="<?php echo $img['url'] ?>" alt="<?php echo $img['alt']?>" />
<div class="content-block">
<h4 class="h3 <?php echo ($template == 'prog_off_site') ? 'external' : ''; ?>"><?php echo get_the_title($card); ?></h4>
<?php echo rwmb_meta( 'phila_meta_desc', $args = '', $card ); ?></h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<div class="accordion-content group" data-tab-content>
<?php if( isset( $member['headshot'] ) ) : ?>
<?php $image = wp_get_attachment_image_src( $member['headshot'][0], $size = 'full' );
echo isset( $member['headshot'] ) ? '<img src="' . $image[0] . '" alt="' . $member['full_name'] .'" class="float-left" width="200" height="200">' : ''; ?>
echo isset( $member['headshot'] ) ? '<img src="' . $image[0] . '" alt="' . $member['full_name'] .'" class="float-left" width="200" height="200" />' : ''; ?>
<?php endif; ?>
<?php echo isset( $member['bio'] ) ? apply_filters( 'the_content', $member['bio'] ) : ''?>
<?php echo isset( $member['email'] ) ? '<a translate="no" href="mailto:' . $member['email'] .'"> ' . $member['email']. '</a>' : ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

<?php elseif (!empty($toggle) || !empty($photo) ) : ?>
<div class="photo-callout-block__img large-14 medium-12 small-20 cell">
<img src="<?php echo $photo ?>" alt="" class="float-center">
<img src="<?php echo $photo ?>" alt="" class="float-center" />
</div>

<div class="photo-callout-block__txt large-10 medium-12 small-20 cell">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="large-24 columns" >

<h2>Things To Do</h2>
<img class="float-center" src=" <?php echo rwmb_meta('phila_v2_homepage_things_to_do_image','limit=1')[0]['full_url'] ?> " alt="">
<img class="float-center" src=" <?php echo rwmb_meta('phila_v2_homepage_things_to_do_image','limit=1')[0]['full_url'] ?> " alt="" />
</div>

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<header id="spotlight-header" class="spotlight">
<a class="bg-ghost-gray card card--calendar" href="<?php echo get_the_permalink() ?>">
<div class="grid-x">
<img src="<?php echo $hero['full_url'] ?>" class="spotlight-image" alt="<?php echo $hero['alt'] ?>">
<img src="<?php echo $hero['full_url'] ?>" class="spotlight-image" alt="<?php echo $hero['alt'] ?>" />
<?php if ( !empty($credit) ): ?>
<div class="photo-credit small-text">
<span><i class="fas fa-camera" aria-hidden="true"></i> Photo by <?php echo !empty($credit) ? '<div class="photo-credit">' . $credit . '</div>' : '' ?></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
?>
<header id="spotlight-header" class="spotlight">
<div class="grid-x image-container">
<img src="<?php echo $hero['full_url'] ?>" class="spotlight-image" alt="<?php echo $hero['alt'] ?>">
<img src="<?php echo $hero['full_url'] ?>" class="spotlight-image" alt="<?php echo $hero['alt'] ?>" />
<?php if ( !empty($credit) ): ?>
<div class="photo-credit small-text">
<span><i class="fas fa-camera" aria-hidden="true"></i> Photo by <?php echo !empty($credit) ? $credit : '' ?></span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="grid-x grid-padding-x align-middle mbm">
<div class="cell medium-3 center">
<img src="<?php echo get_template_directory_uri() . '/img/city-seal.gif'?>" alt="Seal of the City of Philadelphia" class="city-seal">
<img src="<?php echo get_template_directory_uri() . '/img/city-seal.gif'?>" alt="Seal of the City of Philadelphia" class="city-seal" />
</div>
<div class="cell medium-21">
<h1 class="h3">City of Philadelphia Action Guide</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<?php if ( !empty( $owner ) ) : ?>
<div class="owner-logo">
<div class="sep"></div>
<img src="<?php echo $owner['full_url']?>" alt="<?php echo $owner['alt']?>">
<img src="<?php echo $owner['full_url']?>" alt="<?php echo $owner['alt']?>" />
</div>
<?php endif;?>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<?php
$img = rwmb_meta( 'prog_header_img', $args = array( 'size' => 'large', 'limit' => 1 ), $post->ID );
$img = reset( $img );?>
<img src="<?php echo $img['url'] ?>" alt="<?php echo $img['alt']?>" class="columns medium-7 pan show-for-medium">
<img src="<?php echo $img['url'] ?>" alt="<?php echo $img['alt']?>" class="columns medium-7 pan show-for-medium" />
<div class="content-block columns medium-16">
<div class="medium-text mvl">You can find more information on <?php the_title(); ?> on their website.</div>
<div class="button icon clearfix mbm">
Expand Down
4 changes: 2 additions & 2 deletions wp/wp-includes/SimplePie/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -581,12 +581,12 @@ private function parse_microformats(&$data, $url) {
$hidden = $j === 0 ? '' : 'class="hidden" ';
$description .= '<a href="'.$photo_list[$j].'" '.$hidden.
'data-lightbox="image-set-'.$image_set_id.'">'.
'<img src="'.$photo_list[$j].'"></a>';
'<img src="'.$photo_list[$j].'" /></a>';
}
$description .= '<br><b>'.$count.' photos</b></p>';
}
else if ($count == 1) {
$description = '<p><img src="'.$photo_list[0].'"></p>';
$description = '<p><img src="'.$photo_list[0].'" /></p>';
}
}
if (isset($entry['properties']['content'][0]['html'])) {
Expand Down

0 comments on commit 9832965

Please sign in to comment.