WordPress.org

Make WordPress Core

Changeset 21253


Ignore:
Timestamp:
07/09/2012 09:10:59 PM (9 years ago)
Author:
nacin
Message:

Deprecate sticky_class() in favor of post_class(). props solarissmoke, fixes #16675.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/deprecated.php

    r21146 r21253  
    30983098 */
    30993099function get_theme_data( $theme_file ) {
    3100     _deprecated_function( __FUNCTION__, 3.4, 'wp_get_theme()' );
     3100    _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' );
    31013101    $theme = new WP_Theme( basename( dirname( $theme_file ) ), dirname( dirname( $theme_file ) ) );
    31023102
     
    31343134 */
    31353135function update_page_cache( &$pages ) {
    3136     _deprecated_function( __FUNCTION__, 3.4, 'update_post_cache()' );
     3136    _deprecated_function( __FUNCTION__, '3.4', 'update_post_cache()' );
    31373137
    31383138    update_post_cache( $pages );
     
    31533153 */
    31543154function clean_page_cache( $id ) {
    3155     _deprecated_function( __FUNCTION__, 3.4, 'clean_post_cache()' );
     3155    _deprecated_function( __FUNCTION__, '3.4', 'clean_post_cache()' );
    31563156
    31573157    clean_post_cache( $id );
     
    31753175    return __( 'Are you sure you want to do this?' );
    31763176}
     3177
     3178/**
     3179 * Display "sticky" CSS class, if a post is sticky.
     3180 *
     3181 * @since 2.7.0
     3182 * @deprecated 3.5.0
     3183 * @deprecated Use post_class()
     3184 * @see post_class()
     3185 *
     3186 * @param int $post_id An optional post ID.
     3187 */
     3188function sticky_class( $post_id = null ) {
     3189    _deprecated_function( __FUNCTION__, '3.5', 'post_class()' );
     3190    if ( is_sticky( $post_id ) )
     3191        echo ' sticky';
     3192}
  • trunk/wp-includes/post-template.php

    r21159 r21253  
    574574
    575575/**
    576  * Display "sticky" CSS class, if a post is sticky.
    577  *
    578  * @since 2.7.0
    579  *
    580  * @param int $post_id An optional post ID.
    581  */
    582 function sticky_class( $post_id = null ) {
    583     if ( !is_sticky($post_id) )
    584         return;
    585 
    586     echo " sticky";
    587 }
    588 
    589 /**
    590576 * Page Template Functions for usage in Themes
    591577 *
Note: See TracChangeset for help on using the changeset viewer.