- small code formatting changes;

This commit is contained in:
nikitozzzzzzz
2018-09-18 09:43:47 +03:00
parent edea022ddc
commit 75c2469bb2
5 changed files with 13 additions and 71 deletions
@@ -194,62 +194,4 @@ if ( is_multisite() ) {
restore_current_blog();
} else {
um_upgrade20beta1_email_templates_process();
}
/**
* Transferring email templates to new logic
*/
/*$templates_in_theme = 0;
$emails = UM()->config()->email_notifications;
foreach ( $emails as $email_key => $value ) {
$in_theme = um_upgrade20beta1_template_in_theme( $email_key, true );
$theme_template_path = um_upgrade20beta1_get_template_file( 'theme', $email_key );
if ( ! $in_theme ) {
//there isn't HTML email template's file in theme, get from option
//this value is correct for each multisite's subsites
$setting_value = UM()->options()->get( $email_key );
$html_email = UM()->options()->get( 'email_html' );
if ( $html_email ) {
if ( ! um_upgrade20beta1_copy_email_template( $email_key ) ) {
um_upgrade20beta1_insert_content( $theme_template_path, $setting_value );
} else {
$templates_in_theme++;
}
} else {
um_upgrade20beta1_insert_content( $theme_template_path, $setting_value );
}
} else {
//there is HTML email template in a theme's folder
$theme_template_path_html = um_upgrade20beta1_get_template_file( 'theme', $email_key, true );
$setting_value = preg_replace( '/<\/body>|<\/head>|<html>|<\/html>|<body.*?>|<head.*?>/' , '', file_get_contents( $theme_template_path_html ) );
if ( file_exists( $theme_template_path_html ) ) {
if ( copy( $theme_template_path_html, $theme_template_path ) ) {
um_upgrade20beta1_insert_content( $theme_template_path, $setting_value );
$templates_in_theme++;
}
}
}
}
$email_html = ( $templates_in_theme > 0 ) ? true : false;
UM()->options()->update( 'email_html', $email_html );*/
}
+4
View File
@@ -50,11 +50,15 @@ if ( ! class_exists( 'UM' ) ) {
/**
* @var bool Old variable
*
* @todo deprecate this variable
*/
public $is_filtering;
/**
* WP Native permalinks turned on?
*
* @var
*/
public $is_permalinks;
+4 -1
View File
@@ -532,8 +532,11 @@ if ( ! class_exists( 'um\core\Roles_Capabilities' ) ) {
foreach ( $role_data as $key=>$value ) {
if ( strpos( $key, '_um_' ) === 0 )
$key = str_replace( '_um_', '', $key );
$temp[$key] = $value;
$temp[ $key ] = $value;
}
$temp = apply_filters( 'um_change_role_data', $temp, $roleID );
return $temp;
}
+2 -6
View File
@@ -1,7 +1,4 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
<?php if ( ! defined( 'ABSPATH' ) ) exit;
class Array2XML {
@@ -132,5 +129,4 @@ class Array2XML {
$pattern = '/^[a-z_]+[a-z0-9\:\-\.\_]*[^:]*$/i';
return preg_match($pattern, $tag, $matches) && $matches[0] == $tag;
}
}
?>
}
+2 -5
View File
@@ -1,7 +1,4 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
<?php if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Modified to remove var
@@ -1100,4 +1097,4 @@ class Browser {
}
}
}
}