Skip to content

Commit f6adbfa

Browse files
dd32claude
andcommitted
Template Tags: Fix undefined array key "description" warning for deprecated tags without a description
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent edaffad commit f6adbfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/wp-content/themes/wporg-developer-2023/inc/template-tags.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ function get_changelog_data( $post_id = null ) {
10051005
if ( $deprecated ) {
10061006
$deprecated = array_shift( $deprecated );
10071007
// Prepend 'Deprecated.' to the description to make clear the changelog entry's purpose.
1008-
$deprecated['description'] = 'Deprecated. ' . $deprecated['description'];
1008+
$deprecated['description'] = 'Deprecated. ' . ( $deprecated['description'] ?? '' );
10091009

10101010
if ( $term = get_term_by( 'name', $deprecated['content'], 'wp-parser-since' ) ) {
10111011
// Terms.

0 commit comments

Comments
 (0)