mirror of
https://github.com/felixfoertsch/wordpress-dev-env.git
synced 2026-04-18 15:28:44 +02:00
Initial commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Debug Bar Shortcodes - is_closure test.
|
||||
*
|
||||
* @package WordPress\Plugins\Debug Bar Shortcodes
|
||||
* @author Juliette Reinders Folmer <wpplugins_nospam@adviesenzo.nl>
|
||||
* @link https://github.com/jrfnl/Debug-Bar-Shortcodes
|
||||
* @since 1.0
|
||||
*
|
||||
* @copyright 2013-2016 Juliette Reinders Folmer
|
||||
* @license http://creativecommons.org/licenses/GPL/2.0/ GNU General Public License, version 2 or higher
|
||||
*/
|
||||
|
||||
if ( ! function_exists( 'debug_bar_shortcodes_is_closure' ) ) {
|
||||
/**
|
||||
* Check if a callback is a closure.
|
||||
*
|
||||
* @param mixed $arg Function name.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function debug_bar_shortcodes_is_closure( $arg ) {
|
||||
$test = function() {
|
||||
};
|
||||
$is_closure = ( $arg instanceof $test );
|
||||
return $is_closure;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user