Php WordPress设置api回调函数赢得';t显示器?

Php WordPress设置api回调函数赢得';t显示器?,php,wordpress,Php,Wordpress,大家好,我一直在使用设置API,我的代码不会运行。我有一个名为“kaipo”的选项页,其中的回调函数add_options_page函数将从kaipo_菜单_回调函数输出“hii”。这是我的代码中唯一实际运行的部分。当我声明我的节时,应该输出“hellooo”的函数不会打印,并且我的输入字段也不会显示。i、 e Kaipo_页脚_消息显示和Kaipo_消息显示功能不打印任何内容。我是不是登记错了?请帮帮我 <?php /* * Plugin Name: Kaipo2 * Plugin U

大家好,我一直在使用设置API,我的代码不会运行。我有一个名为“kaipo”的选项页,其中的回调函数add_options_page函数将从kaipo_菜单_回调函数输出“hii”。这是我的代码中唯一实际运行的部分。当我声明我的节时,应该输出“hellooo”的函数不会打印,并且我的输入字段也不会显示。i、 e Kaipo_页脚_消息显示和Kaipo_消息显示功能不打印任何内容。我是不是登记错了?请帮帮我

 <?php
/*
* Plugin Name: Kaipo2
* Plugin URI: http://www.kaipochat.com
* Description: Chat By Interest
* Version: 1.0
* Author: JSL
* Author URI: http://www.kaipochat.com
* License: GPL2
*/

function Kaipo_add_options_page(){

    add_options_page(
        'Kaipo', //text to be displayed in title bar
        'Kaipo', //text displayed to menu
        'administrator', //required capability to users
        'kaipo_menu_page', //slug
        'Kaipo_menu_callback' //callback function
    );
}
//options page display
function Kaipo_menu_callback(){
    echo "hii";
}
//Register a new settings field on the General Settings page of the WordPress dashboard

function Kaipo_initialize_settings_field(){

    //introduce section rendered through the options page
    add_settings_section(
        'footer_section', //ID of field
        'Footer Options', //text used to label field
        'Kaipo_footer_message_display', //callback function to render the field
        'kaipo_menu_page' //ID of the page on which this section is rendered (must match the slug of add_options_page())
    );

    //define settings field
    add_settings_field(
        'footer_message', //ID of the field
        'Footer Message', //Text to label the field
        'Kaipo_message_display', //call back function to render the field
        'kaipo_menu_page',   //the page on which we are rendering the field
        'footer_section' //the section to which we are adding the settings
    );

    //register the 'footer_message' setting with the 'General' section
    register_setting(
        'footer_section',
        'footer_message'
    );
}//end of function

add_action('admin_init', 'Kaipo_initialize_settings_field');

//options page section display
function Kaipo_footer_message_display(){
  echo "helloooooo";
}

//renders the input field for Footer Message in the General Settings section
function Kaipo_message_display(){
    echo '<input type="text" name="footer_message" id="footer_message" value="' . get_option('footer_message') . '" />';
}




add_action('admin_menu', 'Kaipo_add_options_page');

你激活了你的插件吗?是的,我激活了。它没有显示在管理员中?只有“hii”。我想显示“helooo”和我的表单输入函数kaipo_message_display(),但我看不到。有什么想法吗?也可以试试这个插件