芝麻web文件管理V1.00
编辑当前文件:/home4/randall/public_html/sl/wp-content/plugins/trx_utils/shortcodes/trx_optional/price.php
"", "currency" => "$", "period" => "", "align" => "", // Common params "id" => "", "class" => "", "css" => "", "top" => "", "bottom" => "", "left" => "", "right" => "" ), $atts))); $output = ''; if (!empty($money)) { $class .= ($class ? ' ' : '') . lorem_ipsum_books_media_store_get_css_position_as_classes($top, $right, $bottom, $left); $m = explode('.', str_replace(',', '.', $money)); $output = '
' . '
'.($currency).'
' . '
'.($m[0]).'
' . (!empty($m[1]) ? '
' : '') . (!empty($m[1]) ? '
'.($m[1]).'
' : '') . (!empty($period) ? '
'.($period).'
' : (!empty($m[1]) ? '
' : '')) . (!empty($m[1]) ? '
' : '') . '
'; } return apply_filters('lorem_ipsum_books_media_store_shortcode_output', $output, 'trx_price', $atts, $content); } add_shortcode('trx_price', 'lorem_ipsum_books_media_store_sc_price'); } /* Register shortcode in the internal SC Builder -------------------------------------------------------------------- */ if ( !function_exists( 'lorem_ipsum_books_media_store_sc_price_reg_shortcodes' ) ) { //add_action('lorem_ipsum_books_media_store_action_shortcodes_list', 'lorem_ipsum_books_media_store_sc_price_reg_shortcodes'); function lorem_ipsum_books_media_store_sc_price_reg_shortcodes() { lorem_ipsum_books_media_store_sc_map("trx_price", array( "title" => esc_html__("Price", 'trx_utils'), "desc" => wp_kses_data( __("Insert price with decoration", 'trx_utils') ), "decorate" => false, "container" => false, "params" => array( "money" => array( "title" => esc_html__("Money", 'trx_utils'), "desc" => wp_kses_data( __("Money value (dot or comma separated)", 'trx_utils') ), "value" => "", "type" => "text" ), "currency" => array( "title" => esc_html__("Currency", 'trx_utils'), "desc" => wp_kses_data( __("Currency character", 'trx_utils') ), "value" => "$", "type" => "text" ), "period" => array( "title" => esc_html__("Period", 'trx_utils'), "desc" => wp_kses_data( __("Period text (if need). For example: monthly, daily, etc.", 'trx_utils') ), "value" => "", "type" => "text" ), "align" => array( "title" => esc_html__("Alignment", 'trx_utils'), "desc" => wp_kses_data( __("Align price to left or right side", 'trx_utils') ), "value" => "", "type" => "checklist", "dir" => "horizontal", "options" => lorem_ipsum_books_media_store_get_sc_param('float') ), "top" => lorem_ipsum_books_media_store_get_sc_param('top'), "bottom" => lorem_ipsum_books_media_store_get_sc_param('bottom'), "left" => lorem_ipsum_books_media_store_get_sc_param('left'), "right" => lorem_ipsum_books_media_store_get_sc_param('right'), "id" => lorem_ipsum_books_media_store_get_sc_param('id'), "class" => lorem_ipsum_books_media_store_get_sc_param('class'), "css" => lorem_ipsum_books_media_store_get_sc_param('css') ) )); } } /* Register shortcode in the VC Builder -------------------------------------------------------------------- */ if ( !function_exists( 'lorem_ipsum_books_media_store_sc_price_reg_shortcodes_vc' ) ) { //add_action('lorem_ipsum_books_media_store_action_shortcodes_list_vc', 'lorem_ipsum_books_media_store_sc_price_reg_shortcodes_vc'); function lorem_ipsum_books_media_store_sc_price_reg_shortcodes_vc() { vc_map( array( "base" => "trx_price", "name" => esc_html__("Price", 'trx_utils'), "description" => wp_kses_data( __("Insert price with decoration", 'trx_utils') ), "category" => esc_html__('Content', 'trx_utils'), 'icon' => 'icon_trx_price', "class" => "trx_sc_single trx_sc_price", "content_element" => true, "is_container" => false, "show_settings_on_create" => true, "params" => array( array( "param_name" => "money", "heading" => esc_html__("Money", 'trx_utils'), "description" => wp_kses_data( __("Money value (dot or comma separated)", 'trx_utils') ), "admin_label" => true, "class" => "", "value" => "", "type" => "textfield" ), array( "param_name" => "currency", "heading" => esc_html__("Currency symbol", 'trx_utils'), "description" => wp_kses_data( __("Currency character", 'trx_utils') ), "admin_label" => true, "class" => "", "value" => "$", "type" => "textfield" ), array( "param_name" => "period", "heading" => esc_html__("Period", 'trx_utils'), "description" => wp_kses_data( __("Period text (if need). For example: monthly, daily, etc.", 'trx_utils') ), "admin_label" => true, "class" => "", "value" => "", "type" => "textfield" ), array( "param_name" => "align", "heading" => esc_html__("Alignment", 'trx_utils'), "description" => wp_kses_data( __("Align price to left or right side", 'trx_utils') ), "admin_label" => true, "class" => "", "value" => array_flip(lorem_ipsum_books_media_store_get_sc_param('float')), "type" => "dropdown" ), lorem_ipsum_books_media_store_get_vc_param('id'), lorem_ipsum_books_media_store_get_vc_param('class'), lorem_ipsum_books_media_store_get_vc_param('css'), lorem_ipsum_books_media_store_get_vc_param('margin_top'), lorem_ipsum_books_media_store_get_vc_param('margin_bottom'), lorem_ipsum_books_media_store_get_vc_param('margin_left'), lorem_ipsum_books_media_store_get_vc_param('margin_right') ) ) ); class WPBakeryShortCode_Trx_Price extends Lorem_Ipsum_Books_Media_Store_VC_ShortCodeSingle {} } } ?>