diff --git a/functions/gravatars.php b/functions/gravatars.php index 86d13e6..3279d65 100644 --- a/functions/gravatars.php +++ b/functions/gravatars.php @@ -83,7 +83,7 @@ function comicpress_random_default_avatar($id_or_email = '') { $current_icon_directory = get_option('comicpress-icon_directory'); if (empty($current_icon_directory)) $current_icon_directory = 'default'; - $count = count($results = glob(get_template_directory() . '/images/icons/'.$current_icon_directory.'/*')); + $count = count($results = glob(get_template_directory() . '/images/avatars/'.$current_icon_directory.'/*')); $default = ''; $checknum = hexdec(substr(md5($id_or_email),0,5)) % $count; @@ -92,41 +92,7 @@ function comicpress_random_default_avatar($id_or_email = '') { } else { return false; } - return get_bloginfo('stylesheet_directory').'/images/icons/'.$current_icon_directory.'/'.$default; -} - -function letter_to_number($letter = '') { - if (!empty($letter)) { - if ($letter == 'a') $number = 1; - if ($letter == 'b') $number = 2; - if ($letter == 'c') $number = 3; - if ($letter == 'd') $number = 4; - if ($letter == 'e') $number = 5; - if ($letter == 'f') $number = 6; - if ($letter == 'g') $number = 7; - if ($letter == 'h') $number = 8; - if ($letter == 'i') $number = 9; - if ($letter == 'j') $number = 10; - if ($letter == 'k') $number = 11; - if ($letter == 'l') $number = 12; - if ($letter == 'm') $number = 13; - if ($letter == 'n') $number = 14; - if ($letter == 'o') $number = 15; - if ($letter == 'p') $number = 16; - if ($letter == 'q') $number = 17; - if ($letter == 'r') $number = 18; - if ($letter == 's') $number = 19; - if ($letter == 't') $number = 20; - if ($letter == 'u') $number = 21; - if ($letter == 'v') $number = 22; - if ($letter == 'w') $number = 23; - if ($letter == 'x') $number = 24; - if ($letter == 'y') $number = 25; - if ($letter == 'z') $number = 26; - } else { - return false; - } - return $number; + return get_bloginfo('stylesheet_directory').'/images/avatars/'.$current_icon_directory.'/'.$default; } ?> \ No newline at end of file diff --git a/images/icons/default/Thumb_AlexKid.JPG b/images/avatars/default/Thumb_AlexKid.JPG similarity index 100% rename from images/icons/default/Thumb_AlexKid.JPG rename to images/avatars/default/Thumb_AlexKid.JPG diff --git a/images/icons/default/Thumb_Alex_01.JPG b/images/avatars/default/Thumb_Alex_01.JPG similarity index 100% rename from images/icons/default/Thumb_Alex_01.JPG rename to images/avatars/default/Thumb_Alex_01.JPG diff --git a/images/icons/default/Thumb_Alex_02.JPG b/images/avatars/default/Thumb_Alex_02.JPG similarity index 100% rename from images/icons/default/Thumb_Alex_02.JPG rename to images/avatars/default/Thumb_Alex_02.JPG diff --git a/images/icons/default/Thumb_Alex_03.JPG b/images/avatars/default/Thumb_Alex_03.JPG similarity index 100% rename from images/icons/default/Thumb_Alex_03.JPG rename to images/avatars/default/Thumb_Alex_03.JPG diff --git a/images/icons/default/Thumb_Alex_04.JPG b/images/avatars/default/Thumb_Alex_04.JPG similarity index 100% rename from images/icons/default/Thumb_Alex_04.JPG rename to images/avatars/default/Thumb_Alex_04.JPG diff --git a/images/icons/default/Thumb_Alex_05.JPG b/images/avatars/default/Thumb_Alex_05.JPG similarity index 100% rename from images/icons/default/Thumb_Alex_05.JPG rename to images/avatars/default/Thumb_Alex_05.JPG diff --git a/images/icons/default/Thumb_Alex_06.JPG b/images/avatars/default/Thumb_Alex_06.JPG similarity index 100% rename from images/icons/default/Thumb_Alex_06.JPG rename to images/avatars/default/Thumb_Alex_06.JPG diff --git a/images/icons/default/Thumb_Alex_07.JPG b/images/avatars/default/Thumb_Alex_07.JPG similarity index 100% rename from images/icons/default/Thumb_Alex_07.JPG rename to images/avatars/default/Thumb_Alex_07.JPG diff --git a/images/icons/default/Thumb_Cyclops.JPG b/images/avatars/default/Thumb_Cyclops.JPG similarity index 100% rename from images/icons/default/Thumb_Cyclops.JPG rename to images/avatars/default/Thumb_Cyclops.JPG diff --git a/images/icons/default/Thumb_Cyclops_02.JPG b/images/avatars/default/Thumb_Cyclops_02.JPG similarity index 100% rename from images/icons/default/Thumb_Cyclops_02.JPG rename to images/avatars/default/Thumb_Cyclops_02.JPG diff --git a/images/icons/default/Thumb_Daniel_01.JPG b/images/avatars/default/Thumb_Daniel_01.JPG similarity index 100% rename from images/icons/default/Thumb_Daniel_01.JPG rename to images/avatars/default/Thumb_Daniel_01.JPG diff --git a/images/icons/default/Thumb_Daniel_02.JPG b/images/avatars/default/Thumb_Daniel_02.JPG similarity index 100% rename from images/icons/default/Thumb_Daniel_02.JPG rename to images/avatars/default/Thumb_Daniel_02.JPG diff --git a/images/icons/default/Thumb_Daniel_03.JPG b/images/avatars/default/Thumb_Daniel_03.JPG similarity index 100% rename from images/icons/default/Thumb_Daniel_03.JPG rename to images/avatars/default/Thumb_Daniel_03.JPG diff --git a/images/icons/default/Thumb_Fairy_01.JPG b/images/avatars/default/Thumb_Fairy_01.JPG similarity index 100% rename from images/icons/default/Thumb_Fairy_01.JPG rename to images/avatars/default/Thumb_Fairy_01.JPG diff --git a/images/icons/default/Thumb_GrandpaPistacio.JPG b/images/avatars/default/Thumb_GrandpaPistacio.JPG similarity index 100% rename from images/icons/default/Thumb_GrandpaPistacio.JPG rename to images/avatars/default/Thumb_GrandpaPistacio.JPG diff --git a/images/icons/default/Thumb_GrandpaPistacio_02.JPG b/images/avatars/default/Thumb_GrandpaPistacio_02.JPG similarity index 100% rename from images/icons/default/Thumb_GrandpaPistacio_02.JPG rename to images/avatars/default/Thumb_GrandpaPistacio_02.JPG diff --git a/images/icons/default/Thumb_GrandpaPistacio_03.JPG b/images/avatars/default/Thumb_GrandpaPistacio_03.JPG similarity index 100% rename from images/icons/default/Thumb_GrandpaPistacio_03.JPG rename to images/avatars/default/Thumb_GrandpaPistacio_03.JPG diff --git a/images/icons/default/Thumb_Griffin.JPG b/images/avatars/default/Thumb_Griffin.JPG similarity index 100% rename from images/icons/default/Thumb_Griffin.JPG rename to images/avatars/default/Thumb_Griffin.JPG diff --git a/images/icons/default/Thumb_KiwiKid.JPG b/images/avatars/default/Thumb_KiwiKid.JPG similarity index 100% rename from images/icons/default/Thumb_KiwiKid.JPG rename to images/avatars/default/Thumb_KiwiKid.JPG diff --git a/images/icons/default/Thumb_KiwiKid_02.JPG b/images/avatars/default/Thumb_KiwiKid_02.JPG similarity index 100% rename from images/icons/default/Thumb_KiwiKid_02.JPG rename to images/avatars/default/Thumb_KiwiKid_02.JPG diff --git a/images/icons/default/Thumb_Kiwi_01.JPG b/images/avatars/default/Thumb_Kiwi_01.JPG similarity index 100% rename from images/icons/default/Thumb_Kiwi_01.JPG rename to images/avatars/default/Thumb_Kiwi_01.JPG diff --git a/images/icons/default/Thumb_Kiwi_02.JPG b/images/avatars/default/Thumb_Kiwi_02.JPG similarity index 100% rename from images/icons/default/Thumb_Kiwi_02.JPG rename to images/avatars/default/Thumb_Kiwi_02.JPG diff --git a/images/icons/default/Thumb_Kiwi_03.JPG b/images/avatars/default/Thumb_Kiwi_03.JPG similarity index 100% rename from images/icons/default/Thumb_Kiwi_03.JPG rename to images/avatars/default/Thumb_Kiwi_03.JPG diff --git a/images/icons/default/Thumb_Kiwi_04.JPG b/images/avatars/default/Thumb_Kiwi_04.JPG similarity index 100% rename from images/icons/default/Thumb_Kiwi_04.JPG rename to images/avatars/default/Thumb_Kiwi_04.JPG diff --git a/images/icons/default/Thumb_Kiwi_05.JPG b/images/avatars/default/Thumb_Kiwi_05.JPG similarity index 100% rename from images/icons/default/Thumb_Kiwi_05.JPG rename to images/avatars/default/Thumb_Kiwi_05.JPG diff --git a/images/icons/default/Thumb_Kiwi_06.JPG b/images/avatars/default/Thumb_Kiwi_06.JPG similarity index 100% rename from images/icons/default/Thumb_Kiwi_06.JPG rename to images/avatars/default/Thumb_Kiwi_06.JPG diff --git a/images/icons/default/Thumb_Mermaid_01.JPG b/images/avatars/default/Thumb_Mermaid_01.JPG similarity index 100% rename from images/icons/default/Thumb_Mermaid_01.JPG rename to images/avatars/default/Thumb_Mermaid_01.JPG diff --git a/images/icons/default/Thumb_Mermaid_02.JPG b/images/avatars/default/Thumb_Mermaid_02.JPG similarity index 100% rename from images/icons/default/Thumb_Mermaid_02.JPG rename to images/avatars/default/Thumb_Mermaid_02.JPG diff --git a/images/icons/default/Thumb_Nastajia.JPG b/images/avatars/default/Thumb_Nastajia.JPG similarity index 100% rename from images/icons/default/Thumb_Nastajia.JPG rename to images/avatars/default/Thumb_Nastajia.JPG diff --git a/images/icons/default/Thumb_NastajiaKid.JPG b/images/avatars/default/Thumb_NastajiaKid.JPG similarity index 100% rename from images/icons/default/Thumb_NastajiaKid.JPG rename to images/avatars/default/Thumb_NastajiaKid.JPG diff --git a/images/icons/default/Thumb_NastajiaKid_02.JPG b/images/avatars/default/Thumb_NastajiaKid_02.JPG similarity index 100% rename from images/icons/default/Thumb_NastajiaKid_02.JPG rename to images/avatars/default/Thumb_NastajiaKid_02.JPG diff --git a/images/icons/default/Thumb_NastajiaKid_03.JPG b/images/avatars/default/Thumb_NastajiaKid_03.JPG similarity index 100% rename from images/icons/default/Thumb_NastajiaKid_03.JPG rename to images/avatars/default/Thumb_NastajiaKid_03.JPG diff --git a/images/icons/default/Thumb_NastajiaKid_04.JPG b/images/avatars/default/Thumb_NastajiaKid_04.JPG similarity index 100% rename from images/icons/default/Thumb_NastajiaKid_04.JPG rename to images/avatars/default/Thumb_NastajiaKid_04.JPG diff --git a/images/icons/default/Thumb_Nastajia_02.JPG b/images/avatars/default/Thumb_Nastajia_02.JPG similarity index 100% rename from images/icons/default/Thumb_Nastajia_02.JPG rename to images/avatars/default/Thumb_Nastajia_02.JPG diff --git a/images/icons/default/Thumb_Nicole_01.JPG b/images/avatars/default/Thumb_Nicole_01.JPG similarity index 100% rename from images/icons/default/Thumb_Nicole_01.JPG rename to images/avatars/default/Thumb_Nicole_01.JPG diff --git a/images/icons/default/Thumb_Nicole_02.JPG b/images/avatars/default/Thumb_Nicole_02.JPG similarity index 100% rename from images/icons/default/Thumb_Nicole_02.JPG rename to images/avatars/default/Thumb_Nicole_02.JPG diff --git a/images/icons/default/Thumb_Nicole_03.JPG b/images/avatars/default/Thumb_Nicole_03.JPG similarity index 100% rename from images/icons/default/Thumb_Nicole_03.JPG rename to images/avatars/default/Thumb_Nicole_03.JPG diff --git a/images/icons/default/Thumb_Paddington.JPG b/images/avatars/default/Thumb_Paddington.JPG similarity index 100% rename from images/icons/default/Thumb_Paddington.JPG rename to images/avatars/default/Thumb_Paddington.JPG diff --git a/images/icons/default/Thumb_PaddingtonKid.JPG b/images/avatars/default/Thumb_PaddingtonKid.JPG similarity index 100% rename from images/icons/default/Thumb_PaddingtonKid.JPG rename to images/avatars/default/Thumb_PaddingtonKid.JPG diff --git a/images/icons/default/Thumb_PaddingtonKid_02.JPG b/images/avatars/default/Thumb_PaddingtonKid_02.JPG similarity index 100% rename from images/icons/default/Thumb_PaddingtonKid_02.JPG rename to images/avatars/default/Thumb_PaddingtonKid_02.JPG diff --git a/images/icons/default/Thumb_Paddington_02.JPG b/images/avatars/default/Thumb_Paddington_02.JPG similarity index 100% rename from images/icons/default/Thumb_Paddington_02.JPG rename to images/avatars/default/Thumb_Paddington_02.JPG diff --git a/images/icons/default/Thumb_Paddington_03.JPG b/images/avatars/default/Thumb_Paddington_03.JPG similarity index 100% rename from images/icons/default/Thumb_Paddington_03.JPG rename to images/avatars/default/Thumb_Paddington_03.JPG diff --git a/images/icons/default/Thumb_Teddy_01.JPG b/images/avatars/default/Thumb_Teddy_01.JPG similarity index 100% rename from images/icons/default/Thumb_Teddy_01.JPG rename to images/avatars/default/Thumb_Teddy_01.JPG diff --git a/images/icons/default/Thumb_Teddy_02.JPG b/images/avatars/default/Thumb_Teddy_02.JPG similarity index 100% rename from images/icons/default/Thumb_Teddy_02.JPG rename to images/avatars/default/Thumb_Teddy_02.JPG