File manager - Edit - /home/carfac/public_html/rephotonet/wordpress/wp-content/plugins/royal-addons/shortcodes/alert.php
Back
<?php // Alert ([alert]) class Royal_Shortcode_Alert { public static function alert( $atts, $content = null ) { extract( shortcode_atts( array( 'title' => '', 'type' => 'info' ), $atts ) ); if ( $type != 'success' and $type != 'info' and $type != 'warning' and $type != 'danger' ) { $type = 'info'; } return '<div class="alert alert-' . $type . '"><h4>' . esc_html( $title ) . '</h4><p>' . do_shortcode( $content ) . '</p></div>'; } public static function vc_alert() { vc_map( array( "name" => esc_html__( "Alert", "royal-addons" ), "base" => "alert", "icon" => 'ti-alert', "description" => esc_html__( "Notification area", "royal-addons" ), "category" => esc_html__( "Royal", "royal-addons" ), "params" => array( array( "type" => "textfield", "heading" => esc_html__( "Title", "royal-addons" ), "param_name" => "title", "value" => "", "description" => "", "admin_label" => true, ), array( "type" => "textarea_html", "heading" => esc_html__( "Text", "royal-addons" ), "param_name" => "content", "value" => "", "description" => "", "admin_label" => true, ), array( "type" => "dropdown", "holder" => "div", "class" => "", "heading" => esc_html__( "Type", "royal-addons" ), "param_name" => "type", "value" => array( esc_html__( "Information", "royal-addons" ) => 'info', esc_html__( "Success", "royal-addons" ) => 'success', esc_html__( "Warning", "royal-addons" ) => 'warning', esc_html__( "Danger", "royal-addons" ) => 'danger' ), "std" => "info", "description" => "", "admin_label" => true, ), ) )); } } add_shortcode( 'alert', array( 'Royal_Shortcode_Alert', 'alert' ) ); add_action( 'vc_before_init', array( 'Royal_Shortcode_Alert', 'vc_alert' ) );
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.41 |
proxy
|
phpinfo
|
Settings