| Conditions | 3 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | protected function transformControl(string $name, array $args): array |
||
| 21 | { |
||
| 22 | $control = parent::transformControl($name, $args); |
||
| 23 | if ('pagination' === $name) { |
||
| 24 | $icons = [ |
||
| 25 | 'ajax' => 'eicon eicon-spinner', |
||
| 26 | 'loadmore' => 'eicon eicon-button', |
||
| 27 | 'true' => 'eicon eicon-redo', |
||
| 28 | ]; |
||
| 29 | $control['label'] = _x('Pagination', 'admin-text', 'site-reviews'); |
||
| 30 | $control['label_block'] = false; |
||
| 31 | $control['type'] = Controls_Manager::CHOOSE; |
||
| 32 | foreach ($control['options'] as $key => $value) { |
||
| 33 | $control['options'][$key] = [ |
||
| 34 | 'icon' => $icons[$key] ?? $icons['ajax'], |
||
| 35 | 'title' => $value, |
||
| 36 | ]; |
||
| 37 | } |
||
| 38 | } |
||
| 39 | return $control; |
||
| 40 | } |
||
| 42 |