gutenberg widget outputting paragraph marks

Does anyone have any idea what is causing the extra paragraph marks before and after? The Shortcode block performs wpautop() on the content (in the block) before the shortcode is parsed (see source on GitHub), i.e. wpautop( ‘[show-test]’ ) in your case, which then returns <p>[show-test]</p> and then outputs <p><div>hi there.</div></p> after the shortcode is … Read more

How to pass custom options from widget form to widget update callback?

Not sure if you’re still struggling with this, but for anyone that is, here’s the solution: Add the following arguments to wse_widget_context_form(): $widget, $return and $instance Then use the following to get field IDs and field names: <?php echo $widget->get_field_id(‘field_name’); ?> and <?php echo $widget->get_field_name(‘field_name’); ?> respectively. e.g. <li><label><input value=”on” type=”checkbox” name=”<?php echo $widget->get_field_name(‘noHome’); ?>” … Read more

Add new section to “Right Now” widget

I believe the hook you are looking for is right_now_discussion_table_end Update: From your comment i see that i did not explain myself, WordPress closes the table and div just after right_now_discussion_table_end action hook so you can use right_now_discussion_table_end and at the begging of your function close the table and div yourself and open your own, … Read more