Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
textimage-3242117
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
textimage-3242117
Commits
00b0a272
Commit
00b0a272
authored
11 years ago
by
mondrake
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2164599
by mondrake | sigalasgeo: Allow usage of Textimage tokens in Metatag.
parent
1a8ab7b5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.txt
+6
-0
6 additions, 0 deletions
README.txt
textimage.module
+18
-0
18 additions, 0 deletions
textimage.module
with
24 additions
and
0 deletions
README.txt
+
6
−
0
View file @
00b0a272
...
...
@@ -66,6 +66,7 @@ Features
* Field display formatters for Text and Image fields.
* Textimage API to generate Textimage images programmatically.
* Textimage tokens to retrieve URI/URL of generated Textimage images.
* Integrates with Metatag to use Textimage tokens in meta tags.
Requirements
...
...
@@ -82,6 +83,8 @@ Recommended modules, for a feature rich set:
- Jquery Colorpicker (7.x-1.0-rc1 or later)
- Token (7.x-1.5 or later)
Integration with modules:
- Metatag (7.x-1.0-beta8 or later)
Installation instructions (long version)
----------------------------------------
...
...
@@ -411,6 +414,9 @@ where:
field); if not specified, a comma-delimited string of all the URLs/URIs
generated will be returned.
Textimage tokens can be used with the Metatag module to specify e.g. URL
meta tags.
-------------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
textimage.module
+
18
−
0
View file @
00b0a272
...
...
@@ -284,6 +284,24 @@ function textimage_tokens($type, $tokens, array $data = array(), array $options
return
$replacements
;
}
/**
* Implements hook_metatag_token_types_alter().
*
* Integration of Textimage tokens with the Metatag module.
*/
function
textimage_metatag_token_types_alter
(
&
$options
)
{
// Add Textimage tokens to the token types managed by Metatag,
// for the node context.
if
(
$options
[
'context'
]
==
'node'
)
{
if
(
!
isset
(
$options
[
'token types'
]))
{
$options
[
'token types'
]
=
array
();
}
if
(
!
in_array
(
'textimage'
,
$options
[
'token types'
]))
{
$options
[
'token types'
][]
=
'textimage'
;
}
}
}
// There is not a way to specify a file in hook_image_effect_info.
// Effects .inc files are included here for the time being.
require_once
'effects/textimage_background.inc'
;
...
...
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