Skip to content

Commit

Permalink
feat: remove slug by default
Browse files Browse the repository at this point in the history
  • Loading branch information
zgq354 committed Dec 4, 2023
1 parent 2e80231 commit ba9e626
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Extend/Misc/GenerateCustomSlugWhenSaving.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class GenerateCustomSlugWhenSaving
public function handle(Saving $event)
{
// since Flarum v1.3 it supports converting slugs to pinyin, but without a maximum character limit.
$event->discussion->slug = getShortSlug(mb_strtolower(self::$pinyin->permalink($event->discussion->title)));
// $event->discussion->slug = getShortSlug(mb_strtolower(self::$pinyin->permalink($event->discussion->title)));
// remove slug instead
$event->discussion->slug = '';
}
}

Expand Down

0 comments on commit ba9e626

Please sign in to comment.