Automattic\WooCommerce\Admin
Loader::update_admin_title() public WC 1.0
Edits Admin title based on section of wc-admin.
{} Это метод класса: Loader{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
$result = Loader::update_admin_title( $admin_title );
- $admin_title(строка) (обязательный)
- Modifies admin title.
Код Loader::update_admin_title() Loader::update admin title WC 5.2.2
public static function update_admin_title( $admin_title ) {
if (
! did_action( 'current_screen' ) ||
! self::is_admin_page()
) {
return $admin_title;
}
$sections = self::get_embed_breadcrumbs();
$pieces = array();
foreach ( $sections as $section ) {
$pieces[] = is_array( $section ) ? $section[1] : $section;
}
$pieces = array_reverse( $pieces );
$title = implode( ' ‹ ', $pieces );
/* translators: %1$s: updated title, %2$s: blog info name */
return sprintf( __( '%1$s ‹ %2$s', 'woocommerce' ), $title, get_bloginfo( 'name' ) );
}