Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3495499
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3495499
Commits
c1901375
Commit
c1901375
authored
15 years ago
by
Neil Drumm
Browse files
Options
Downloads
Patches
Plain Diff
Docs by dww
parent
c0739dfb
No related branches found
Branches containing commit
Tags
9.2.7
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/taxonomy/taxonomy.module
+29
-0
29 additions, 0 deletions
modules/taxonomy/taxonomy.module
with
29 additions
and
0 deletions
modules/taxonomy/taxonomy.module
+
29
−
0
View file @
c1901375
...
...
@@ -1178,6 +1178,35 @@ function taxonomy_get_term($tid) {
return
$terms
[
$tid
];
}
/**
* Create a select form element for a given taxonomy vocabulary.
*
* NOTE: This function expects input that has already been sanitized and is
* safe for display. Callers must properly sanitize the $title and
* $description arguments to prevent XSS vulnerabilities.
*
* @param $title
* The title of the vocabulary. This MUST be sanitized by the caller.
* @param $name
* Ignored.
* @param $value
* The currently selected terms from this vocabulary, if any.
* @param $vocabulary_id
* The vocabulary ID to build the form element for.
* @param $description
* Help text for the form element. This MUST be sanitized by the caller.
* @param $multiple
* Boolean to control if the form should use a single or multiple select.
* @param $blank
* Optional form choice to use when no value has been selected.
* @param $exclude
* Optional array of term ids to exclude in the selector.
* @return
* A FAPI form array to select terms from the given vocabulary.
*
* @see taxonomy_form()
* @see taxonomy_form_term()
*/
function
_taxonomy_term_select
(
$title
,
$name
,
$value
,
$vocabulary_id
,
$description
,
$multiple
,
$blank
,
$exclude
=
array
())
{
$tree
=
taxonomy_get_tree
(
$vocabulary_id
);
$options
=
array
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment