[Plugin: Breadcrumb NavXT] Problem with maximum title length
-
Hi, there seems to be a problem with page titles that are exactly the maximum title length. In this case, the function title_trim has nothing to trim, but still adds … to the title.
Suggested bugfix:public function title_trim($max_length) { $title = $this->title; //Make sure that we are not making it longer with that ellipse if((mb_strlen($this->title) + 3) > $max_length) { //Trim the title $this->title = mb_substr($this->title, 0, $max_length - 1); //Make sure we can split a, four keywords are available %link%, %title%, %htitle%, and %type%pace, but we want to limit to cutting at max an additional 25% if(mb_strpos($this->title, ' ', .75 * $max_length) > 0) { //Don't split mid word while(mb_substr($this->title,-1) != ' ') { $this->title = mb_substr($this->title, 0, -1); } } //Remove the whitespace at the end and add the hellip if ( $this->title != $title ) $this->title = rtrim($this->title) . '…'; } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘[Plugin: Breadcrumb NavXT] Problem with maximum title length’ is closed to new replies.