这是我的代码:
class BWP_PostGrid {
function __construct () {
add_action(\'admin_init\', array($this, \'plugin_initializer\'));
add_shortcode(\'bwp_post_grid\', array($this, \'shortcode_callback\'));
add_action(\'wp_enqueue_scripts\', array($this, \'enqueue_scripts\'));
add_action(\'admin_enqueue_scripts\', array($this, \'admin_enqueue_scripts\'));
add_action(\'wp_ajax_bwp_post_grid_get_data\', array($this, \'bwp_post_grid_get_data\'));
add_action(\'wp_ajax_nopriv_bwp_post_grid_get_data\', array($this, \'bwp_post_grid_get_data\'));
}
function plugin_initializer() {
}
function shortcode_callback($shortcode_attributes) {
}
function enqueue_scripts() {
wp_enqueue_style(\'bwp-post-grid-styles\', plugins_url(\'bwp-styles.css\', __FILE__), false);
wp_enqueue_script(\'bwp-post-grid-js\', plugins_url(\'bwp-main.js\', __FILE__), false);
}
function admin_enqueue_scripts() {
}
function bwp_post_grid_get_data() {
}
}
new BWP_PostGrid();
我无法在页面源代码中显示CSS或JavaScript文件。
我还检查了apache错误日志。。。没有错误。