Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Inventory_Presser_Plugin::get_last_word( string $str )

Given a string, return the last word.


Parameters Parameters

$str

(string) (Required) The string from which to extract the last word.


Top ↑

Return Return

(string) The last word of the input string


Top ↑

Source Source

File: inventory-presser.php

		private function get_last_word( $str ) {
			$pieces = explode( ' ', rtrim( $str ) );
			return array_pop( $pieces );
		}