[wp-trac] [WordPress Trac] #10976: Add $before_content and $after_content to widget options
WordPress Trac
wp-trac at lists.automattic.com
Sun Jul 18 19:04:02 UTC 2010
#10976: Add $before_content and $after_content to widget options
-------------------------+--------------------------------------------------
Reporter: newkind | Owner: azaozz
Type: enhancement | Status: closed
Priority: normal | Milestone: 2.9
Component: Widgets | Version:
Severity: normal | Resolution: wontfix
Keywords: 2nd-opinion |
-------------------------+--------------------------------------------------
Comment(by gordonbrander):
I also thing this is would be a very helpful feature. It's a very common
markup pattern for everything from articles to callout modules.
In addition to the example use-case greenshady gave, here are some others:
From a semantic standpoint I think it's valuable to be able to define the
content area of a widget as a unique entity. This is a logical markup
structure found in microformats like hAtom (.entry-content), hProduct
(.description), as well as a common ad-hoc pattern. Check out the comments
on ma.tt for example (.comment-body), or the articles in the new HTML5
Toolbox theme. As widget areas are used in more areas than just sidebars
(reorder-able home pages for example), this will become even more useful.
I may, for example, want to create a reorder-able magazine home page
syndicated with the hAtom microformat.
From a practical standpoint it allows you to create more flexible design
systems for sites. For example, you may have a widget with padding and a
background color. That widget may contain content wrapped in a paragraph,
or just a naked string of text (you never know with clients). If there is
a naked string of text, your pretty bottom spacing is gone. But, if you
have a content wrapper, you can put a bottom margin on the content equal
to the margin of the potential paragraph tag. Boom: margin collapse takes
care of the rest, keeping your spacing consistent and your design
bulletproof.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10976#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list