我正在为插件添加一个选项。我想在摘要生成器返回curent test变量后添加一个子ix。
所以我的数据在摘录变量中,我想添加变量$summarizer\\u add\\u html\\u trust\\u bulletpoints中的文本。
我该怎么做?
function create_excerpt_product($post_ID) {
global $wpdb;
$excerpt = $wpdb->get_var("SELECT post_excerpt FROM $wpdb->posts WHERE ID = $post_ID");
if(!$excerpt && !$force_rewrite_excerpt) {
require_once(\'config.php\');
// load the correct Document class for the language specified
require_once("lib/$lang/$document[$lang].php");
$content = $wpdb->get_var("SELECT post_content FROM $wpdb->posts WHERE ID = $post_ID");
$title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID = $post_ID");
$doc = new $document[$lang]($title, $content);
// TODO add tags, category and others to the query
$summarizer_add_html_trust_bulletpoints=\'my demo text\' ;
$excerpt = $doc->getSummary($summary_options);
//$excerpt = $excerpt + $summarizer_add_html_trust_bulletpoints ;
$excerpt = esc_sql($excerpt);
$wpdb->query("UPDATE $wpdb->posts SET post_excerpt = \'$excerpt\' WHERE ID = $post_ID");
}
}
?>