File manager - Edit - /home/carfac/public_html/rephotonet/wordpress/wp-content/plugins/royal-addons/shortcodes/clear.php
Back
<?php // Clear ([clear]) class Royal_Shortcode_Clear { static $columnsCount; static $columnsOffset; public static function clear( $atts, $content = null ) { extract( shortcode_atts( array( 'gap' => '0px', 'class' => '' ), $atts ) ); $gap = intval( $gap ); $before = $attributes = ''; if ( self::$columnsCount > 0 ) { self::$columnsCount = self::$columnsOffset = 0; $before = '</div>'; } $gap = intval( $gap ); if ( $gap > 0 ) { if ( $gap == 20 ) $class .= ' offsetTopS'; else if ( $gap == 60 ) $class .= ' offsetTop'; else if ( $gap == 80 ) $class .= ' offsetTopL'; else if ( $gap == 120 ) $class .= ' offsetTopX'; else { $attributes = ' style="padding-top: ' . intval( $gap ) . 'px;"'; } } return $before . '<div class="clear' . ( ! empty( $class ) ? ' ' . trim( esc_attr( $class ) ) : '' ) . '"' . $attributes . '></div>'; } public static function vc_clear() { vc_map( array( "name" => esc_html__( "Clear", "royal-addons" ), "base" => "clear", "icon" => 'ti-layout-line-solid', "description" => esc_html__( "Spacer area", "royal-addons" ), "category" => esc_html__( "Royal", "royal-addons" ), "params" => array( array( "type" => "textfield", "heading" => esc_html__( "Gap", "royal-addons" ), "param_name" => "gap", "value" => "0px", "description" => "", "admin_label" => true, ), array( "type" => "textfield", "heading" => esc_html__( "CSS Class", "royal-addons" ), "param_name" => "class", "value" => "", "description" => "", "admin_label" => true, ), ) )); } } add_shortcode( 'clear', array( 'Royal_Shortcode_Clear', 'clear' ) ); add_action( 'vc_before_init', array( 'Royal_Shortcode_Clear', 'vc_clear' ) );
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.25 |
proxy
|
phpinfo
|
Settings