是否可以保存内容(在WP WYSIWYG内(the_content
)) 进入自定义字段?
This is what I have so far:
add_action(\'edit_post\', \'save_content_to_field\');
function save_content_to_field($post_ID) {
global $wpdb;
if(!wp_is_post_revision($post_ID)) {
$content = get_the_content($post_ID);
add_post_meta($post_ID, \'desc\', $content, true);
}
}