From de3355e0596243f408d8a15cf7bbeb284af541e6 Mon Sep 17 00:00:00 2001 From: nikitozzzzzzz Date: Thu, 14 Sep 2017 17:39:26 +0300 Subject: [PATCH] - fixed activation at multisite (issue #319); - small notices fixes; --- includes/admin/core/class-admin-forms.php | 2 +- includes/core/class-permalinks.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/admin/core/class-admin-forms.php b/includes/admin/core/class-admin-forms.php index a586d023..cc475ff7 100644 --- a/includes/admin/core/class-admin-forms.php +++ b/includes/admin/core/class-admin-forms.php @@ -585,7 +585,7 @@ if ( ! class_exists( 'Admin_Forms' ) ) { $name_attr = ' name="' . $name . '" '; $default = isset( $field_data['default'] ) ? $field_data['default'] : ''; - $value = ( '' !== $field_data['value'] ) ? $field_data['value'] : $default; + $value = ( isset( $field_data['value'] ) && '' !== $field_data['value'] ) ? $field_data['value'] : $default; /*$value = isset( $field_data['value'] ) ? $field_data['value'] : $default; $value = ! empty( $field_data['value'] ) ? $field_data['value'] : 0; */ diff --git a/includes/core/class-permalinks.php b/includes/core/class-permalinks.php index 04c3651d..a17547cf 100644 --- a/includes/core/class-permalinks.php +++ b/includes/core/class-permalinks.php @@ -72,8 +72,6 @@ if ( ! class_exists( 'Permalinks' ) ) { *** @Get current URL anywhere ***/ function get_current_url( $no_query_params = false ) { - global $post; - $um_get_option = get_option('um_options'); $server_name_method = isset( $um_get_option['current_url_method'] ) ? $um_get_option['current_url_method'] : 'SERVER_NAME'; @@ -94,7 +92,7 @@ if ( ! class_exists( 'Permalinks' ) ) { } } else {*/ - $network_permalink_structure = um_get_option("network_permalink_structure"); + $network_permalink_structure = UM()->um_get_option("network_permalink_structure"); if( $network_permalink_structure == "sub-directory" ){