From 88607b854b5203088e350a4cee1508bab201749a Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Fri, 7 Nov 2025 14:18:38 +0200 Subject: [PATCH] Update dependencies and enhance emotize method Bumps required plugin version dependencies for compatibility. Refactors the `emotize` method by adding a `$stripslashes` parameter to provide optional handling of string slashes, improving flexibility and functionality. --- includes/class-dependencies.php | 8 ++++---- includes/core/class-shortcodes.php | 11 ++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/includes/class-dependencies.php b/includes/class-dependencies.php index 208a43c3..50c41c15 100644 --- a/includes/class-dependencies.php +++ b/includes/class-dependencies.php @@ -31,23 +31,23 @@ if ( ! class_exists( 'um\Dependencies' ) ) { */ public $ext_required_version = array( 'bbpress' => '2.0.7', - 'followers' => '2.1.6', + 'followers' => '2.3.5', 'forumwp' => '2.1.5', - 'friends' => '2.1.4', + 'friends' => '2.3.4', 'groups' => '2.4.2', 'jobboardwp' => '1.0.7', 'mailchimp' => '2.6.2', 'messaging' => '2.2.5', 'mycred' => '2.2.4', 'notices' => '2.0.5', - 'notifications' => '2.1.3', + 'notifications' => '2.3.8', 'online' => '2.1.1', 'private-content' => '2.0.5', 'profile-completeness' => '2.2.7', 'profile-tabs' => '1.0.0', 'recaptcha' => '2.3.4', 'reviews' => '2.1.5', - 'social-activity' => '2.2.0', + 'social-activity' => '2.4.0', 'social-login' => '2.2.0', 'stripe' => '1.0.0', 'zapier' => '1.0.0', diff --git a/includes/core/class-shortcodes.php b/includes/core/class-shortcodes.php index c3104b1a..4b73767d 100644 --- a/includes/core/class-shortcodes.php +++ b/includes/core/class-shortcodes.php @@ -217,16 +217,18 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) { return $args; } - /** * Emoji support * - * @param $content + * @param string $content + * @param bool $stripslashes * * @return mixed|string */ - function emotize( $content ) { - $content = stripslashes( $content ); + public function emotize( $content, $stripslashes = true ) { + if ( $stripslashes ) { + $content = stripslashes( $content ); + } foreach ( $this->emoji as $code => $val ) { $regex = str_replace( array( '(', ')' ), array( '\\' . '(', '\\' . ')' ), $code ); $content = preg_replace( @@ -238,7 +240,6 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) { return $content; } - /** * Remove wpautop filter for post content if it's UM core page */