File manager - Edit - /home/carfac/public_html/rephotonet/wordpress/wp-content/plugins/royal-addons/shortcodes/sticker.php
Back
<?php // Stickers ([sticker]) class Royal_Shortcode_Sticker { public static function sticker( $atts, $content = null ) { extract( shortcode_atts( array( 'label' => '', 'color' => '', 'icon' => '', ), $atts ) ); if ( $color != 'green' and $color != 'blue' and $color != 'orange' and $color != 'red' ) { $color = ''; } return ( ! empty( $icon ) ? '<i class="' . esc_attr( $icon ) . ' sticker-icon">' : '' ) . '<span class="sticker' . ( ! empty( $color ) ? ' ' . esc_attr( $color ) : '' ) . '">' . esc_html( $label ) . '</span>' . ( ! empty( $icon ) ? '</i>' : '' ); } public static function vc_sticker() { vc_map( array( "name" => esc_html__( "Sticker", "royal-addons" ), "base" => "sticker", "icon" => 'ti-spray', "description" => esc_html__( "Sticker over words", "royal-addons" ), "category" => esc_html__( "Royal", "royal-addons" ), "params" => array( array( "type" => "textfield", "heading" => esc_html__( "Label", "royal-addons" ), "param_name" => "label", "value" => "", "description" => "", "admin_label" => true, ), array( "type" => "dropdown", "holder" => "div", "class" => "", "heading" => esc_html__( "Color", "royal-addons" ), "param_name" => "color", "value" => array( esc_html__( "Default", "royal-addons" ) => '', esc_html__( "Red", "royal-addons" ) => 'red', esc_html__( "Orange", "royal-addons" ) => 'orange', esc_html__( "Green", "royal-addons" ) => 'green', esc_html__( "Blue", "royal-addons" ) => 'blue' ), "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 Button", "royal-addons" ), "param_name" => "icon", "value" => "", "settings" => array( "emptyIcon" => true, "iconsPerPage" => 4000, ), "dependency" => array( "element" => "type", "value" => "fontawesome", ), ), ) )); } } add_shortcode( 'sticker', array( 'Royal_Shortcode_Sticker', 'sticker' ) ); add_action( 'vc_before_init', array( 'Royal_Shortcode_Sticker', 'vc_sticker' ) );
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.27 |
proxy
|
phpinfo
|
Settings