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

  1. Ruud Laan
    Posted 3 years 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?


  2. Ruud Laan
    Posted 3 years ago #

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

  3. scribu
    Plugin Author

    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Posts 2 Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic