diff --git a/lib/WP/Functions.php b/lib/WP/Functions.php index b8740bc896..3e4be5759a 100644 --- a/lib/WP/Functions.php +++ b/lib/WP/Functions.php @@ -574,6 +574,22 @@ class Functions { return plugins_api($action, $args); } + /** + * @param int|string|array $post Optional. Post ID, title, slug, or array of such. Default empty. + * @return bool Whether the query is for an existing single post. + */ + public function isSingle($post = '') { + return is_single($post); + } + + /** + * @param int|string|array $page Optional. Page ID, title, slug, or array of such. Default empty. + * @return bool Whether the query is for an existing single page. + */ + public function isPage($page = '') { + return is_page($page); + } + /** * @param string $package * @param array $args