Rating: 5 stars
Maybe function wp_aatags_run should be like this below:
function wp_aatags_run($post_ID) {
$tags = get_option(‘wp_aatags_opts’);
$number = get_option(‘wp_aatags_aadnumber’);
global $wpdb;
if (!wp_is_post_revision($post_ID) && !get_the_tags($post_ID)) {
$post_title = get_post($post_ID)->post_title;
$post_content = get_post($post_ID)->post_content;
switch ($tags) {
case 3:
$requix = strtolower($post_title);
break;
case 2:
$requix = strtolower($post_title . ‘ ‘ . wp_trim_words($post_content, 999, ”));
break;
default:
$requix = strtolower($post_title . ‘ ‘ . wp_trim_words($post_content, 333, ”));
break;
}
$body = wp_aatags_keycontents(wp_aatags_html2text($requix), $number);
if ($body != ‘rEr’) {
$keywords = wp_aatags_kwsiconv($body);
wp_add_post_tags($post_ID, $keywords);
} else {
wp_aatags_alts($post_ID, $post_title, $post_content);
}
}
}
Rating: 5 stars
请问能否让插件支持自定义文字类型
]]>