A_Z_Listing_Indices::get_index_letter( string $title )

Get the first letter of a title for use as the Index letter


Description


Parameters

$title

(string) (Required) The title of the item to extract the index letter from.


Source

File: classes/class-a-z-listing-indices.php

	public static function get_index_letter( $title ) {
		if ( extension_loaded( 'mbstring' ) ) {
			return mb_substr( $title, 0, 1, 'UTF-8' );
		}
		return substr( $title, 0, 1 );
	}

Changelog

Changelog
Version Description
2.1.0 Introduced.

More Information

You are currently logged out. To view tickets you must first login.

I have read and understood the Terms of Service


User Contributed Notes

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.