If a content_type plugin is defined without subtype, the subtype is automatically created, but the $subtype is not populated with all property.

  • title
  • description
  • icon
  • category
  • path

The remaining properties inherited dynamically.

<?php
if (!empty($subtype['edit form'])) {
 
_ctools_content_create_form_info($form_info, $subtype['edit form'], $subtype, $subtype, $op);
}
else if (!empty(
$plugin['edit form'])) {
 
_ctools_content_create_form_info($form_info, $plugin['edit form'], $plugin, $subtype, $op);
}
?>

First time try to read the property from the $subtype, if it is empty then read the same property from the $plugin.
But the ctools_content_editable() works differently. It is only attempt to read the check editable property from the $subtype
<?php
function ctools_content_editable($type, $subtype, $conf) {
  if (empty(
$type['edit form']) && empty($subtype['edit form'])) {
    return
FALSE;
  }
  if (
$function = ctools_plugin_get_function($subtype, 'check editable')) {
    return
$function($type, $subtype, $conf);
  }
  return
TRUE;
}
?>
Files: 
CommentFileSizeAuthor
#1 ctools-2036415.patch567 bytesSweetchuck
PASSED: [[SimpleTest]]: [MySQL] 121 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new567 bytes
PASSED: [[SimpleTest]]: [MySQL] 121 pass(es).
[ View ]