Make WordPress Core

Ticket #22957: 22957.diff

File 22957.diff, 1.1 KB (added by pathawks, 11 years ago)

get_boundary_post from any page

  • wp-includes/link-template.php

     
    13031303 * @return object
    13041304 */
    13051305function get_boundary_post( $in_same_cat = false, $excluded_categories = '', $start = true ) {
    1306         $post = get_post();
    1307         if ( ! $post || ! is_single() || is_attachment() )
    1308                 return null;
    1309 
    13101306        $cat_array = array();
    13111307        if( ! is_array( $excluded_categories ) )
    13121308                $excluded_categories = explode( ',', $excluded_categories );
  • wp-includes/deprecated.php

     
    27192719 */
    27202720function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) {
    27212721        _deprecated_function( __FUNCTION__, '3.3' );
     2722        $post = get_post();
     2723        if ( ! $post || ! is_single() || is_attachment() )
     2724                return null;
    27222725
    27232726        $posts = get_boundary_post($in_same_cat, $excluded_categories, $start);
    27242727        // If there is no post stop.