A_Z_Listing::get_all_indices()

Sort the letters to be used as indices and return as an Array


Description


Return

(Array) The index letters


Source

File: partials/class-a-z-listing.php

	protected function get_all_indices() {
		$indexed_items = $this->get_indexed_items();

		if ( ! empty( $index[ self::$unknown_letters ] ) ) {
			$this->available_indices[] = self::$unknown_letters;
		}

		foreach ( $this->available_indices as $index ) {
			if ( ! empty( $indexed_items[ $index ] ) ) {
				usort( $indexed_items[ $index ], function( $a, $b ) {
					return strcasecmp( $a['title'], $b['title'] );
				});
			}
		}

		return $indexed_items;
	}

Changelog

Changelog
Version Description
0.1 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.

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