WordPress.org

Plugin Directory

Changeset 633784


Ignore:
Timestamp:
12/04/12 02:59:17 (17 months ago)
Author:
mitchoyoshitaka
Message:

yarpp_map_post_types now applies to feeds too

Location:
yet-another-related-posts-plugin/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • yet-another-related-posts-plugin/trunk/class-core.php

    r633649 r633784  
    10281028            $post_types = array( get_post_type() ); 
    10291029 
    1030         $post_types = apply_filters( 'yarpp_map_post_types', $post_types ); 
     1030        $post_types = apply_filters( 'yarpp_map_post_types', $post_types, 'website' ); 
    10311031     
    10321032        return $content . $this->display_related(null, array( 
     
    10411041 
    10421042        if ( $this->get_option('cross_relate') ) 
    1043             $type = $this->get_post_types(); 
    1044         else if ( 'page' == get_post_type() ) 
    1045             $type = array( 'page' ); 
     1043            $post_types = $this->get_post_types(); 
    10461044        else 
    1047             $type = array( 'post' ); 
    1048      
    1049         return $content . $this->display_related(null, array('post_type' => $type, 'domain' => 'rss'), false); 
     1045            $post_types = array( get_post_type() ); 
     1046 
     1047        $post_types = apply_filters( 'yarpp_map_post_types', $post_types, 'rss' ); 
     1048     
     1049        return $content . $this->display_related(null, array( 
     1050            'post_type' => $post_types, 
     1051            'domain' => 'rss' 
     1052        ), false); 
    10501053    } 
    10511054     
  • yet-another-related-posts-plugin/trunk/readme.txt

    r633262 r633784  
    241241 
    242242== Changelog == 
     243 
     244= 4.0.1 = 
     245* Bugfix: a class of `yarpp-related-` with a stray hyphen was sometimes being produced. Now fixed so it produces `yarpp-related`. 
     246* Bugfix: some transients expired too soon if object caching was used 
     247* The `yarpp_map_post_types` filter now also applies to feeds and takes an extra argument to know whether the context is `website` or `rss`. 
    243248 
    244249= 4.0 = 
Note: See TracChangeset for help on using the changeset viewer.