WordPress.org

Ready to get started?Download WordPress

Forums

Posts 2 Posts
[resolved] get_non_connectable() limited by pager size? (3 posts)

  1. ruud@joyo
    Member
    Posted 1 year ago #

    Hi Scribu,

    I was trying a different size for the pager in the get_connectable admin box. I used the p2p_connectable_args filter for this.
    Changing the pager worked fine this way, i added:
    $args['p2p:per_page'] = 25.
    However when var_dumping my args array I found out the p2p:exclude array is somehow always limited to 5 items (and the current post_id)
    There is no filter available to correct this, so I finally swapped these 2 lines:

    $qv = apply_filters( 'p2p_connectable_args', $extra_qv, $this, $item->get_object() );
    $qv['p2p:exclude'] = $this->get_non_connectable( $item, $qv );

    That worked.. but why is the get_non_connectable limited by the pager size in the first place?

    http://wordpress.org/extend/plugins/posts-to-posts/

  2. ruud@joyo
    Member
    Posted 1 year ago #

    The file I swapped these lines in is directed-type.php

  3. scribu
    Member
    Plugin Author

    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic