X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/restate/platform/plugins/blog/src/Supports
home
/
gfecatvj
/
sites
/
restate
/
platform
/
plugins
/
blog
/
src
/
Supports
/
📁
..
📄
FilterCategory.php
(848 B)
📄
FilterPost.php
(1.36 KB)
📄
PostFormat.php
(1.26 KB)
Editing: PostFormat.php
<?php namespace Botble\Blog\Supports; class PostFormat { /** * @var array */ protected static $formats = [ '' => [ 'key' => '', 'icon' => null, 'name' => 'Default', ], 'gallery' => [ 'key' => 'gallery', 'icon' => 'fa fa-image', 'name' => 'Gallery', ], 'video' => [ 'key' => 'video', 'icon' => 'fa fa-camera', 'name' => 'Video', ], ]; /** * @param array $formats * @return void * @since 16-09-2016 */ public static function registerPostFormat(array $formats = []) { foreach ($formats as $key => $format) { self::$formats[$key] = $format; } } /** * @param bool $isConvertToList * @return array * @since 16-09-2016 */ public static function getPostFormats($isConvertToList = false) { if ($isConvertToList) { $results = []; foreach (self::$formats as $key => $item) { $results[] = [ $key, $item['name'], ]; } return $results; } return self::$formats; } }
Upload File
Create Folder