Plugin Directory

Changeset 1946963


Ignore:
Timestamp:
09/25/2018 07:24:55 PM (8 years ago)
Author:
brandbrilliance
Message:

Replaced create_function in Settings API library with anonymous function

Location:
post-state-tags
Files:
3 edited
2 copied

Legend:

Unmodified
Added
Removed
  • post-state-tags/tags/2.0.3/libraries/class.settings-api.php

    r1938861 r1946963  
    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                                $desc = $section['desc'];
     109                                $callback = function() use ($desc) {
     110                                    echo $desc;
     111                                }; // semi-colon because this is a captured function
     112
    109113            } else if ( isset( $section['callback'] ) ) {
    110114                $callback = $section['callback'];
  • post-state-tags/tags/2.0.3/readme.txt

    r1941756 r1946963  
    55Requires at least: 3.8
    66Tested up to: 4.9.8
    7 Stable tag: 2.0.2
     7Stable tag: 2.0.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9898== Changelog ==
    9999
     100= 2.0.3 =
     101* Replaced create_function in Settings API library with anonymous function
     102
    100103= 2.0.2 =
    101104* Fixed a bug in the migration check for install and version
  • post-state-tags/trunk/libraries/class.settings-api.php

    r1938863 r1946963  
    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                                $desc = $section['desc'];
     109                                $callback = function() use ($desc) {
     110                                    echo $desc;
     111                                }; // semi-colon because this is a captured function
     112
    109113            } else if ( isset( $section['callback'] ) ) {
    110114                $callback = $section['callback'];
  • post-state-tags/trunk/readme.txt

    r1941756 r1946963  
    55Requires at least: 3.8
    66Tested up to: 4.9.8
    7 Stable tag: 2.0.2
     7Stable tag: 2.0.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9898== Changelog ==
    9999
     100= 2.0.3 =
     101* Replaced create_function in Settings API library with anonymous function
     102
    100103= 2.0.2 =
    101104* Fixed a bug in the migration check for install and version
Note: See TracChangeset for help on using the changeset viewer.