Plugin Directory

Changeset 1313189


Ignore:
Timestamp:
12/21/2015 05:50:17 AM (10 years ago)
Author:
3UU
Message:

fix anonymous function request for PHP < version 5.3

Location:
shariff/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • shariff/trunk/admin/admin_menu.php

    r1312748 r1313189  
    418418        echo '<p>Custom Post Types:</p>';
    419419    };
    420     array_walk( $post_types, function ( $cpt ) {
    421         $object = get_post_type_object( $cpt );
     420
     421    foreach ( $post_types as $post_type ) {
     422        $object = get_post_type_object( $post_type );
    422423        printf(
    423424            '<p><input type="checkbox" name="shariff3UU_basic[add_after][%s]" %s value="1">%s</p>',
    424             $cpt,
    425             isset( $GLOBALS['shariff3UU_basic']['add_after'][$cpt] ) ? checked( $GLOBALS['shariff3UU_basic']['add_after'][$cpt], 1, 0 ) : '',
     425            $post_type,
     426            isset( $GLOBALS['shariff3UU_basic']['add_after'][$post_type] ) ? checked( $GLOBALS['shariff3UU_basic']['add_after'][$post_type], 1, 0 ) : '',
    426427            $object->labels->singular_name  // this should already be localized <- not always, but there is no way to know, so we have to accept the language mixup
    427428        );
    428     } );
     429    }
    429430}
    430431
  • shariff/trunk/readme.txt

    r1312748 r1313189  
    189189
    190190== Changelog ==
     191= 3.3.3 =
     192- fix anonymous function request for PHP < version 5.3
    191193
    192194= 3.3.2 =
Note: See TracChangeset for help on using the changeset viewer.