我想在默认的“阅读”选项页面中添加一些选项。我的代码是:
add_settings_section("section_share", __("Sharing & Publishing", "honeycomb-wp"), __NAMESPACE__."\\\\displaySection",
"reading");
register_setting("group_share", "honeycomb-reading-share");
register_setting("group_share", "honeycomb-reading-tweet");
register_setting("group_share", "honeycomb-reading-delay");
register_setting("group_share", "honeycomb-reading-footer");
add_settings_field("honeycomb-reading-share", __("Share", "honeycomb-wp"), __NAMESPACE__."\\\\displayField_share",
"reading", "section_share");
add_settings_field("honeycomb-reading-tweet", __("Tweet", "honeycomb-wp"), __NAMESPACE__."\\\\displayField_tweet",
"reading", "section_share");
add_settings_field("honeycomb-reading-delay", __("Delay", "honeycomb-wp"), __NAMESPACE__."\\\\displayField_delay",
"reading", "section_share");
add_settings_field("honeycomb-reading-footer", __("Footer in RSS", "honeycomb-wp"), __NAMESPACE__."\\\\displayField_footer",
"reading", "section_share");
(在admin\\u init挂钩中)。这会在页面上很好地显示选项,但不会保存它们。是否有一个钩子用于此,或者是否无法在此页面中添加额外的部分?