Answer the question
In order to leave comments, you need to log in
How to fix an error when activating the plugin?
Good day!
I'm trying to learn the basics of creating plugins for Wordpress, but I ran into this error when I activate the planig:
"Plugin produced 325 characters of unexpected output when activated. If you notice a "headers already sent" error, problems with RSS feeds, or other problems, try deactivating or remove this plugin."
Actually, I tried to google, various options like "change the encoding to UTF-8 without BOM" did not help. The funny thing is that even if the plugin only leaves the table of contents (plugin description), the error will not disappear. The engine is based on Denver, Wordpress version 4.1.3
Kod:
<?php
/*
Plugin Name: Category Adder
Plugin URI: http://wp-example.com
Description: This plugin add new category
Author: Andrew
Version: 1.0
Author URI:
*/
register_activation_hook(__FILE__, 'activate_options');
register_deactivation_hook(__FILE__, 'deactivate_options');
add_action('admin_menu', 'plugin_setting_menu_item');
function plugin_setting_menu_item()
{
add_options_page('RDolls Category Adder', 'RDolls Category Setting', 8, __FILE__, 'plugin_setting_page');
}
function plugin_setting_page()
{
}
?>
Answer the question
In order to leave comments, you need to log in
one.
register_activation_hook(__FILE__, 'activate_options');
add_options_page('RDolls Category Adder', 'RDolls Category Setting', 8, __FILE__, 'plugin_setting_page');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question