Conditions | 2 |
Paths | 2 |
Total Lines | 24 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function buttons(array $buttons, string $editorId): array |
||
30 | { |
||
31 | if ($editorId !== 'excerpt') { |
||
32 | return $buttons; |
||
33 | } |
||
34 | |||
35 | $buttons = array_values(array_diff($buttons, [ |
||
36 | 'blockquote', |
||
37 | 'bullist', |
||
38 | 'numlist', |
||
39 | 'alignleft', |
||
40 | 'alignright', |
||
41 | 'aligncenter', |
||
42 | 'fullscreen', |
||
43 | ])); |
||
44 | |||
45 | /** |
||
46 | * Control the editor buttons. |
||
47 | * |
||
48 | * @param array $buttons |
||
49 | */ |
||
50 | $buttons = apply_filters('helick_better_excerpt_editor_buttons', $buttons); |
||
51 | |||
52 | return (array)$buttons; |
||
53 | } |
||
55 |