Skip to:
Content

BuddyPress.org

Opened 7 years ago

Closed 7 years ago

#4842 closed enhancement (fixed)

Code not valid inside message-loop.php

Reported by: MacPresss Owned by: BuddyPress ?
Milestone: 1.7 Priority: lowest
Severity: trivial Version: 1.7
Component: Messages Keywords: has-patch
Cc:

Description

Hello guys,

This is my first ticket,

I've found a very tiny error, it's more a typo to be honest..

Inside messages-loop.php my code-editor shows invalid code coloring at line 24, it looks like the double quotes from the 'read' VS 'unread' class are not correct.

Old code.

<tr id="m-<?php bp_message_thread_id(); ?>" class="<?php bp_message_css_class(); ?><?php if ( bp_message_thread_has_unread() ) : ?> unread"<?php else: ?> read"<?php endif; ?>>

New code - I think this is better..

<tr id="m-<?php bp_message_thread_id(); ?>" class="<?php bp_message_css_class(); ?><?php if ( bp_message_thread_has_unread() ) : ?> unread<?php else: ?> read<?php endif; ?>">

Screenshot
http://oi47.tinypic.com/14ngrj8.jpg

Change History (2)

#1 @boonebgorges
7 years ago

  • Milestone changed from Awaiting Review to 1.7
  • Priority changed from normal to lowest
  • Severity changed from minor to trivial

There's nothing wrong with the way it currently works - the close-quotes are included in both the if and else blocks, so that the markup always comes out valid. However, your patch will result in one fewer character :) and it also makes more sense than the current markup. So OK.

#2 @boonebgorges
7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6816]) Improve syntax in members/single/messages/messages-loop.php

Including the close quotes in the scope of a conditional resulted in valid
markup, but created problems with some syntax highlighting software.

Fixes #4842

Props MacPresss

Note: See TracTickets for help on using tickets.