wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_widget_description › WordPress Function

Od2.5.0
Przestarzałyn/a
wp_widget_description ( $id )
Parametry:
  • (int|string) $id Widget ID.
    Wymagane: Tak
Powrót:
  • (string|void) Widget description, if available.
Zdefiniowane na:
Codex:

Retrieve description for widget.

When registering widgets, the options can also include 'description' that describes the widget for display on the widget administration panel or in the theme.


Źródło

function wp_widget_description( $id ) {
	if ( ! is_scalar( $id ) ) {
		return;
	}

	global $wp_registered_widgets;

	if ( isset( $wp_registered_widgets[ $id ]['description'] ) ) {
		return esc_html( $wp_registered_widgets[ $id ]['description'] );
	}
}