diff --git a/blocks/kit-presse/build/render.php b/blocks/kit-presse/build/render.php index 6c11e64..cb77890 100644 --- a/blocks/kit-presse/build/render.php +++ b/blocks/kit-presse/build/render.php @@ -6,6 +6,8 @@ if (!function_exists('getRessourceIcon')) { function getRessourceIcon($ressource_type) { switch ($ressource_type) { + case 'image/svg+xml': + case 'image/png': case 'image/jpeg': return plugin_dir_url(__DIR__) . "src/img/homegrade_image.svg"; @@ -17,6 +19,17 @@ if (!function_exists('getRessourceIcon')) { } } } +if (!function_exists('getRessourceTypeName')) { + function getRessourceTypeName($subtype) + { + switch ($subtype) { + case 'svg+xml': + return "svg"; + default: + return $subtype; + } + } +} ?>
"homegrade-blocks-kit-presse"]); ?>> @@ -34,22 +47,19 @@ if (!function_exists('getRessourceIcon')) { $ressourceType = $data['mime_type']; $ressourceIcon = getRessourceIcon($ressourceType); - setlocale(LC_TIME, 'fr_FR'); $timestamp = strtotime($data['modified']); $formatted_date = strftime("%B %Y", $timestamp); - // echo '
';
-			// print_r($data);
-			// echo '
'; + ?>
  • -

    +

    - +
  • diff --git a/blocks/kit-presse/src/render.php b/blocks/kit-presse/src/render.php index ba97c8f..cb77890 100644 --- a/blocks/kit-presse/src/render.php +++ b/blocks/kit-presse/src/render.php @@ -6,6 +6,8 @@ if (!function_exists('getRessourceIcon')) { function getRessourceIcon($ressource_type) { switch ($ressource_type) { + case 'image/svg+xml': + case 'image/png': case 'image/jpeg': return plugin_dir_url(__DIR__) . "src/img/homegrade_image.svg"; @@ -17,6 +19,17 @@ if (!function_exists('getRessourceIcon')) { } } } +if (!function_exists('getRessourceTypeName')) { + function getRessourceTypeName($subtype) + { + switch ($subtype) { + case 'svg+xml': + return "svg"; + default: + return $subtype; + } + } +} ?>
    "homegrade-blocks-kit-presse"]); ?>> @@ -34,22 +47,19 @@ if (!function_exists('getRessourceIcon')) { $ressourceType = $data['mime_type']; $ressourceIcon = getRessourceIcon($ressourceType); - setlocale(LC_TIME, 'fr_FR'); $timestamp = strtotime($data['modified']); $formatted_date = strftime("%B %Y", $timestamp); - // echo '
    ';
    -			// print_r($data);
    -			// echo '
    '; + ?>
  • -

    +

    - +