diff --git a/admin/admin.php b/admin/admin.php index 85c6e1c4..69db7fbf 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -406,7 +406,7 @@ function ptibogxiv_management_page() { 'name' => 'doliaccount', 'show_option_none' => __( '- Select -', 'doliconnect' ), 'option_none_value' => '0', - 'lang' => strtolower(str_replace("_", "-", get_locale())), + 'lang' => doliUserLang(wp_get_current_user(), 'slug'), 'selected' => get_option('doliaccount') ); wp_dropdown_pages($args); ?> @@ -426,7 +426,7 @@ function ptibogxiv_management_page() { 'name' => 'dolishop', 'show_option_none' => __( '- Select -', 'doliconnect' ), 'option_none_value' => '0', - 'lang' => strtolower(str_replace("_", "-", get_locale())), + 'lang' => doliUserLang(wp_get_current_user(), 'slug'), 'selected' => get_option('dolishop') ); wp_dropdown_pages($args); ?> @@ -469,7 +469,7 @@ function ptibogxiv_management_page() { 'name' => 'dolishipping', 'show_option_none' => __( '- Select -', 'doliconnect' ), 'option_none_value' => '0', - 'lang' => strtolower(str_replace("_", "-", get_locale())), + 'lang' => doliUserLang(wp_get_current_user(), 'slug'), 'selected' => get_option('dolishipping') ); wp_dropdown_pages($args); ?> @@ -482,7 +482,7 @@ function ptibogxiv_management_page() { 'name' => 'dolisupplier', 'show_option_none' => __( '- Select -', 'doliconnect' ), 'option_none_value' => '0', - 'lang' => strtolower(str_replace("_", "-", get_locale())), + 'lang' => doliUserLang(wp_get_current_user(), 'slug'), 'selected' => get_option('dolisupplier') ); wp_dropdown_pages($args); ?> @@ -500,7 +500,7 @@ function ptibogxiv_management_page() { 'name' => 'dolicart', 'show_option_none' => __( '- Select -', 'doliconnect' ), 'option_none_value' => '0', - 'lang' => strtolower(str_replace("_", "-", get_locale())), + 'lang' => doliUserLang(wp_get_current_user(), 'slug'), 'selected' => get_option('dolicart') ); wp_dropdown_pages($args); ?> @@ -513,7 +513,7 @@ function ptibogxiv_management_page() { 'name' => 'dolifaq', 'show_option_none' => __( '- Select -', 'doliconnect' ), 'option_none_value' => '0', - 'lang' => strtolower(str_replace("_", "-", get_locale())), + 'lang' => doliUserLang(wp_get_current_user(), 'slug'), 'selected' => get_option('dolifaq') ); wp_dropdown_pages($args); ?> @@ -526,7 +526,7 @@ function ptibogxiv_management_page() { 'name' => 'dolidonation', 'show_option_none' => __( '- Select -', 'doliconnect' ), 'option_none_value' => '0', - 'lang' => strtolower(str_replace("_", "-", get_locale())), + 'lang' => doliUserLang(wp_get_current_user(), 'slug'), 'selected' => get_option('dolidonation') ); wp_dropdown_pages($args); ?> @@ -540,7 +540,7 @@ function ptibogxiv_management_page() { 'name' => 'dolicontact', 'show_option_none' => __( '- Select -', 'doliconnect' ), 'option_none_value' => '0', - 'lang' => strtolower(str_replace("_", "-", get_locale())), + 'lang' => doliUserLang(wp_get_current_user(), 'slug'), 'selected' => get_option('dolicontact') ); wp_dropdown_pages($args); ?> @@ -552,7 +552,7 @@ function ptibogxiv_management_page() { 'name' => 'wp_page_for_privacy_policy', 'show_option_none' => __( '- Select -', 'doliconnect' ), 'option_none_value' => '0', - 'lang' => strtolower(str_replace("_", "-", get_locale())), + 'lang' => doliUserLang(wp_get_current_user(), 'slug'), 'selected' => get_option( 'wp_page_for_privacy_policy' ) ); wp_dropdown_pages($args); ?> @@ -564,7 +564,7 @@ function ptibogxiv_management_page() { 'name' => 'dolitos', 'show_option_none' => __( '- Select -', 'doliconnect' ), 'option_none_value' => '0', - 'lang' => strtolower(str_replace("_", "-", get_locale())), + 'lang' => doliUserLang(wp_get_current_user(), 'slug'), 'selected' => get_option('dolitos') ); wp_dropdown_pages($args); ?> @@ -576,7 +576,7 @@ function ptibogxiv_management_page() { 'name' => 'doliagenda', 'show_option_none' => __( '- Select -', 'doliconnect' ), 'option_none_value' => '0', - 'lang' => strtolower(str_replace("_", "-", get_locale())), + 'lang' => doliUserLang(wp_get_current_user(), 'slug'), 'selected' => get_option('doliagenda') ); wp_dropdown_pages($args); ?> @@ -589,7 +589,7 @@ function ptibogxiv_management_page() { 'name' => 'doliclassifieds', 'show_option_none' => __( '- Select -', 'doliconnect' ), 'option_none_value' => '0', - 'lang' => strtolower(str_replace("_", "-", get_locale())), + 'lang' => doliUserLang(wp_get_current_user(), 'slug'), 'selected' => get_option('doliclassifieds') ); wp_dropdown_pages($args); ?> diff --git a/functions/data-request.php b/functions/data-request.php index d1bc2302..5fb14fed 100644 --- a/functions/data-request.php +++ b/functions/data-request.php @@ -1088,6 +1088,7 @@ function dolimember_request(){ function dolimodal_request(){ global $current_user; + $response = array(); $modal = array(); if ( wp_verify_nonce( trim($_POST['dolimodal-nonce']), 'dolimodal-nonce' ) && isset($_POST['case']) && $_POST['case'] == "legacy" ) {