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:
@@ -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