Skip to content

Commit

Permalink
Fix dynamic callback method detection
Browse files Browse the repository at this point in the history
  • Loading branch information
shadyvb committed Nov 20, 2023
1 parent ec96a02 commit ec1b752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/class-connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function unregister() {
*/
public function callback() {
$action = current_filter();
$callback = array( $this, 'callback_' . preg_replace( '/[^a-z0-9_\-]/', '_', $action ) );
$callback = array( $this, 'callback_' . preg_replace( '/[^a-z0-9_]/', '_', $action ) );

// For the sake of testing, trigger an action with the name of the callback.
if ( defined( 'WP_STREAM_TESTS' ) && WP_STREAM_TESTS ) {
Expand Down

0 comments on commit ec1b752

Please sign in to comment.