仪表盘的赞助者列表小部件框架完成

This commit is contained in:
sunxiyuan 2020-04-04 12:06:39 +08:00
parent 3163e2e41c
commit 7dc13d9329
2 changed files with 14 additions and 0 deletions

4
donors_widgets.php Normal file
View file

@ -0,0 +1,4 @@
<?php
echo <<<ETO
Hello,World!
ETO;

View file

@ -22,6 +22,10 @@ class WP_CHINA_YES {
__CLASS__, __CLASS__,
'plugin_row_meta' 'plugin_row_meta'
), 10, 2); ), 10, 2);
add_action('wp_dashboard_setup', array(
__CLASS__,
'donors_widgets'
));
} }
} }
@ -49,4 +53,10 @@ class WP_CHINA_YES {
return $links; return $links;
} }
public static function donors_widgets() {
wp_add_dashboard_widget('custom_help_widget', '《WordPress中国区仓库源建设计划》赞助者', function () {
require_once plugin_dir_path(__FILE__) . 'donors_widgets.php';
});
}
} }