Skip to content

Commit 08de1f9

Browse files
committed
Added extra check for the existance of the function name with callbacks. Some themes are not doing it right and crashing WordPress.
1 parent 8441fd0 commit 08de1f9

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Fixed: jQuery deprecation notices in `typography` JavaScript.
77
* Fixed: Error in connection banner on first-time activation.
88
* Fixed: Missing redux-banner-admin.min.js file.
9+
* Fixed: Added extra check for the existance of the function name with callbacks. Some themes are not doing it right and crashing WordPress.
910

1011
## 4.4.3
1112
* Fixed: Typo in JavaScript enqueue handle broke `typography` and `slider` fields.

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ NOTE: Redux is not intended to be used on its own. It requires a config file pro
120120
* Fixed: jQuery deprecation notices in `typography` JavaScript.
121121
* Fixed: Error in connection banner on first-time activation.
122122
* Fixed: Missing redux-banner-admin.min.js file.
123+
* Fixed: Added extra check for the existance of the function name with callbacks. Some themes are not doing it right and crashing WordPress.
123124

124125
= 4.4.3 =
125126
* Fixed: Typo in JavaScript enqueue handle broke `typography` and `slider` fields.

redux-core/inc/classes/class-redux-wordpress-data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ private function get_data( string $type, $args, $current_value ) {
466466
break;
467467

468468
case 'callback':
469-
if ( ! empty( $args ) ) {
469+
if ( ! empty( $args ) && function_exists( $args ) ) {
470470
$data = call_user_func( $args, $current_value );
471471
}
472472

0 commit comments

Comments
 (0)