From: Steve Sutton Date: Wed, 20 Dec 2017 19:39:16 +0000 (-0500) Subject: Renaming stuff X-Git-Tag: v1.0.6^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=2da1bd4d3765308cdd474906d650387c15c99f08;p=WP-Themes%2FAdelaineConstruction.git Renaming stuff Renaming stuff in the new function. --- diff --git a/functions.php b/functions.php index 5634d44..3b19e1b 100644 --- a/functions.php +++ b/functions.php @@ -98,27 +98,24 @@ add_filter('pre_get_posts','SearchFilter'); function glm_get_notvisable_page_ids() { - static $publishPageIds = array(); - //return implode( ',', $publishPageIds ); - if ( empty( $publishPageIds ) ) { + static $badPageIds = array(); + if ( empty( $badPageIds ) ) { // Find all pages marked published - $publishedPages = get_pages( + $notPublishedPages = get_pages( array( 'post_type' => 'page', 'post_status' => 'publish', ) ); - if ( $publishedPages ) { - foreach ( $publishedPages as $page ) { + if ( $notPublishedPages ) { + foreach ( $notPublishedPages as $page ) { if ( $page->post_password ) { - $publishPageIds[] = $page->ID; + $badPageIds[] = $page->ID; } } } - return implode( ',', $publishPageIds ); - } else { - return ''; } + return implode( ',', $badPageIds ); } /**