Passed
Push — master ( ba9f8c...e5263a )
by Brian
11:48
created

GetPaid_Meta_Box_Description::output()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 10
nc 1
nop 1
dl 0
loc 15
rs 9.9332
c 1
b 0
f 0
1
<?php
2
/**
3
 * Description metabox.
4
 *
5
 * Replaces the standard excerpt box.
6
 *
7
 */
8
9
defined( 'ABSPATH' ) || exit;
10
11
/**
12
 * GetPaid_Meta_Box_Description Class.
13
 */
14
class GetPaid_Meta_Box_Description {
15
16
	/**
17
	 * Output the metabox.
18
	 *
19
	 * @param WP_Post $post Post object.
20
	 */
21
	public static function output( $post ) {
22
23
		$settings = array(
24
			'textarea_name' => 'excerpt',
25
			'quicktags'     => array( 'buttons' => 'em,strong,link' ),
26
			'teeny'         => true,
27
			'media_buttons' => false,
28
			'tinymce'       => array(
29
				'theme_advanced_buttons1' => 'bold,italic,strikethrough,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( 'getpaid_description_editor_settings', $settings ) );
36
	}
37
}
38