Code Duplication    Length = 9-9 lines in 2 locations

src/wp-includes/widgets.php 2 locations

@@ 390-398 (lines=9) @@
387
 * @param int|string $id Widget ID.
388
 * @return string|void Widget description, if available.
389
 */
390
function wp_widget_description( $id ) {
391
	if ( !is_scalar($id) )
392
		return;
393
394
	global $wp_registered_widgets;
395
396
	if ( isset($wp_registered_widgets[$id]['description']) )
397
		return esc_html( $wp_registered_widgets[$id]['description'] );
398
}
399
400
/**
401
 * Retrieve description for a sidebar.
@@ 413-421 (lines=9) @@
410
 * @param string $id sidebar ID.
411
 * @return string|void Sidebar description, if available.
412
 */
413
function wp_sidebar_description( $id ) {
414
	if ( !is_scalar($id) )
415
		return;
416
417
	global $wp_registered_sidebars;
418
419
	if ( isset($wp_registered_sidebars[$id]['description']) )
420
		return esc_html( $wp_registered_sidebars[$id]['description'] );
421
}
422
423
/**
424
 * Remove widget from sidebar.