Posts_Widget
Top 10 Widget.
Namespace: WebberZone\Top_Ten\Frontend\Widgets
Since: 3.3.0
Source: includes/frontend/widgets/class-posts-widget.php line 21
Extends: WP_Widget
Methods
__construct()
Register widget with WordPress.
Line: 26
public function __construct( );
form()
Back-end widget form.
Line: 46
public function form( $instance );
| Type | Name | Description |
|---|---|---|
array | $instance | Previously saved values from database. |
update()
Sanitize widget form values as they are saved.
Line: 187
public function update( $new_instance, $old_instance ): array;
| Type | Name | Description |
|---|---|---|
array | $new_instance | Values just sent to be saved. |
array | $old_instance | Previously saved values from database. |
Returns: array — Updated safe values to be saved.
widget()
Front-end display of widget.
Line: 251
public function widget( $args, $instance );
| Type | Name | Description |
|---|---|---|
array | $args | Widget arguments. |
array | $instance | Saved values from database. |
front_end_styles()
Add styles to the front end if the widget is active.
Since: 2.3.0
Line: 336
public function front_end_styles( $args, $instance );
| Type | Name | Description |
|---|---|---|
array | $args | Widget arguments. |
array | $instance | Saved values from database. |