Last active
March 21, 2018 17:09
-
-
Save lloc/2134a8da5107bf48e81999821e7835ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Sort an array of objects by name | |
usort( $arr, function ( $a, $b ) { | |
return strcmp( $a->name, $b->name ); | |
} ); | |
function callback_function_name() { | |
// do something | |
} | |
add_action( 'action_name', 'callback_function_name' ); | |
add_action( 'action_name', function() { | |
// do something | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment