woocommerce/includes/admin/meta-boxes/class-wc-meta-box-product-s...

41 lines
1.1 KiB
PHP
Raw Normal View History

2013-08-06 10:41:20 +00:00
<?php
/**
2015-11-03 13:53:50 +00:00
* Product Short Description
2013-08-06 10:41:20 +00:00
*
* Replaces the standard excerpt box.
*
* @author WooThemes
* @category Admin
* @package WooCommerce/Admin/Meta Boxes
2013-08-06 10:41:20 +00:00
* @version 2.1.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
2013-08-06 10:41:20 +00:00
/**
* WC_Meta_Box_Product_Short_Description Class.
2013-08-06 10:41:20 +00:00
*/
class WC_Meta_Box_Product_Short_Description {
/**
* Output the metabox.
2013-08-06 10:41:20 +00:00
*/
public static function output( $post ) {
2013-08-06 10:41:20 +00:00
$settings = array(
'textarea_name' => 'excerpt',
'quicktags' => array( 'buttons' => 'em,strong,link' ),
'tinymce' => array(
'theme_advanced_buttons1' => 'bold,italic,strikethrough,separator,bullist,numlist,separator,blockquote,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,separator,undo,redo,separator',
'theme_advanced_buttons2' => '',
),
'editor_css' => '<style>#wp-excerpt-editor-container .wp-editor-area{height:175px; width:100%;}</style>'
2013-08-06 10:41:20 +00:00
);
wp_editor( htmlspecialchars_decode( $post->post_excerpt ), 'excerpt', apply_filters( 'woocommerce_product_short_description_editor_settings', $settings ) );
2013-08-06 10:41:20 +00:00
}
}