AddC Settings
}
function display_after_title () {
?>
}
function display_before_content () {
?>
}
function display_after_content () {
?>
}
function display_AddC_panel_fields() {
add_settings_section("section", null, null, "AddC-options");
add_settings_field("before_title", "Text before the subject", "display_before_title", "AddC-options", "section");
add_settings_field("after_title", "Text after the subject", "display_after_title", "AddC-options", "section");
add_settings_field("before_content", "Text before the content", "display_before_content", "AddC-options", "section");
add_settings_field("after_content", "Text after the content", "display_after_content", "AddC-options", "section");
register_setting("section", "before_title");
register_setting("section", "after_title");
register_setting("section", "before_content");
register_setting("section", "after_content");
}
add_action("admin_init", "display_AddC_panel_fields");
}
else {
add_filter("the_title","TitleAddC");
add_filter("the_content","ContentAddC");
function TitleAddC($title) {
$separator = ' ';
$before_title = get_option("before_title").$separator;
$after_title = get_option("after_title").$separator;
return $before_title.$title.$after_title;
}
function ContentAddC($content) {
$separator = ' ';
$before_content = get_option("before_content").$separator;
$after_content = get_option("after_content").$separator;
return $before_content.$content.$after_content;
}
}
?>