WordPress.org

Make WordPress Core

Ticket #16675: 16675.diff

File 16675.diff, 1.1 KB (added by solarissmoke, 7 years ago)
  • wp-includes/post-template.php

     
    564564}
    565565
    566566/**
    567  * Display "sticky" CSS class, if a post is sticky.
    568  *
    569  * @since 2.7.0
    570  *
    571  * @param int $post_id An optional post ID.
    572  */
    573 function sticky_class( $post_id = null ) {
    574         if ( !is_sticky($post_id) )
    575                 return;
    576 
    577         echo " sticky";
    578 }
    579 
    580 /**
    581567 * Page Template Functions for usage in Themes
    582568 *
    583569 * @package WordPress
  • wp-includes/deprecated.php

     
    26022602        return true;
    26032603}
    26042604
     2605/**
     2606 * Display "sticky" CSS class, if a post is sticky.
     2607 *
     2608 * @since 2.7.0
     2609 * @deprecated 3.2 use post_class() instead
     2610 *
     2611 * @param int $post_id An optional post ID.
     2612 */
     2613function sticky_class( $post_id = null ) {
     2614        _deprecated_function( __FUNCTION__, '3.2', 'post_class()' );
     2615       
     2616        if ( !is_sticky($post_id) )
     2617                return;
     2618
     2619        echo " sticky";
     2620}