You are here

function _blogapi_get_node_types in Blog API 7

2 calls to _blogapi_get_node_types()
blogapi_blogger_get_users_blogs in ./blogapi.module
Blogging API callback. Finds the URL of a user's blog.
_blogapi_validate_blogid in ./blogapi.module
Validate blog ID, which maps to a content type in Drupal.

File

./blogapi.module, line 1019
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' => 'blog',
  ))));
  $types = array();
  foreach (node_type_get_types() as $type => $name) {
    if (node_access('create', $type) && in_array($type, $available_types)) {
      $types[] = $type;
    }
  }
  return $types;
}