documents
4 years ago
dynamic-tags
1 year ago
query-control
2 years ago
settings
1 year ago
theme-builder
1 year ago
column.php
1 year ago
common.php
6 months ago
container.php
1 year ago
section.php
1 year ago
templates-types-manager.php
3 years ago
column.php
62 lines
| 1 | <?php |
| 2 | namespace Auxin\Plugin\CoreElements\Elementor\Modules; |
| 3 | |
| 4 | |
| 5 | class Column { |
| 6 | |
| 7 | /** |
| 8 | * Instance of this class. |
| 9 | * |
| 10 | * @var object |
| 11 | */ |
| 12 | protected static $instance = null; |
| 13 | |
| 14 | |
| 15 | public function __construct(){ |
| 16 | // Modify render |
| 17 | add_action( 'elementor/frontend/column/before_render', array( $this, 'modify_render' ) ); |
| 18 | |
| 19 | // Add new controls |
| 20 | // add_action( "elementor/element/column/{$section_id}/after_section_end", array( $this, 'add_controls' ) ); |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Return an instance of this class. |
| 25 | * |
| 26 | * @return object A single instance of this class. |
| 27 | */ |
| 28 | public static function get_instance() { |
| 29 | // If the single instance hasn't been set, set it now. |
| 30 | if ( null == self::$instance ) { |
| 31 | self::$instance = new self; |
| 32 | } |
| 33 | |
| 34 | return self::$instance; |
| 35 | } |
| 36 | |
| 37 | |
| 38 | /** |
| 39 | * Modify the render of column element |
| 40 | * |
| 41 | * @param Element_Column $column Instance of column element |
| 42 | * |
| 43 | * @return void |
| 44 | */ |
| 45 | public function modify_render( $column ){ |
| 46 | // Add parallax initializer to all column elements |
| 47 | $column->add_render_attribute( '_wrapper', 'class', 'aux-parallax-section' ); |
| 48 | } |
| 49 | |
| 50 | /** |
| 51 | * Add extra controls to section element |
| 52 | * |
| 53 | * @param Element_Section $section Instance of Section element |
| 54 | * |
| 55 | * @return void |
| 56 | */ |
| 57 | public function add_controls( $section ){ |
| 58 | |
| 59 | } |
| 60 | |
| 61 | } |
| 62 |