File manager - Edit - /home/carfac/public_html/rephotonet/wordpress/wp-content/plugins/royal-addons/shortcodes/promotion.php
Back
<?php // Promotion boxes ([promotion]) class Royal_Shortcode_Promotion { public static function promotion( $atts, $content = null ) { extract( shortcode_atts( array( 'title' => '', 'style' => 'one' ), $atts ) ); if ( $style == 'two' ) $classes = ' line-top'; else if ( $style == 'three' ) $classes = ' line-top line-grey'; else $classes = ''; return '<div class="promotion-box' . esc_attr( $classes ) . '"><h4>' . esc_html( $title ) . '</h4><p>' . do_shortcode( $content ) . '</p></div>'; } public static function vc_promotion() { vc_map( array( "name" => esc_html__( "Promotion Box", "royal-addons" ), "base" => "promotion", "icon" => 'ti-ticket', "description" => esc_html__( "Promotion 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__( "Style", "royal-addons" ), "param_name" => "style", "value" => array( esc_html__( "One", "royal-addons" ) => 'one', esc_html__( "Two", "royal-addons" ) => 'two', esc_html__( "Three", "royal-addons" ) => 'three' ), "std" => "info", "description" => "", "admin_label" => true, ), ) )); } } add_shortcode( 'promotion', array( 'Royal_Shortcode_Promotion', 'promotion' ) ); add_action( 'vc_before_init', array( 'Royal_Shortcode_Promotion', 'vc_promotion' ) );
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.25 |
proxy
|
phpinfo
|
Settings