Skip to content

Commit

Permalink
Remove anonymous function in init hook, replace with named function…
Browse files Browse the repository at this point in the history
… for PHP 5.2 support

Fixes #1
  • Loading branch information
nickdaugherty committed Sep 23, 2013
1 parent e65270a commit 21320d0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions co-authors-plus-social-pack.php
Expand Up @@ -244,9 +244,11 @@ function sanitize_twitter( $twitter_username ) {

$coauthors_plus_social_pack;

// Must come in init, so Co Authors Plus is guaranteed to be already instantiated
add_action( 'init', function() {
function coauthors_plus_social_pack_init() {
global $coauthors_plus_social_pack;

$coauthors_plus_social_pack = new CoAuthors_Plus_Social_Pack();
} );
}

// Must come in init, so Co Authors Plus is guaranteed to be already instantiated
add_action( 'init', 'coauthors_plus_social_pack_init' );

0 comments on commit 21320d0

Please sign in to comment.