function schemaorg_ui_terms_merge in Schema.org 7
Add, update or remove a schema term from a set of terms.
2 calls to schemaorg_ui_terms_merge()
- schemaorg_ui_field_ui_field_edit_form_submit in modules/
schemaorg_ui/ schemaorg_ui.module - Submit function for edit field form.
- schemaorg_ui_node_type_form_submit in modules/
schemaorg_ui/ schemaorg_ui.module - Submit function for node type form.
File
- modules/
schemaorg_ui/ schemaorg_ui.module, line 221 - User interface for setting the schema.org mappings
Code
function schemaorg_ui_terms_merge($schema_term, $terms) {
// Strip out existing schema.org mappings.
if (empty($terms)) {
$terms = array();
}
$terms = array_filter($terms, 'schemaorg_ui_filter_schema_term');
if ($schema_term) {
// Place the schema term first for commodity so it appears first in the
// list of CURIEs in the HTML output.
array_unshift($terms, 'schema:' . $schema_term);
}
return $terms;
}