WC_Meta_Box_Product_Short_Description   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 22
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A output() 0 14 1
1
<?php
2
/**
3
 * Product Short Description
4
 *
5
 * Replaces the standard excerpt box.
6
 *
7
 * @package     WooCommerce/Admin/Meta Boxes
8
 * @version     2.1.0
9
 */
10
11
defined( 'ABSPATH' ) || exit;
12
13
/**
14
 * WC_Meta_Box_Product_Short_Description Class.
15
 */
16
class WC_Meta_Box_Product_Short_Description {
17
18
	/**
19
	 * Output the metabox.
20
	 *
21
	 * @param WP_Post $post Post object.
22
	 */
23
	public static function output( $post ) {
24
25
		$settings = array(
26
			'textarea_name' => 'excerpt',
27
			'quicktags'     => array( 'buttons' => 'em,strong,link' ),
28
			'tinymce'       => array(
29
				'theme_advanced_buttons1' => 'bold,italic,strikethrough,separator,bullist,numlist,separator,blockquote,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,separator,undo,redo,separator',
30
				'theme_advanced_buttons2' => '',
31
			),
32
			'editor_css'    => '<style>#wp-excerpt-editor-container .wp-editor-area{height:175px; width:100%;}</style>',
33
		);
34
35
		wp_editor( htmlspecialchars_decode( $post->post_excerpt, ENT_QUOTES ), 'excerpt', apply_filters( 'woocommerce_product_short_description_editor_settings', $settings ) );
36
	}
37
}
38