accordion-item.php
1 year ago
accordion.php
1 year ago
columns.php
1 year ago
control-group-item.php
1 year ago
control-group.php
1 year ago
div.php
1 year ago
form-group.php
1 year ago
index.php
3 years ago
more-link.php
1 year ago
tab-item.php
1 year ago
tab.php
1 year ago
more-link.php
73 lines
| 1 | <?php |
| 2 | /** |
| 3 | * The file contains the class of More Link Holder. |
| 4 | * |
| 5 | * @author Alex Kovalev <alex.kovalevv@gmail.com> |
| 6 | * @copyright (c) 2018, Webcraftic Ltd |
| 7 | * |
| 8 | * @package factory-forms |
| 9 | * @since 1.0.0 |
| 10 | */ |
| 11 | |
| 12 | // Exit if accessed directly |
| 13 | if( !defined('ABSPATH') ) { |
| 14 | exit; |
| 15 | } |
| 16 | |
| 17 | if( !class_exists('Wbcr_FactoryForms480_MoreLinkHolder') ) { |
| 18 | |
| 19 | /** |
| 20 | * Collapsed Group Holder |
| 21 | * |
| 22 | * @since 1.0.0 |
| 23 | */ |
| 24 | class Wbcr_FactoryForms480_MoreLinkHolder extends Wbcr_FactoryForms480_Holder { |
| 25 | |
| 26 | /** |
| 27 | * A holder type. |
| 28 | * |
| 29 | * @since 1.0.0 |
| 30 | * @var string |
| 31 | */ |
| 32 | public $type = 'more-link'; |
| 33 | |
| 34 | /** |
| 35 | * Here we should render a beginning html of the tab. |
| 36 | * |
| 37 | * @return void |
| 38 | * @since 1.0.0 |
| 39 | */ |
| 40 | public function beforeRendering() |
| 41 | { |
| 42 | $count = isset($this->options['count']) ? $this->options['count'] : 0; |
| 43 | |
| 44 | $id = 'factory-more-link-' . $this->getName(); |
| 45 | |
| 46 | ?> |
| 47 | <div <?php $this->attrs() ?>> |
| 48 | <div class="form-group"> |
| 49 | <div class="control-label col-sm-4"></div> |
| 50 | <div class="control-group col-sm-8"> |
| 51 | <a href="#<?php echo $id ?>" class="factory-more-link-show btn btn-default"><?php $this->title() ?> |
| 52 | (<?php echo $count ?>)</a> |
| 53 | </div> |
| 54 | </div> |
| 55 | <div class='factory-more-link-content' id="<?php echo $id ?>" style="display: none;"> |
| 56 | <a href="#<?php echo $id ?>" class='factory-more-link-hide'><?php _e('hide extra options', 'factory'); ?></a> |
| 57 | <?php |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * Here we should render an end html of the tab. |
| 62 | * |
| 63 | * @return void |
| 64 | * @since 1.0.0 |
| 65 | */ |
| 66 | public function afterRendering() |
| 67 | { |
| 68 | ?> |
| 69 | </div></div> |
| 70 | <?php |
| 71 | } |
| 72 | } |
| 73 | } |