Skip to content

Commit 243544e

Browse files
authoredMay 1, 2018
Merge pull request #100 from ahmedofali/master
Add php 7.2 support and Remove Deprecated function notice
2 parents fea871b + a2ceec2 commit 243544e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/class.settings-api.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ function admin_init() {
105105

106106
if ( isset($section['desc']) && !empty($section['desc']) ) {
107107
$section['desc'] = '<div class="inside">' . $section['desc'] . '</div>';
108-
$callback = create_function('', 'echo "' . str_replace( '"', '\"', $section['desc'] ) . '";');
108+
$callback = function() use ( $section ) {
109+
echo str_replace( '"', '\"', $section['desc'] );
110+
};
109111
} else if ( isset( $section['callback'] ) ) {
110112
$callback = $section['callback'];
111113
} else {

0 commit comments

Comments
 (0)
Please sign in to comment.