widget_title WordPress Filter Hook

The widget_title hook is used to filter the title of a widget before it is displayed. This hook is typically used in themes to add custom functionality to widgets. For example, a theme could use this hook to add a custom prefix to the title of a widget.

apply_filters( 'widget_title', string $title, array $instance, mixed $id_base ) #

Filters the widget title.


Parameters

$title

(string)The widget title. Default 'Pages'.

$instance

(array)Array of settings for the current widget.

$id_base

(mixed)The widget ID.


Top ↑

Source

File: wp-includes/widgets/class-wp-widget-pages.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.