Opened 2 years ago
Closed 12 months ago
#16675 closed defect (bug) (fixed)
Deprecate sticky_class function
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Template | Version: | 3.1 |
| Severity: | minor | Keywords: | has-patch commit |
| 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)
solarissmoke
— 2 years ago
comment:1
solarissmoke
— 2 years ago
- Keywords has-patch added
comment:2
scribu
— 2 years ago
- Component changed from General to Template
- Keywords commit added
- Milestone changed from Awaiting Review to Future Release
comment:4
in reply to:
↑ 3
solarissmoke
— 2 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.