Skip to content
Browse files

Remove anonymous function in `init` hook, replace with named function…

… for PHP 5.2 support

Fixes #1
  • Loading branch information...
1 parent e65270a commit 21320d02d8864805d6d557ba1447ac2aa5471831 @nickdaugherty nickdaugherty committed Sep 23, 2013
Showing with 5 additions and 3 deletions.
  1. +5 −3 co-authors-plus-social-pack.php
View
8 co-authors-plus-social-pack.php
@@ -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.
Something went wrong with that request. Please try again.