From 467cbaced87e1414bd971fabf4206f2c63b05c59 Mon Sep 17 00:00:00 2001 From: Oscar Nunez Date: Sun, 5 Jun 2016 18:35:01 -0400 Subject: [PATCH] changing the deprecated ereg() function to preg_match() --- services.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services.php b/services.php index 8f6b9c0..93ebfc5 100644 --- a/services.php +++ b/services.php @@ -10,7 +10,7 @@ function hookpress_ajax_get_fields() { $fields = array(); if (is_array($args)) { foreach ($args as $arg) { - if (ereg('[A-Z]+',$arg)) + if (preg_match('/[A-Z]+/',$arg)) $fields = array_merge($fields,hookpress_get_fields($arg)); else $fields[] = $arg; @@ -76,7 +76,7 @@ function hookpress_ajax_set_enabled() { $id = $_POST['id']; $enabled = $_POST['enabled']; - $nonce_compare = ($enabled == 'true'?'activate-webhook-' . $id:'deactivate-webhook-' . $id ); + $nonce_compare = ($enabled == 'true'?'activate-webhook-' . $id:'deactivate-webhook-' . $id ); if ( wp_verify_nonce( $nonce, $nonce_compare ) ) :