Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
yotpo-3483885
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
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
yotpo-3483885
Commits
52e315ca
Commit
52e315ca
authored
7 years ago
by
Christian Stück
Browse files
Options
Downloads
Patches
Plain Diff
Corrected variable integration.
parent
103edaf5
No related branches found
Branches containing commit
Tags
7.x-1.0-beta3
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
yotpo.module
+4
-4
4 additions, 4 deletions
yotpo.module
yotpo.variable.inc
+38
-0
38 additions, 0 deletions
yotpo.variable.inc
with
42 additions
and
4 deletions
yotpo.module
+
4
−
4
View file @
52e315ca
...
...
@@ -9,13 +9,13 @@
* Implements hook_menu().
*/
function
yotpo_menu
()
{
$items
=
array
();
$items
[
'admin/config/services/yotpo'
]
=
array
(
'title'
=>
'Yotpo'
,
'description'
=>
'Configure settings associated with Yotpo.'
,
'page callback'
=>
'drupal_get_form'
,
'page arguments'
=>
array
(
'
yotpo_admin_settings
_form'
,
NULL
),
'page arguments'
=>
array
(
'
variable_group
_form'
,
'yotpo'
),
'access arguments'
=>
array
(
'administer site configuration'
),
'file'
=>
'yotpo.admin.inc'
,
);
return
$items
;
}
...
...
@@ -78,8 +78,8 @@ function yotpo_load() {
*/
function
yotpo_get_instance
()
{
if
(
yotpo_load
())
{
$id
=
variable_get
(
'commerce_yotpo_id'
);
$secret
=
variable_get
(
'commerce_yotpo_secret'
);
$id
=
variable_get
(
'commerce_yotpo_
api_
id'
);
$secret
=
variable_get
(
'commerce_yotpo_
api_
secret'
);
$yotpo
=
new
Yotpo
(
$id
,
$secret
);
return
$yotpo
;
}
...
...
This diff is collapsed.
Click to expand it.
yotpo.variable.inc
0 → 100644
+
38
−
0
View file @
52e315ca
<?php
/**
* @file
* Variable integration for the yotpo module.
*/
function
yotpo_variable_group_info
()
{
$groups
[
'yotpo'
]
=
array
(
'title'
=>
t
(
'Yotpo settings'
),
'description'
=>
t
(
'Yotpo settings (API credentials)'
),
'access'
=>
'administer site configuration'
,
'path'
=>
array
(
'admin/config/services/yotpo'
),
);
return
$groups
;
}
/**
* Implements hook_variable_info().
*/
function
yotpo_variable_info
(
$options
)
{
$variable
[
'commerce_yotpo_api_id'
]
=
array
(
'title'
=>
t
(
'Yotpo API ID'
,
array
(),
$options
),
'description'
=>
t
(
'Your Yotpo API ID.'
,
array
(),
$options
),
'type'
=>
'string'
,
'default'
=>
t
(
''
,
array
(),
$options
),
);
$variable
[
'commerce_yotpo_api_secret'
]
=
array
(
'title'
=>
t
(
'Yotpo API Secret'
,
array
(),
$options
),
'description'
=>
t
(
'Your Yotpo API Secret.'
,
array
(),
$options
),
'type'
=>
'string'
,
'default'
=>
t
(
''
,
array
(),
$options
),
);
return
$variable
;
}
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