Beispiel #1
0
function themify_get_skin_info($file)
{
    if (!function_exists('WP_Filesystem')) {
        require_once ABSPATH . 'wp-admin/includes/file.php';
    }
    WP_Filesystem();
    global $wp_filesystem;
    $data = $wp_filesystem->get_contents($file);
    $tempArray = explode("\n", themify_strip("/*", "*/", $data, 0));
    $array = array();
    foreach ($tempArray as $line) {
        $tempLine = explode(":", $line);
        if (isset($tempLine[1])) {
            $array[$tempLine[0]] = $tempLine[1];
        }
    }
    return $array;
}
Beispiel #2
0
function themify_get_skin_info($file)
{
    $fh = fopen($file, 'r');
    $data = fread($fh, filesize($file));
    $tempArray = explode("\n", themify_strip("/*", "*/", $data, 0));
    $array = array();
    foreach ($tempArray as $line) {
        $tempLine = explode(":", $line);
        $array[$tempLine[0]] = $tempLine[1];
    }
    fclose($fh);
    return $array;
}