我的插件打破wordpress编辑图像预览

时间:2016-04-07 17:30:10

标签: php wordpress

我有这个wordpress插件就像一个仪表板...问题是我的代码中的某些东西打破了编辑图像wordpress功能但我无法在我的代码中找到问题,我试着有和没有关闭

       <?php 
    /*
    Plugin Name: SIG DASHBOARD
    Plugin URI: 
    Description: DASHBOARD SIG
    Author: bruno alexandre
    Version: 1.1
    Author URI: 
    */
?>

<?php

function sig_load_plugin_css() {
  $plugin_url = plugin_dir_url( __FILE__ );
  wp_enqueue_style( 'style1', $plugin_url . 'css/style_dash.css' ); }
  add_action( 'admin_head', 'sig_load_plugin_css' );

// load css ** end 



add_action('wp_dashboard_setup', 'add_custom_dashboard_widget4');

function custom_dashboard_widget4() { ?>


<div class="boxes1">
<h2>Toppromomkt</h2> <p>Website</p>
<img src="http://www.toppromomkt.com/wp-content/themes/toppromo/images/adm_logo_toppromo.png">
<ul> <li> <a href='http://www.toppromomkt.com/'> <img class='list1ico' src='http://www.toppromomkt.com/wp-content/themes/toppromo/images/arrowr.png'>Ver Site</a></li><li><a href='http://www.toppromomkt.com/wp-login.php?action=logout&_wpnonce=656cdaeabc'><img class='list1ico' src='http://www.toppromomkt.com/wp-content/themes/toppromo/images/arrowr.png'>Logout</a></li></ul>
<div id="ultimos">
<h3>Design e Programaçao </h3><br><span>D.er Bruno Alexandre <br>  www.kilt-design.com <br>bugs and reports at brunoalex9@msn.com</span>
</div></div>




<?php  }
function add_custom_dashboard_widget4() {
    wp_add_dashboard_widget('custom_dashboard_widget4', 'SIG - Sistema Integrado de Gestão - D.er Bruno Alexandre (design-it-now@hotmail.com)', 'custom_dashboard_widget4');
}



?>

1 个答案:

答案 0 :(得分:0)

我的问题的解决方案是删除文件开头的空格:<?php