当然,你可以这样做。听起来在你的安装中添加一个受保护的论坛更有意义,不过。。。但你可以这样做:
// Create the function to output the contents of our Dashboard Widget
function iframe_dashboard_widget_function() {
// Display whatever it is you want to show
echo \'<iframe src="http://www.htmlcommentbox.com" width="100%" height="300" frameBorder="0">Browser not compatible.</iframe>\';
}
// Create the function use in the action hook
function example_add_dashboard_widgets() {
wp_add_dashboard_widget(\'iframe_dashboard_widget\', \'Iframe Dashboard Widget\', \'iframe_dashboard_widget_function\');
}
// Hook into the \'wp_dashboard_setup\' action to register our other functions
add_action(\'wp_dashboard_setup\', \'example_add_dashboard_widgets\' );