Display forms only on default post types

[MAILPOET-2639]
This commit is contained in:
Pavel Dohnal
2020-01-29 16:04:18 +01:00
committed by Jack Kitterhing
parent bdfd488ae4
commit fd1e8ee915
3 changed files with 31 additions and 8 deletions

View File

@@ -232,6 +232,10 @@ class Functions {
return get_post_types($args, $output, $operator);
}
public function getPostType($post = null) {
return get_post_type($post);
}
public function getPosts(array $args = null) {
return get_posts($args);
}
@@ -590,6 +594,14 @@ class Functions {
return is_page($page);
}
/**
* @param string|array $postTypes Optional. Post type or array of post types. Default empty.
* @return bool Whether the query is for an existing single post of any of the given post types.
*/
public function isSingular($postTypes = ''): bool {
return is_singular($postTypes);
}
/**
* @param string $package
* @param array $args