AnsPress_Admin::get_pages( array $pages, array $r )

Description #

Remove AnsPress base page from front page page select input.

Parameters #

  • $pages
    array (Required) Page array.
  • $r
    array (Required) Arguments.

Source #

File: admin/anspress-admin.php

	public static function get_pages( $pages, $r ) {
		if ( isset( $r['name'] ) && 'page_on_front' === $r['name'] ) {
			foreach ( (array) $pages as $k => $page ) {
				if ( ap_opt( 'base_page' ) == $page->ID ) { // phpcs:disable Universal.Operators.StrictComparisons.LooseEqual
					unset( $pages[ $k ] );
				}
			}
		}

		return $pages;
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment