_blogapi_get_node_types

5 blogapi.module _blogapi_get_node_types()
6 blogapi.module _blogapi_get_node_types()

2 calls to _blogapi_get_node_types()

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;
}
Login or register to post comments