first commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Elementor\Modules\AtomicWidgets\Library;
|
||||
|
||||
use Elementor\Plugin;
|
||||
|
||||
class Atomic_Widgets_Library {
|
||||
public function register_hooks() {
|
||||
add_action( 'elementor/documents/register', fn() => $this->register_documents() );
|
||||
}
|
||||
|
||||
public function register_documents() {
|
||||
Plugin::$instance->documents
|
||||
->register_document_type( 'e-div-block', Div_Block::get_class_full_name() )
|
||||
->register_document_type( 'e-flexbox', Flexbox::get_class_full_name() );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
namespace Elementor\Modules\AtomicWidgets\Library;
|
||||
|
||||
use Elementor\Modules\Library\Documents\Library_Document;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Elementor Div_Block library document.
|
||||
*
|
||||
* Elementor div block library document handler class is responsible for
|
||||
* handling a document of a div block type.
|
||||
*
|
||||
* @since 3.29.0
|
||||
*/
|
||||
class Div_Block extends Library_Document {
|
||||
|
||||
public static function get_properties() {
|
||||
$properties = parent::get_properties();
|
||||
|
||||
$properties['support_kit'] = true;
|
||||
|
||||
return $properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get document name.
|
||||
*
|
||||
* Retrieve the document name.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
*
|
||||
* @return string Document name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'e-div-block';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get document title.
|
||||
*
|
||||
* Retrieve the document title.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @static
|
||||
*
|
||||
* @return string Document title.
|
||||
*/
|
||||
public static function get_title() {
|
||||
return esc_html__( 'Div Block', 'elementor' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* Return the div block document type.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_type() {
|
||||
return 'e-div-block';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
namespace Elementor\Modules\AtomicWidgets\Library;
|
||||
|
||||
use Elementor\Modules\Library\Documents\Library_Document;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Elementor Flexbox library document.
|
||||
*
|
||||
* Elementor flexbox library document handler class is responsible for
|
||||
* handling a document of a flexbox type.
|
||||
*
|
||||
* @since 3.29.0
|
||||
*/
|
||||
class Flexbox extends Library_Document {
|
||||
|
||||
public static function get_properties() {
|
||||
$properties = parent::get_properties();
|
||||
|
||||
$properties['support_kit'] = true;
|
||||
|
||||
return $properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get document name.
|
||||
*
|
||||
* Retrieve the document name.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
*
|
||||
* @return string Document name.
|
||||
*/
|
||||
public function get_name() {
|
||||
return 'e-flexbox';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get document title.
|
||||
*
|
||||
* Retrieve the document title.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @access public
|
||||
* @static
|
||||
*
|
||||
* @return string Document title.
|
||||
*/
|
||||
public static function get_title() {
|
||||
return esc_html__( 'Flexbox', 'elementor' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* Return the flexbox document type.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_type() {
|
||||
return 'e-flexbox';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user