function get_all_page_ids() { global $wpdb;
$page_ids =
wp_cache_get( 'all_page_ids', 'posts'
);
if ( !
is_array( $page_ids ) ) { $page_ids =
$wpdb->
get_col( "SELECT ID FROM
$wpdb->posts WHERE post_type = 'page'"
);
wp_cache_add( 'all_page_ids',
$page_ids, 'posts'
);
} return $page_ids;
}/**
* Retrieves page data given a page ID or page object.
*
* Use get_post() instead of get_page().
*
* @since 1.5.1
* @deprecated 3.5.0 Use get_post()
*
* @param int|WP_Post $page Page object or page ID. Passed by reference.
* @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which
* correspond to a WP_Post object, an associative array, or a numeric array,
* respectively. Default OBJECT.
* @param string $filter Optional. How the return value should be filtered. Accepts 'raw',
* 'edit', 'db', 'display'. Default 'raw'.
* @return WP_Post|array|null WP_Post or array on success, null on failure.
*/