评论空间太小:请在functions.php
(主题的)文件。插件必须处于活动状态,并且位于其自己的文件夹内/root/wp-content/plugins/$folder
. 您必须在函数中指定插件文件夹的名称
function check_deamon_class() {
// check if plugin is active
// ENTER NAME OF FOLDER HERE:
$folder = \'example_easy_pagination_deamon\'; // Enter the name of the folder in which you got the plugin files here
$plugin_info = \'The pagination deamon plugin is\';
$plugin_info .= !is_plugin_active( $folder ) ? \' not active.\' : \' active.\';
// check if the class can be loaded
$class_info = \'<br />\';
$class_info .= \'The deamon class\';
$class_info .= !class_exists(\'PaginationDeamon\') ? \' was not found.\' : \' was found.\';
$deamon = new oxoPaginationDeamon;
$range = 5;
$deamon_test = $deamon->links( $range );
$info = \'<div style="position: absolute; display: block; width: 200px; height: 100px; background-color: #000; color: #fff; top: 0; left: 0;"><p>\'.$plugin_info.$class_info.\'</p><br />\'.$deamon_test.\'</div>\';
return print $info;
}
if ( function_exists(\'wp_footer\') ) {
add_action( \'wp_footer\', \'check_deamon_class\' );
}
else {
echo \'<div style="position: absolute; display: block; width: 200px; height: 100px; background-color: #000; color: #fff; top: 0; left: 0;"><p>Your Theme has no "wp_footer()" hook to attach the test.</p></div>\';
}
请告诉我您在页面左上角带有白色文本的黑框中收到的注释。