コード例 #1
0
 /**
  * icon() function for LESSPHP
  *
  * @param  string $arg icon name
  * @return array       LESSPHP token
  */
 function wpv_lessphp_icon($arg)
 {
     list($type, $icon) = $arg;
     $icons = wpv_get_icon_list();
     $theme_icons = wpv_get_theme_icon_list();
     if (isset($icons[$icon])) {
         $icon = '\\' . dechex($icons[$icon]);
     }
     $theme_icon = preg_replace('/^theme-/', '', $icon, 1);
     if (isset($theme_icons[$theme_icon])) {
         $icon = '\\' . dechex($theme_icons[$theme_icon]);
     }
     return array('string', '"', array($icon));
 }
コード例 #2
0
ファイル: icons.php プロジェクト: amitmula/amitandaastha.in
function wpv_get_icons_extended()
{
    $result = array();
    $icons = wpv_get_icon_list();
    $theme_icons = wpv_get_theme_icon_list();
    $custom_icons = wpv_get_custom_icon_list();
    ksort($icons);
    ksort($theme_icons);
    ksort($custom_icons);
    foreach ($icons as $key => $num) {
        $result[$key] = $key;
    }
    foreach ($theme_icons as $key => $num) {
        $result['theme-' . $key] = 'theme-' . $key;
    }
    foreach ($custom_icons as $key => $num) {
        $result['custom-' . $key] = 'custom-' . $key;
    }
    return $result;
}