| Versionen | |
|---|---|
| drupal6 – drupal7 | _blogapi_validate_blogid($blogid) |
Validate blog ID, which maps to a content type in Drupal.
Only content types configured to work with Blog API are supported.
TRUE if the content type is supported and the user has permission to post, or a blogapi_error() XML construct otherwise.
modules/
<?php
function _blogapi_validate_blogid($blogid) {
$types = _blogapi_get_node_types();
if (in_array($blogid, $types, TRUE)) {
return TRUE;
}
return blogapi_error(t("Blog API module is not configured to support the %type content type, or you don't have sufficient permissions to post this type of content.", array('%type' => $blogid)));
}
?>
Kommentare
Kommentar hinzufügen