Selaa lähdekoodia

faculty profile 8

Rousnay 1 vuosi sitten
vanhempi
commit
26b6a3a681
1 muutettua tiedostoa jossa 13 lisäystä ja 13 poistoa
  1. 13 13
      functions.php

+ 13 - 13
functions.php

@@ -229,19 +229,19 @@ include_once(get_stylesheet_directory() . '/inc/theme-settings.php');
 function uiu_acf_update_user_id($value, $post_id, $field)
 {
 	// only set a new value if the field is empty
-	if ($value == '') {
-		// get video here
-		$login_id = get_field('login_id');
-		// fetch thumb url(s)
-		$user_meta = file_get_contents("https://api.github.com/users/rousnay");
-		$user_meta = json_decode($user_meta);
-		$user_id = $user_meta[0]->id;
-		// set value
-		$value = "Rousnay";
-		return $value;
-	} else {
-		return $value;
-	}
+	// if ($value == '') {
+	// get video here
+	$login_id = get_field('login_id');
+	// fetch thumb url(s)
+	$user_meta = file_get_contents("https://api.github.com/users/rousnay");
+	$user_meta = json_decode($user_meta);
+	$user_id = $user_meta[0]->id;
+	// set value
+	$value = "Rousnay";
+	return $value;
+	// } else {
+	// 	return $value;
+	// }
 }
 
 add_filter('acf/update_value/name=employeeid', 'uiu_acf_update_user_id', 10, 3);