Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function create_function() is deprecated since 7.2 #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion includes/media-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function file_gallery_options_init()
$translated_size = ucfirst($size);
}

add_settings_field("size_" . $size, $translated_size . $size_translated, create_function('', 'echo file_gallery_options_fields( array("name" => "' . $size . '", "type" => "intermediate_image_sizes", "disabled" => 0) );'), 'media', 'intermediate_image_sizes');
add_settings_field("size_" . $size, $translated_size . $size_translated, function() { echo file_gallery_options_fields( array("name" => "' . $size . '", "type" => "intermediate_image_sizes", "disabled" => 0) ); }, 'media', 'intermediate_image_sizes');

register_setting('media', $size . "_size_w");
register_setting('media', $size . "_size_h");
Expand Down
4 changes: 2 additions & 2 deletions includes/media-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ function file_gallery_media_tags_add_permalink_fields()

add_settings_field(
'media_tag_taxonomy_name', __('Media tags Taxonomy name', 'file-gallery'),
create_function('', 'file_gallery_media_tags_permalink_fields("media_tag_taxonomy_name");'),
function() { file_gallery_media_tags_permalink_fields("media_tag_taxonomy_name"); },
'permalink', 'optional');

if( ! (isset($mediatags) && is_a($mediatags, 'MediaTags') && defined('MEDIA_TAGS_TAXONOMY')) )
{
add_settings_field(
'media_tag_taxonomy_slug', __('Media tags URL slug', 'file-gallery'),
create_function('', 'file_gallery_media_tags_permalink_fields("media_tag_taxonomy_slug");'),
function() { file_gallery_media_tags_permalink_fields("media_tag_taxonomy_slug"); },
'permalink', 'optional');
}
}
Expand Down