• Resolved Pixelbart

    (@pixelbart)


    First of all, thank you for the useful plugin!

    We are currently building our documentation with it. Our editors have put unfinished entries as “Private” and can no longer see them. Then I looked in the code and saw that post_status is fixed, but not changeable via filter or similar.

    So I would like to see a filter set to all get_pages for the arguments so you can manipulate them as a developer.

    As an example:

    includes/Ajax.php:135

    $args = apply_filters('wedocs/ajax/get_docs', [
      'post_type' => 'docs',
      'post_status' => [ 'publish', 'draft', 'pending' ],
      'posts_per_page' => '-1',
      'orderby' => 'menu_order',
      'order' => 'ASC'
    ]);
    
    $docs = get_pages($args);

    This way anyone can change the arguments without updates breaking their own changes.

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filters for the arguments of the get_pages etc.’ is closed to new replies.