$meta_values = get_post_meta($post->ID, '_specifications', true);
echo apply_filters( 'the_content', $meta_values );
$meta_values = get_post_meta($post->ID, '_specifications', true);
echo $meta_values;
add_filter('meta_content', 'wptexturize');
add_filter('meta_content', 'convert_smilies');
add_filter('meta_content', 'convert_chars');
add_filter('meta_content', 'wpautop');
add_filter('meta_content', 'shortcode_unautop');
add_filter('meta_content', 'prepend_attachment');
$unformatted_content = get_post_meta($post->ID, '_specifications', true);
$formatted_content = apply_filters('meta_content', $unformatted_content);
echo $formatted_content;
add_action('admin_init', 'wysiwyg_register_custom_meta_box');
function wysiwyg_register_custom_meta_box() {
add_meta_box(WYSIWYG_META_BOX_ID, __('Характеристики', 'wysiwyg') , 'custom_wysiwyg', 'product');
}
function custom_wysiwyg($post) {
$content = get_post_meta($post->ID, '_specifications', true);
wp_editor(htmlspecialchars_decode($content) , '_specifications', array(
"media_buttons" => true
));
}
function custom_wysiwyg_save_postdata($post_id) {
if (!empty($_POST['_specifications']))
{
$data = htmlspecialchars($_POST['_specifications']);
update_post_meta($post_id, '_specifications', $data);
}
}
add_action('save_post', 'custom_wysiwyg_save_postdata');