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