-
<? php -
class news extends WP_Widget{ -
function news(){ -
$widget_options=array ('classname '=>'set_contact', 'description'=>'Customize the latest articles'); -
$ this ->WP_Widget( false , 'Latest Articles', $widget_options); -
} -
function widget($instance){ -
include( "widget/news.php" ); -
?> -
<? php -
} -
} -
add_action('widgets_init',create_function( '' , ' return register_widget( "news" );')); -
?>
![weinxin](https://zmingcx.com/wp-content/uploads/2019/08/wx.png)