芝麻web文件管理V1.00
编辑当前文件:/home4/randall/public_html/sl/wp-content/plugins/trx_utils/shortcodes/trx_optional/highlight.php
"", "bg_color" => "", "font_size" => "", "type" => "1", // Common params "id" => "", "class" => "", "css" => "" ), $atts))); $css .= ($color != '' ? 'color:' . esc_attr($color) . ';' : '') .($bg_color != '' ? 'background-color:' . esc_attr($bg_color) . ';' : '') .($font_size != '' ? 'font-size:' . esc_attr(lorem_ipsum_books_media_store_prepare_css_value($font_size)) . '; line-height: 1em;' : ''); $output = '
' . do_shortcode($content) . '
'; return apply_filters('lorem_ipsum_books_media_store_shortcode_output', $output, 'trx_highlight', $atts, $content); } add_shortcode('trx_highlight', 'lorem_ipsum_books_media_store_sc_highlight'); } /* Register shortcode in the internal SC Builder -------------------------------------------------------------------- */ if ( !function_exists( 'lorem_ipsum_books_media_store_sc_highlight_reg_shortcodes' ) ) { //add_action('lorem_ipsum_books_media_store_action_shortcodes_list', 'lorem_ipsum_books_media_store_sc_highlight_reg_shortcodes'); function lorem_ipsum_books_media_store_sc_highlight_reg_shortcodes() { lorem_ipsum_books_media_store_sc_map("trx_highlight", array( "title" => esc_html__("Highlight text", 'trx_utils'), "desc" => wp_kses_data( __("Highlight text with selected color, background color and other styles", 'trx_utils') ), "decorate" => false, "container" => true, "params" => array( "type" => array( "title" => esc_html__("Type", 'trx_utils'), "desc" => wp_kses_data( __("Highlight type", 'trx_utils') ), "value" => "1", "type" => "checklist", "options" => array( 0 => esc_html__('Custom', 'trx_utils'), 1 => esc_html__('Type 1', 'trx_utils'), 2 => esc_html__('Type 2', 'trx_utils'), 3 => esc_html__('Type 3', 'trx_utils') ) ), "color" => array( "title" => esc_html__("Color", 'trx_utils'), "desc" => wp_kses_data( __("Color for the highlighted text", 'trx_utils') ), "divider" => true, "dependency" => array( 'type' => array('0') ), "value" => "", "type" => "color" ), "bg_color" => array( "title" => esc_html__("Background color", 'trx_utils'), "desc" => wp_kses_data( __("Background color for the highlighted text", 'trx_utils') ), "dependency" => array( 'type' => array('0') ), "value" => "", "type" => "color" ), "font_size" => array( "title" => esc_html__("Font size", 'trx_utils'), "desc" => wp_kses_data( __("Font size of the highlighted text (default - in pixels, allows any CSS units of measure)", 'trx_utils') ), "value" => "", "type" => "text" ), "_content_" => array( "title" => esc_html__("Highlighting content", 'trx_utils'), "desc" => wp_kses_data( __("Content for highlight", 'trx_utils') ), "divider" => true, "rows" => 4, "value" => "", "type" => "textarea" ), "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_highlight_reg_shortcodes_vc' ) ) { //add_action('lorem_ipsum_books_media_store_action_shortcodes_list_vc', 'lorem_ipsum_books_media_store_sc_highlight_reg_shortcodes_vc'); function lorem_ipsum_books_media_store_sc_highlight_reg_shortcodes_vc() { vc_map( array( "base" => "trx_highlight", "name" => esc_html__("Highlight text", 'trx_utils'), "description" => wp_kses_data( __("Highlight text with selected color, background color and other styles", 'trx_utils') ), "category" => esc_html__('Content', 'trx_utils'), 'icon' => 'icon_trx_highlight', "class" => "trx_sc_single trx_sc_highlight", "content_element" => true, "is_container" => false, "show_settings_on_create" => true, "params" => array( array( "param_name" => "type", "heading" => esc_html__("Type", 'trx_utils'), "description" => wp_kses_data( __("Highlight type", 'trx_utils') ), "admin_label" => true, "class" => "", "value" => array( esc_html__('Custom', 'trx_utils') => 0, esc_html__('Type 1', 'trx_utils') => 1, esc_html__('Type 2', 'trx_utils') => 2, esc_html__('Type 3', 'trx_utils') => 3 ), "type" => "dropdown" ), array( "param_name" => "color", "heading" => esc_html__("Text color", 'trx_utils'), "description" => wp_kses_data( __("Color for the highlighted text", 'trx_utils') ), "class" => "", 'dependency' => array( 'element' => 'type', 'value' => array('0') ), "value" => "", "type" => "colorpicker" ), array( "param_name" => "bg_color", "heading" => esc_html__("Background color", 'trx_utils'), "description" => wp_kses_data( __("Background color for the highlighted text", 'trx_utils') ), "class" => "", 'dependency' => array( 'element' => 'type', 'value' => array('0') ), "value" => "", "type" => "colorpicker" ), array( "param_name" => "font_size", "heading" => esc_html__("Font size", 'trx_utils'), "description" => wp_kses_data( __("Font size for the highlighted text (default - in pixels, allows any CSS units of measure)", 'trx_utils') ), "class" => "", "value" => "", "type" => "textfield" ), array( "param_name" => "content", "heading" => esc_html__("Highlight text", 'trx_utils'), "description" => wp_kses_data( __("Content for highlight", 'trx_utils') ), "class" => "", "value" => "", "type" => "textarea_html" ), 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') ), 'js_view' => 'VcTrxTextView' ) ); class WPBakeryShortCode_Trx_Highlight extends Lorem_Ipsum_Books_Media_Store_VC_ShortCodeSingle {} } } ?>