Opened 12 years ago
Closed 11 years ago
#16675 closed defect (bug) (fixed)
Deprecate sticky_class function
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | minor | Version: | 3.1 |
Component: | Template | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
I was rummaging around post-template.php
and found the sticky_class()
function, which was meant to be used by themes like so:
<div class="post<?php sticky_class(); ?>" id="post-<?php the_ID(); ?>">
Of course now we have
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
sticky_class()
should be deprecated.
Attachments (1)
Change History (7)
#2
@
12 years ago
- Component changed from General to Template
- Keywords commit added
- Milestone changed from Awaiting Review to Future Release
#4
in reply to:
↑ 3
@
12 years ago
Replying to wycks:
As far as I can tell they do not do the same thing.
Then post_class should be modified to do what sticky_class did for back compat. Point is we should be using post_class to deal with all post classes.
Note: See
TracTickets for help on using
tickets.
I'm not sure this is a great idea post_class only shows 'sticky' for the first page, while sticky_class will be applied to the sticky post on any page ( archives, categories, etc).
As far as I can tell they do not do the same thing.