Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
2a7bf62f
Commit
2a7bf62f
authored
Nov 03, 2012
by
Nathaniel Catchpole
Browse files
Issue
#1828924
by pfrenssen: Convert the Image Style Preview Image to CMI.
parent
a7ab8ebc
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/modules/image/config/image.settings.yml
0 → 100644
View file @
2a7bf62f
preview_image
:
core/modules/image/sample.png
core/modules/image/image.admin.inc
View file @
2a7bf62f
...
...
@@ -697,7 +697,7 @@ function theme_image_style_effects($variables) {
function
theme_image_style_preview
(
$variables
)
{
$style
=
$variables
[
'style'
];
$sample_image
=
variable_get
(
'image_style_preview_image'
,
drupal_get_path
(
'module'
,
'image'
)
.
'/sample.png
'
);
$sample_image
=
config
(
'image.settings'
)
->
get
(
'preview_image
'
);
$sample_width
=
160
;
$sample_height
=
160
;
...
...
core/modules/image/image.install
View file @
2a7bf62f
...
...
@@ -167,3 +167,14 @@ function image_update_8001() {
db_drop_table
(
'image_styles'
);
db_drop_table
(
'image_effects'
);
}
/**
* Moves image module settings from variable to config.
*
* @ingroup config_upgrade
*/
function
image_update_8002
()
{
update_variables_to_config
(
'image.settings'
,
array
(
'image_style_preview_image'
=>
'preview_image'
,
));
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment