wpsmith / widget
WordPress widget base class.
1.0.0
2019-02-21 02:28 UTC
Requires
- php: >=5.6.0
- wpsmith/singleton: ^1.0.0
This package is auto-updated.
Last update: 2024-12-25 11:32:56 UTC
README
The Widget
class extends the WordPress Widget class (WP_Widget
) to add some helper methods.
Widget
expects only one method to be implemented: protected function get_defaults()
.
Widget
adds two static methods:
widget_save_inline_js()
: Outputs an inline admin script that autosaves a widget in the WordPress admin area.is_widgets_page()
: Determines whether the current WordPress admin page is the widgets page.