芝麻web文件管理V1.00
编辑当前文件:/home4/randall/public_html/sl/wp-content/plugins/trx_utils/shortcodes/trx_basic/search.php
"", "state" => "", "ajax" => "", "title" => esc_html__('Search', 'trx_utils'), "scheme" => "original", // Common params "id" => "", "class" => "", "animation" => "", "css" => "", "top" => "", "bottom" => "", "left" => "", "right" => "" ), $atts))); $class .= ($class ? ' ' : '') . lorem_ipsum_books_media_store_get_css_position_as_classes($top, $right, $bottom, $left); if ($style == 'fullscreen') { if (empty($ajax)) $ajax = "no"; if (empty($state)) $state = "closed"; } else if ($style == 'expand') { if (empty($ajax)) $ajax = lorem_ipsum_books_media_store_get_theme_option('use_ajax_search'); if (empty($state)) $state = "closed"; } else if ($style == 'slide') { if (empty($ajax)) $ajax = lorem_ipsum_books_media_store_get_theme_option('use_ajax_search'); if (empty($state)) $state = "closed"; } else { if (empty($ajax)) $ajax = lorem_ipsum_books_media_store_get_theme_option('use_ajax_search'); if (empty($state)) $state = "fixed"; } // Load core messages lorem_ipsum_books_media_store_enqueue_messages(); $output = '
' . ($style == 'fullscreen' ? '
' : '') . '
' . (lorem_ipsum_books_media_store_param_is_on($ajax) ? '
' : '') . '
'; return apply_filters('lorem_ipsum_books_media_store_shortcode_output', $output, 'trx_search', $atts, $content); } add_shortcode('trx_search', 'lorem_ipsum_books_media_store_sc_search'); } /* Register shortcode in the internal SC Builder -------------------------------------------------------------------- */ if ( !function_exists( 'lorem_ipsum_books_media_store_sc_search_reg_shortcodes' ) ) { //add_action('lorem_ipsum_books_media_store_action_shortcodes_list', 'lorem_ipsum_books_media_store_sc_search_reg_shortcodes'); function lorem_ipsum_books_media_store_sc_search_reg_shortcodes() { lorem_ipsum_books_media_store_sc_map("trx_search", array( "title" => esc_html__("Search", 'trx_utils'), "desc" => wp_kses_data( __("Show search form", 'trx_utils') ), "decorate" => false, "container" => false, "params" => array( "style" => array( "title" => esc_html__("Style", 'trx_utils'), "desc" => wp_kses_data( __("Select style to display search field", 'trx_utils') ), "value" => "regular", "options" => lorem_ipsum_books_media_store_get_list_search_styles(), "type" => "checklist" ), "state" => array( "title" => esc_html__("State", 'trx_utils'), "desc" => wp_kses_data( __("Select search field initial state", 'trx_utils') ), "value" => "fixed", "options" => array( "fixed" => esc_html__('Fixed', 'trx_utils'), "opened" => esc_html__('Opened', 'trx_utils'), "closed" => esc_html__('Closed', 'trx_utils') ), "type" => "checklist" ), "title" => array( "title" => esc_html__("Title", 'trx_utils'), "desc" => wp_kses_data( __("Title (placeholder) for the search field", 'trx_utils') ), "value" => esc_html__("Search …", 'trx_utils'), "type" => "text" ), "ajax" => array( "title" => esc_html__("AJAX", 'trx_utils'), "desc" => wp_kses_data( __("Search via AJAX or reload page", 'trx_utils') ), "value" => "yes", "options" => lorem_ipsum_books_media_store_get_sc_param('yes_no'), "type" => "switch" ), "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'), "animation" => lorem_ipsum_books_media_store_get_sc_param('animation'), "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_search_reg_shortcodes_vc' ) ) { //add_action('lorem_ipsum_books_media_store_action_shortcodes_list_vc', 'lorem_ipsum_books_media_store_sc_search_reg_shortcodes_vc'); function lorem_ipsum_books_media_store_sc_search_reg_shortcodes_vc() { vc_map( array( "base" => "trx_search", "name" => esc_html__("Search form", 'trx_utils'), "description" => wp_kses_data( __("Insert search form", 'trx_utils') ), "category" => esc_html__('Content', 'trx_utils'), 'icon' => 'icon_trx_search', "class" => "trx_sc_single trx_sc_search", "content_element" => true, "is_container" => false, "show_settings_on_create" => true, "params" => array( array( "param_name" => "style", "heading" => esc_html__("Style", 'trx_utils'), "description" => wp_kses_data( __("Select style to display search field", 'trx_utils') ), "class" => "", "value" => lorem_ipsum_books_media_store_get_list_search_styles(), "type" => "dropdown" ), array( "param_name" => "state", "heading" => esc_html__("State", 'trx_utils'), "description" => wp_kses_data( __("Select search field initial state", 'trx_utils') ), "class" => "", "value" => array( esc_html__('Fixed', 'trx_utils') => "fixed", esc_html__('Opened', 'trx_utils') => "opened", esc_html__('Closed', 'trx_utils') => "closed" ), "type" => "dropdown" ), array( "param_name" => "title", "heading" => esc_html__("Title", 'trx_utils'), "description" => wp_kses_data( __("Title (placeholder) for the search field", 'trx_utils') ), "admin_label" => true, "class" => "", "value" => esc_html__("Search …", 'trx_utils'), "type" => "textfield" ), array( "param_name" => "ajax", "heading" => esc_html__("AJAX", 'trx_utils'), "description" => wp_kses_data( __("Search via AJAX or reload page", 'trx_utils') ), "class" => "", "value" => array(esc_html__('Use AJAX search', 'trx_utils') => 'yes'), "type" => "checkbox" ), 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('animation'), 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_Search extends Lorem_Ipsum_Books_Media_Store_VC_ShortCodeSingle {} } } ?>