Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Legacy Widgets description of "callback widgets" is not shown. #14615

Merged

Conversation

jorgefilipecosta
Copy link
Member

Description

Currently, the callback widgets description is not being shown. Callback widgets can also have a description, by setting that property in the options array passed to wp_register_sidebar_widget.

How has this been tested?

I pasted the following code in functions.php:


function my_marquee_widget_callback() {
	echo '<marquee>This is a legacy widget!<marquee>';
}
wp_register_sidebar_widget(
	'my-marquee-widget',
	'My marquee widget',
	'my_marquee_widget_callback',
	array(
		'description' => 'my marquee widget callback'
	)
);

function my_marquee_widget_callback2() {
	echo '<marquee>This is a legacy widget2!<marquee>';
}
wp_register_sidebar_widget(
	'my-marquee-widget2',
	'My marquee widget2',
	'my_marquee_widget_callback2'
);

I selected "My marquee widget" in the legacy widget block. I checked a description appears for this block. In master, it does not appear.
I selected "My marquee widget2" in the legacy widget block. I checked a description does not appears for this block.

@jorgefilipecosta jorgefilipecosta added the [Type] Bug An existing feature does not function as intended label Mar 25, 2019
@jorgefilipecosta jorgefilipecosta merged commit 39d435b into master Mar 25, 2019
@jorgefilipecosta jorgefilipecosta deleted the fix/legacy-widgets-callback-description-is-not-shown branch March 25, 2019 17:24
@youknowriad youknowriad added this to the 5.4 (Gutenberg) milestone Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants