Skip to content

Instantly share code, notes, and snippets.

@digitalchild
Created July 19, 2016 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save digitalchild/f13d44e835a40636e56b5f7c6871c3bb to your computer and use it in GitHub Desktop.
Save digitalchild/f13d44e835a40636e56b5f7c6871c3bb to your computer and use it in GitHub Desktop.
Replace text areas with wp editor on product edit form
<div class="wcv-product-basic wcv-product">
<!-- Product Title -->
<?php WCVendors_Pro_Product_Form::title( $object_id, $product_title ); ?>
<!-- Product Description Editor -->
<label>Product Description</label>
<?php
$editor_args = array(
'editor_height' => 300,
'media_buttons' => false,
);
wp_editor( $product_description, 'post_content', $editor_args );
?>
<!-- Product short description -->
<label>Product short description</label>
<?php
$small_editor_args = array(
'editor_height' => 200,
'media_buttons' => false,
);
wp_editor( $product_short_description, 'post_excerpt', $small_editor_args );
?>
<!-- Product Categories -->
<?php WCVendors_Pro_Product_Form::categories( $object_id, true ); ?>
<!-- Product Tags -->
<?php WCVendors_Pro_Product_Form::tags( $object_id, true ); ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment