| Server IP : 104.21.80.248 / Your IP : 162.159.115.42 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/training/wp-content/themes/flatsome/inc/builder/core/server/helpers/ |
Upload File : |
<?php
/**
* Get all registered elements.
*
* @return array
*/
function ux_builder_shortcodes() {
return ux_builder( 'elements' );
}
/**
* Register a shortcode element.
*
* @param string $type The shortcode tag name
* @param array $options
*/
function add_ux_builder_shortcode( $type, $options ) {
ux_builder( 'elements' )->set( $type, $options );
}
/**
* Removes an element.
*
* @param string $type
*/
function ux_builder_remove_element( $type ) {
ux_builder( 'elements' )->remove( $type );
}
function remove_ux_builder_shortcode( $type ) {
ux_builder_remove_element( $type );
}
/**
* Modify registered element.
*
* @param string $type
* @param array $options
*/
function ux_builder_edit_element( $type, $options ) {
ux_builder( 'elements' )->modify( $type, $options );
}
/**
* Get element options from meta data.
*
* @param string $id
* @return array
*/
function ux_builder_element_data( $id ) {
if ( empty( $id ) ) return array();
list( $post_id, $element_id ) = explode( '-', $id );
$meta = get_post_meta( $post_id, '_ux_builder_data', true );
return ! empty( $meta['shortcodes'][$id]['options'] ) ? $meta['shortcodes'][$id]['options'] : array();
}