Plugin Directory

Changeset 3290857


Ignore:
Timestamp:
05/10/2025 10:11:24 AM (9 months ago)
Author:
barrykooij
Message:

Release 2.3.0, see readme.txt for changelog.

Location:
related-posts-for-wp
Files:
3 deleted
6 edited
21 copied

Legend:

Unmodified
Added
Removed
  • related-posts-for-wp/tags/2.3.0/classes/class-post-link-manager.php

    r3158871 r3290857  
    184184            $link_args['order'] = $extra_args['order'];
    185185            unset( $extra_args['order'] );
     186        }
     187
     188        // Check $extra_args for `offset`, this should be added to link query instead of the child query
     189        if ( isset( $extra_args['offset'] ) ) {
     190
     191            // Set posts_per_page to link arguments
     192            $link_args['offset'] = $extra_args['offset'];
     193            unset( $extra_args['offset'] );
    186194        }
    187195
     
    381389     * @param  int  $id
    382390     * @param  int  $limit
     391     * @param  int  $offset
    383392     *
    384393     * @return string
     
    387396     *
    388397     */
    389     public function generate_children_list( $id, $limit = - 1 ) {
     398    public function generate_children_list( $id, $limit = - 1, $offset = 0 ) {
    390399
    391400        ob_start();
    392401
    393402        // Get the children
    394         $related_posts = $this->get_children( $id, array( 'posts_per_page' => $limit ) );
     403        $related_posts = $this->get_children( $id, [ 'posts_per_page' => $limit, 'offset' => $offset ] );
    395404
    396405        // Count
  • related-posts-for-wp/tags/2.3.0/classes/class-rp4wp.php

    r3198786 r3290857  
    99    private static $instance = null;
    1010
    11     const VERSION = '2.2.5';
     11    const VERSION = '2.3.0';
    1212
    1313    /**
  • related-posts-for-wp/tags/2.3.0/classes/hooks/class-hook-shortcode.php

    r1189440 r3290857  
    2222
    2323        $atts = shortcode_atts( array(
    24             'id'    => get_the_ID(),
    25             'limit' => -1
     24            'id'     => get_the_ID(),
     25            'limit'  => - 1,
     26            'offset' => 0,
    2627        ), $atts );
    2728
     
    3031
    3132        // Generate the children list
    32         return $pl_manager->generate_children_list( $atts['id'], $atts['limit'] );
     33        return $pl_manager->generate_children_list( $atts['id'], $atts['limit'], $atts['offset'] );
    3334    }
    3435}
  • related-posts-for-wp/tags/2.3.0/readme.txt

    r3198786 r3290857  
    44Tags: related, inline related posts, similar posts, contextual relations, seo bounce rate, internal links
    55Requires at least: 5.0
    6 Tested up to: 6.7.1
    7 Stable tag: 2.2.5
     6Tested up to: 6.8.1
     7Stable tag: 2.3.0
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    2020Our installation wizard will do all the hard work for you, simply activate the plugin, set the amount of posts that should relate and press the button. Related Posts for WordPress will do the rest. Relating posts in WordPress has never been this easy!
    2121
    22 Fully tested and working on PHP 5.3 and up (including PHP 8, 8.1 & 8.2)!
     22Fully tested and working on PHP 5.3 and up (including PHP 8, 8.1, 8.2, 8.3 & 8.4)!
    2323
    2424> #### Related Posts for WordPress Premium
     
    121121
    122122== Changelog ==
     123
     124= 2.3.0: May 10th, 2025 =
     125* Feature: Added support for an offset in the [rp4wp] shortcode.
    123126
    124127= 2.2.5: November 28, 2024
  • related-posts-for-wp/tags/2.3.0/related-posts-for-wp.php

    r3198786 r3290857  
    44    Plugin URI: http://www.relatedpostsforwp.com/
    55    Description: Related Posts for WordPress, the best way to display related posts in WordPress.
    6     Version: 2.2.5
     6    Version: 2.3.0
    77    Author: Never5
    88    Author URI: http://www.never5.com/
  • related-posts-for-wp/trunk/classes/class-post-link-manager.php

    r3158871 r3290857  
    184184            $link_args['order'] = $extra_args['order'];
    185185            unset( $extra_args['order'] );
     186        }
     187
     188        // Check $extra_args for `offset`, this should be added to link query instead of the child query
     189        if ( isset( $extra_args['offset'] ) ) {
     190
     191            // Set posts_per_page to link arguments
     192            $link_args['offset'] = $extra_args['offset'];
     193            unset( $extra_args['offset'] );
    186194        }
    187195
     
    381389     * @param  int  $id
    382390     * @param  int  $limit
     391     * @param  int  $offset
    383392     *
    384393     * @return string
     
    387396     *
    388397     */
    389     public function generate_children_list( $id, $limit = - 1 ) {
     398    public function generate_children_list( $id, $limit = - 1, $offset = 0 ) {
    390399
    391400        ob_start();
    392401
    393402        // Get the children
    394         $related_posts = $this->get_children( $id, array( 'posts_per_page' => $limit ) );
     403        $related_posts = $this->get_children( $id, [ 'posts_per_page' => $limit, 'offset' => $offset ] );
    395404
    396405        // Count
  • related-posts-for-wp/trunk/classes/class-rp4wp.php

    r3198786 r3290857  
    99    private static $instance = null;
    1010
    11     const VERSION = '2.2.5';
     11    const VERSION = '2.3.0';
    1212
    1313    /**
  • related-posts-for-wp/trunk/classes/hooks/class-hook-shortcode.php

    r1189440 r3290857  
    2222
    2323        $atts = shortcode_atts( array(
    24             'id'    => get_the_ID(),
    25             'limit' => -1
     24            'id'     => get_the_ID(),
     25            'limit'  => - 1,
     26            'offset' => 0,
    2627        ), $atts );
    2728
     
    3031
    3132        // Generate the children list
    32         return $pl_manager->generate_children_list( $atts['id'], $atts['limit'] );
     33        return $pl_manager->generate_children_list( $atts['id'], $atts['limit'], $atts['offset'] );
    3334    }
    3435}
  • related-posts-for-wp/trunk/readme.txt

    r3198786 r3290857  
    44Tags: related, inline related posts, similar posts, contextual relations, seo bounce rate, internal links
    55Requires at least: 5.0
    6 Tested up to: 6.7.1
    7 Stable tag: 2.2.5
     6Tested up to: 6.8.1
     7Stable tag: 2.3.0
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    2020Our installation wizard will do all the hard work for you, simply activate the plugin, set the amount of posts that should relate and press the button. Related Posts for WordPress will do the rest. Relating posts in WordPress has never been this easy!
    2121
    22 Fully tested and working on PHP 5.3 and up (including PHP 8, 8.1 & 8.2)!
     22Fully tested and working on PHP 5.3 and up (including PHP 8, 8.1, 8.2, 8.3 & 8.4)!
    2323
    2424> #### Related Posts for WordPress Premium
     
    121121
    122122== Changelog ==
     123
     124= 2.3.0: May 10th, 2025 =
     125* Feature: Added support for an offset in the [rp4wp] shortcode.
    123126
    124127= 2.2.5: November 28, 2024
  • related-posts-for-wp/trunk/related-posts-for-wp.php

    r3198786 r3290857  
    44    Plugin URI: http://www.relatedpostsforwp.com/
    55    Description: Related Posts for WordPress, the best way to display related posts in WordPress.
    6     Version: 2.2.5
     6    Version: 2.3.0
    77    Author: Never5
    88    Author URI: http://www.never5.com/
Note: See TracChangeset for help on using the changeset viewer.