This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/mime/theme.php

46 lines
1.1 KiB
PHP
Raw Normal View History

2021-12-14 18:32:47 +00:00
<?php
declare(strict_types=1);
namespace Shimmie2;
2020-06-14 16:05:55 +00:00
class MimeSystemTheme extends Themelet
{
public function get_help_html(): string
2020-06-14 16:05:55 +00:00
{
$mimes = DataHandlerExtension::get_all_supported_mimes();
sort($mimes);
$exts = [];
foreach ($mimes as $mime) {
$exts[] = FileExtension::get_for_mime($mime);
}
$mimes = join("</li><li>", $mimes);
sort($exts);
$exts = join("</li><li>", $exts);
2020-10-26 15:14:23 +00:00
return '<p>Search for posts by extension</p>
2020-06-14 16:05:55 +00:00
<div class="command_example">
2024-06-11 15:02:52 +00:00
<code>ext=jpg</code>
2020-10-26 15:14:23 +00:00
<p>Returns posts with the extension "jpg".</p>
2020-06-14 16:05:55 +00:00
</div>
These extensions are available in the system:
<ul><li>'.$exts.'</li></ul>
<hr/>
2020-10-26 15:14:23 +00:00
<p>Search for posts by MIME type</p>
2020-06-14 16:05:55 +00:00
<div class="command_example">
2024-06-11 15:02:52 +00:00
<code>mime=image/jpeg</code>
2020-10-26 15:14:23 +00:00
<p>Returns posts that have the MIME type "image/jpeg".</p>
2020-06-14 16:05:55 +00:00
</div>
These MIME types are available in the system:
<ul><li>'.$mimes.'</li></ul>
';
}
}