Make WordPress Core

Opened 16 years ago

Closed 14 years ago

#13860 closed defect (bug) (fixed)

Twenty Ten: Odd CSS rule messes with password protected form for galleries

Reported by: nacin Owned by: iandstewart
Priority: normal Milestone: WordPress.org
Component: Bundled Theme Version: 3.0
Severity: trivial Keywords: has-patch
Cc: Focuses:

Description (last modified by nacin)

Create a password protected post in the gallery category. On the home page, you'll get the form attempting to appear on the same line as the warning text due to:

.home #content .category-gallery .entry-content p {
    display: inline;
}

Screenshot attached. Originally reported by zeo.

Not sure what the CSS rule is for, but wontfix seems fine to me if it should stay.

The other outcome to this ticket I see as possible is it seems that post_class() deserves some post_password_required() love, in order to target this properly.

Attachments (3)

13860.png​ (25.8 KB ) - added by nacin 16 years ago.
13860.diff​ (589 bytes ) - added by zeo 16 years ago.
13860-post-class-post-password.diff​ (634 bytes ) - added by zeo 16 years ago.
Add class post-password to post_class(). Also fix minor typo.

Download all attachments as: .zip

Change History (18)

@nacin
16 years ago

#1 @nacin
16 years ago

  • Description modified (diff)

@zeo
16 years ago

#2 @zeo
16 years ago

  • Owner set to iammattthomas
  • Priority lowest → normal
  • Status new → assigned

It's never a good idea to change p element to be inline. There are a couple more scenario to prove that. For example if a plugin or theme tries hook something to the_content or the_excerpt it will be inline along with the content summary.

There are 2 ways to fix this:

1) Delete the rule. see 13860.diff
2) Create a custom filter for the_content() and the_excerpt() to add "This gallery contains n photos." in-line with the original content.

#3 @zeo
16 years ago

The patch also change:

#content .gallery {
	margin: auto;
}

to:

#content .gallery {
	margin: 0 auto 18px;
}

where it will add margin bottom to gallery div with the same value as p. Currently there's no gap at the end of gallery div.

#4 @zeo
16 years ago

  • Keywords has-patch added

@zeo
16 years ago

Add class post-password to post_class(). Also fix minor typo.

#5 @zeo
16 years ago

  • Owner changed from iammattthomas to iandstewart

#6 @iandstewart
16 years ago

The Twenty Ten functions.php is already complicated enough. I think deleting the rule that keeps "This gallery contains n photos" inline with the excerpt is the way to go. This'll be in 1.0.2 in the directory (along with the bottom margin on galleries).

#7 @iandstewart
16 years ago

Needs dev-feedback for 13860-post-class-post-password.diff

#8 @nacin
16 years ago

  • Milestone WordPress.org site → 3.1

Kicking this to 3.1 for the post_class patch, which looks good.

#9 @westi
16 years ago

  • Cc westi added
  • Milestone Awaiting Triage → 3.1

#10 @westi
16 years ago

(In [16138]) Add a post class if a password is required for the post to be displayed. See #13860 props zeo.

#11 @markmcwilliams
16 years ago

  • Resolution → fixed
  • Status assigned → closed

Looks fixed to me, but tell me off if it's not! ;)

#12 @nacin
16 years ago

  • Resolution fixed
  • Status closed → reopened

Twenty Ten still needs to take advantage of the new class, I believe.

#13 @nacin
16 years ago

  • Milestone 3.1 → WordPress.org

#14 @SergeyBiryukov
15 years ago

  • Component Themes → Bundled Theme

#15 @obenland
14 years ago

  • Resolution → fixed
  • Status reopened → closed

Bug was fixed with [15397].

Note: See TracTickets for help on using tickets.