+function cx_posts_find_page_id($post_slug) {
+ $sql = 'SELECT
+ post_id
+ FROM posts
+ WHERE post_slug == ?
+ AND post_is_page == TRUE
+ AND post_is_draft == FALSE
+ LIMIT 1;';
+
+ foreach (cx_db_query($sql, $post_slug) as $post) {
+ return $post['post_id'];
+ }
+
+ return null;
+}
+
+function cx_pages_get(bool $include_drafts = false) {