mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
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.
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user