Same name and namespace in other branches
- 4.6.x modules/blogapi.module \_blogapi_get_node_types()
- 4.7.x modules/blogapi.module \_blogapi_get_node_types()
- 5.x modules/blogapi/blogapi.module \_blogapi_get_node_types()
2 calls to _blogapi_get_node_types()
- blogapi_blogger_get_users_blogs in modules/
blogapi/ blogapi.module - Blogging API callback. Finds the URL of a user's blog.
- _blogapi_validate_blogid in modules/
blogapi/ blogapi.module - Validate blog ID, which maps to a content type in Drupal.
File
- modules/
blogapi/ blogapi.module, line 935 - Enable users to post using applications that support XML-RPC blog APIs.
Code
function _blogapi_get_node_types() {
$available_types = array_keys(array_filter(variable_get('blogapi_node_types', array(
'blog' => 1,
))));
$types = array();
foreach (node_get_types() as $type => $name) {
if (node_access('create', $type) && in_array($type, $available_types)) {
$types[] = $type;
}
}
return $types;
}