Exclude Pages
Advanced Page Manager compatibility (3 posts)

  1. Uncategorized Creations
    Posted 3 years ago #


    I'd like to contact you to see if we may work something out regarding the following problem :


    It appears that Exclude Pages from Navigation uses a hook on the get_pages() function to strip any result returned. It doesn't hurt as long as you use get_pages in themes. However, it may cause problems when you use it in admin as we do to display the page tree in APM.

    Thank you in advance.


  2. jrf
    Posted 3 years ago #

    Exclude Pages from Navigation should not affect the output of get_pages() on admin pages. It explicitly tries to avoid that and returns $pages unaltered if it detects it has been called from the admin site of WP.

    Have a look at the source if you like (round line 45):

    $bail_out = ( ( defined( 'WP_ADMIN' ) && WP_ADMIN == true ) || ( strpos( $_SERVER[ 'PHP_SELF' ], 'wp-admin' ) !== false ) );
    $bail_out = apply_filters( 'ep_admin_bail_out', $bail_out );
    if ( $bail_out ) return $pages;
  3. Uncategorized Creations
    Posted 3 years ago #

    Thx. Going to check that.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Exclude Pages
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic