Skip to content

Commit

Permalink
slug size should be configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
czaks committed Mar 11, 2015
1 parent a16538e commit 3851087
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions inc/functions.php
Expand Up @@ -2432,6 +2432,8 @@ function diceRoller($post) {
}

function slugify($post) {
global $config;

$slug = "";

if (isset($post['subject']) && $post['subject'])
Expand Down Expand Up @@ -2459,8 +2461,8 @@ function slugify($post) {
// Strip dashes at the beginning and at the end
$slug = preg_replace('/^-|-$/', '', $slug);

// Slug should be 200 characters long, at max
$slug = substr($slug, 0, 200);
// Slug should be X characters long, at max (80?)
$slug = substr($slug, 0, $config['slug_max_size']);

// Slug is now ready
return $slug;
Expand Down

0 comments on commit 3851087

Please sign in to comment.