File manager - Edit - /home/carfac/public_html/rephotonet/wordpress/wp-content/plugins/royal-addons/shortcodes/service.php
Back
<?php // Service ([service]) class Royal_Shortcode_Service { public static function service( $atts, $content = null ) { extract( shortcode_atts( array( 'title' => '', 'icon' => '', 'color' => '', 'class' => '', 'sticker' => '', 'sticker_color' => '', ), $atts ) ); return ' <div class="services res-margin' . ( ! empty( $class ) ? ' ' . esc_attr( $class ) : '' ) . '"> <div><i class="' . esc_html( $icon ) . ( ! empty( $sticker ) ? ' sticker-icon' : '' ) . '"' . ( ! empty( $color ) ? ' style="color: ' . esc_attr( $color ) . ';"' : '' ) . '>' . ( ! empty( $sticker ) ? ' ' . self::sticker( array( 'label' => $sticker, 'color' => $sticker_color ) ) : '' ) . '</i></div> <header><h4>' . esc_html( $title ) . '</h4></header><p>' . do_shortcode( $content ) . '</p><div class="clear offsetTopS visible-xs-block"></div></div>'; } public static function vc_service() { vc_map( array( "name" => esc_html__( "Service", "royal-addons" ), "base" => "service", "icon" => 'ti-layout-grid3', "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", "heading" => esc_html__( "Icon library", "royal-addons" ), "value" => array( esc_html__( "Font Awesome", "royal-addons" ) => "fontawesome", ), "admin_label" => false, "param_name" => "type", "description" => "", ), array( "type" => "iconpicker", "heading" => esc_html__( "Icon", "royal-addons" ), "param_name" => "icon", "value" => "", "settings" => array( "emptyIcon" => true, "iconsPerPage" => 4000, ), "dependency" => array( "element" => "type", "value" => "fontawesome", ), ), array( "type" => "colorpicker", "heading" => esc_html__( "Icon Color", "royal-addons" ), "param_name" => "color", "value" => "", "description" => "", "admin_label" => true, ), array( "type" => "textfield", "heading" => esc_html__( "CSS Class", "royal-addons" ), "param_name" => "class", "value" => "", "description" => "", "admin_label" => true, ), array( "type" => "textfield", "heading" => esc_html__( "Sticker Text", "royal-addons" ), "param_name" => "sticker", "value" => "", "description" => "", "admin_label" => true, ), array( "type" => "colorpicker", "heading" => esc_html__( "Sticker Color", "royal-addons" ), "param_name" => "sticker_color", "value" => "", "description" => "", "admin_label" => true, ), ) )); } } add_shortcode( 'service', array( 'Royal_Shortcode_Service', 'service' ) ); add_action( 'vc_before_init', array( 'Royal_Shortcode_Service', 'vc_service' ) );
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.4 |
proxy
|
phpinfo
|
Settings