-
-
Save hellofromtonya/a0984025934a5122ccfdbc6345fb8cae to your computer and use it in GitHub Desktop.
Original Beans v1.4.0 beans_replace_action() and beans_replace_action_hook() have a bug.
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 | |
function beans_replace_action( $id, $hook = null, $callback = null, $priority = null, $args = null ) { | |
$action = array( | |
'hook' => $hook, | |
'callback' => $callback, | |
'priority' => $priority, | |
'args' => $args, | |
); | |
// Set and get the latest replaced. | |
$action = _beans_merge_action( $id, array_filter( $action ), 'replaced' ); | |
// Set and get the latest added. | |
$action = _beans_merge_action( $id, $action, 'added' ); | |
return beans_modify_action( $id, $hook, $callback, $priority, $args ); | |
} | |
function beans_replace_action_hook( $id, $hook ) { | |
return beans_replace_action( $id, $hook ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment