get_all_page_ids()
最后更新于:2021-11-26 04:13:15
get_all_page_ids()Get a list of page IDs.
响应
(string[]) List of page IDs as strings.
源文件
文件: gc-includes/post.php
function get_all_page_ids() {
global $gcdb;
$page_ids = gc_cache_get( 'all_page_ids', 'posts' );
if ( ! is_array( $page_ids ) ) {
$page_ids = $gcdb->get_col( "SELECT ID FROM $gcdb->posts WHERE post_type = 'page'" );
gc_cache_add( 'all_page_ids', $page_ids, 'posts' );
}
return $page_ids;
}