diff --git a/includes/admin/core/packages/2.0-beta1/email_templates.php b/includes/admin/core/packages/2.0-beta1/email_templates.php index fa046e5e..b8f71e26 100644 --- a/includes/admin/core/packages/2.0-beta1/email_templates.php +++ b/includes/admin/core/packages/2.0-beta1/email_templates.php @@ -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>||/' , '', 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 );*/ \ No newline at end of file +} \ No newline at end of file diff --git a/includes/class-init.php b/includes/class-init.php index 902f6c86..1de8286a 100644 --- a/includes/class-init.php +++ b/includes/class-init.php @@ -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; diff --git a/includes/core/class-roles-capabilities.php b/includes/core/class-roles-capabilities.php index 45ada50b..adc9c2a8 100644 --- a/includes/core/class-roles-capabilities.php +++ b/includes/core/class-roles-capabilities.php @@ -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; } diff --git a/includes/lib/array2xml.php b/includes/lib/array2xml.php index 28634ba5..0dd64022 100644 --- a/includes/lib/array2xml.php +++ b/includes/lib/array2xml.php @@ -1,7 +1,4 @@ - +} \ No newline at end of file diff --git a/includes/lib/browser.php b/includes/lib/browser.php index 43794210..9a0dd377 100644 --- a/includes/lib/browser.php +++ b/includes/lib/browser.php @@ -1,7 +1,4 @@ -