justafish / drupal_createapi

https://drupal.org/project/createapi
3 stars 9 forks source link

Don't disallow unpublished nodes from ever being part of data. #4

Open vordude opened 11 years ago

vordude commented 11 years ago

It's quite the leap to never allow unpublished nodes.

function _createapi__helper__process_content_type(...) {
  $query = new EntityFieldQuery();
  $query->entityCondition('entity_type', 'node')
    ->entityCondition('bundle', $content_type)
    ->propertyCondition('status', 1)

I do realize that it's required to start somewhere when making assumptions about the data users will want to create.

Any chance you'd be open to change this perspective? This makes a very sane default default behavior. I could see the above function allowing an override from in an individual's implementation of hook_createapi_content_types().

(I'm willing to do it, but won't bother if you don't care in the first place)

justafish commented 10 years ago

Sure! PRs welcome :)