Merge branch 'development/2.8.x' into feature/wp_admin_settings

This commit is contained in:
Mykyta Synelnikov
2024-01-18 15:05:04 +02:00
committed by GitHub
52 changed files with 830 additions and 482 deletions
+3 -3
View File
@@ -3517,13 +3517,13 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
*
* @return array
*/
function save_email_templates( $settings ) {
public function save_email_templates( $settings ) {
if ( empty( $settings['um_email_template'] ) ) {
return $settings;
}
$template = $settings['um_email_template'];
$content = wp_kses_post( stripslashes( $settings[ $template ] ) );
$content = wp_kses( stripslashes( $settings[ $template ] ), 'post', array( 'data' ) );
$theme_template_path = UM()->mail()->get_template_file( 'theme', $template );
if ( ! file_exists( $theme_template_path ) ) {
@@ -3531,7 +3531,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
}
if ( file_exists( $theme_template_path ) ) {
$fp = fopen( $theme_template_path, "w" );
$fp = fopen( $theme_template_path, "w" );
$result = fputs( $fp, $content );
fclose( $fp );
}