| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 2 | public function init() { |
|
| 18 | 2 | $collection = $this->get_collection(); |
|
| 19 | |||
| 20 | // bail if this direction is disabled |
||
| 21 | 2 | if ( $this->get_direction_disabled() ) { |
|
| 22 | 2 | return; |
|
| 23 | } |
||
| 24 | |||
| 25 | // create subitem and its collection and assign it |
||
| 26 | 1 | $html = $this->get_direction_html(); |
|
| 27 | 1 | $page = $this->get_direction_page_number(); |
|
| 28 | 1 | $subitems_collection = Carbon_Pagination_Item_Page::generate_single_subitem_collection( $collection, $html, $page ); |
|
| 29 | 1 | $this->set_subitems_collection( $subitems_collection ); |
|
| 30 | 1 | } |
|
| 31 | |||
| 57 | } |