| Total Complexity | 14 |
| Total Lines | 68 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class Customization |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @return array |
||
| 11 | */ |
||
| 12 | public function filterEditorSettings( array $settings ) |
||
| 13 | { |
||
| 14 | if( $this->isReviewEditable() ) { |
||
| 15 | $settings = [ |
||
| 16 | 'media_buttons' => false, |
||
| 17 | 'quicktags' => false, |
||
| 18 | 'textarea_rows' => 12, |
||
| 19 | 'tinymce' => false, |
||
| 20 | ]; |
||
| 21 | } |
||
| 22 | return $settings; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $html |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | public function filterEditorTextarea( $html ) |
||
| 30 | { |
||
| 31 | if( $this->isReviewEditable() ) { |
||
| 32 | $html = str_replace( '<textarea', '<div id="ed_toolbar"></div><textarea', $html ); |
||
| 33 | } |
||
| 34 | return $html; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return void |
||
| 39 | */ |
||
| 40 | public function removeAutosave() |
||
| 44 | } |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @return void |
||
| 49 | */ |
||
| 50 | public function removeMetaBoxes() |
||
| 51 | { |
||
| 52 | remove_meta_box( 'slugdiv', Application::POST_TYPE, 'advanced' ); |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return bool |
||
| 57 | */ |
||
| 58 | protected function isReviewEditable() |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return bool |
||
| 68 | */ |
||
| 69 | protected function isReviewEditor() |
||
| 75 | } |
||
| 76 | } |
||
| 77 |