This repository was archived by the owner on Dec 2, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -457,9 +457,10 @@ public function admin_init() {
457457 *
458458 * @return bool
459459 */
460- public static function is_heartbeat () {
460+ public static function is_heartbeat (): bool {
461461 // Disregard WP AJAX 'heartbeat'call. Why waste resources?
462462 if ( isset ( $ _POST ) && isset ( $ _POST ['_nonce ' ] ) && wp_verify_nonce ( sanitize_key ( wp_unslash ( $ _POST ['_nonce ' ] ) ), 'heartbeat-nonce ' ) ) {
463+
463464 if ( isset ( $ _POST ['action ' ] ) && 'heartbeat ' === sanitize_text_field ( wp_unslash ( $ _POST ['action ' ] ) ) ) {
464465
465466 // Hook, for purists.
Original file line number Diff line number Diff line change @@ -408,11 +408,13 @@ public function __wakeup() {
408408 * @param array $args Class constructor arguments.
409409 */
410410 public function __construct ( $ sections = array (), $ args = array () ) {
411+ global $ pagenow ;
412+
411413 if ( Redux_Core::is_heartbeat () ) {
412- exit ;
414+ return ;
413415 }
414416
415- if ( empty ( $ args ) || ! isset ( $ args ['opt_name ' ] ) || ( isset ( $ args ['opt_name ' ] ) && empty ( $ args ['opt_name ' ] ) ) ) {
417+ if ( ' wp-cron.php ' === $ pagenow || empty ( $ args ) || ! isset ( $ args ['opt_name ' ] ) || ( isset ( $ args ['opt_name ' ] ) && empty ( $ args ['opt_name ' ] ) ) ) {
416418 return ;
417419 }
418420
You can’t perform that action at this time.
0 commit comments