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.
|
|
|
|
*
|
2020-08-05 16:36:24 +00:00
|
|
|
* @package WooCommerce\Admin\Meta Boxes
|
2013-08-06 10:41:20 +00:00
|
|
|
* @version 2.1.0
|
|
|
|
*/
|
|
|
|
|
2018-03-13 09:58:33 +00:00
|
|
|
defined( 'ABSPATH' ) || exit;
|
2013-08-06 10:41:20 +00:00
|
|
|
|
|
|
|
/**
|
2015-11-03 12:28:01 +00:00
|
|
|
* WC_Meta_Box_Product_Short_Description Class.
|
2013-08-06 10:41:20 +00:00
|
|
|
*/
|
|
|
|
class WC_Meta_Box_Product_Short_Description {
|
|
|
|
|
|
|
|
/**
|
2015-11-03 12:28:01 +00:00
|
|
|
* Output the metabox.
|
2016-01-04 21:31:36 +00:00
|
|
|
*
|
2018-03-13 09:58:33 +00:00
|
|
|
* @param WP_Post $post Post object.
|
2013-08-06 10:41:20 +00:00
|
|
|
*/
|
|
|
|
public static function output( $post ) {
|
2014-08-31 07:18:21 +00:00
|
|
|
|
2013-08-06 10:41:20 +00:00
|
|
|
$settings = array(
|
2014-08-31 07:18:21 +00:00
|
|
|
'textarea_name' => 'excerpt',
|
|
|
|
'quicktags' => array( 'buttons' => 'em,strong,link' ),
|
|
|
|
'tinymce' => array(
|
2014-02-12 09:49:13 +00:00
|
|
|
'theme_advanced_buttons1' => 'bold,italic,strikethrough,separator,bullist,numlist,separator,blockquote,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,separator,undo,redo,separator',
|
2013-11-25 21:53:40 +00:00
|
|
|
'theme_advanced_buttons2' => '',
|
|
|
|
),
|
2016-08-27 01:46:45 +00:00
|
|
|
'editor_css' => '<style>#wp-excerpt-editor-container .wp-editor-area{height:175px; width:100%;}</style>',
|
2013-08-06 10:41:20 +00:00
|
|
|
);
|
|
|
|
|
2018-03-13 09:58:33 +00:00
|
|
|
wp_editor( htmlspecialchars_decode( $post->post_excerpt, ENT_QUOTES ), 'excerpt', apply_filters( 'woocommerce_product_short_description_editor_settings', $settings ) );
|
2013-08-06 10:41:20 +00:00
|
|
|
}
|
2013-11-25 21:53:40 +00:00
|
|
|
}
|