芝麻web文件管理V1.00
编辑当前文件:/home4/randall/public_html/sl/wp-content/plugins/trx_utils/shortcodes/shortcodes_settings.php
esc_html__("Width", 'trx_utils'), "divider" => true, "value" => $w, "type" => "text" ); } } if ( !function_exists( 'lorem_ipsum_books_media_store_shortcodes_height' ) ) { function lorem_ipsum_books_media_store_shortcodes_height($h='') { return array( "title" => esc_html__("Height", 'trx_utils'), "desc" => wp_kses_data( __("Width and height of the element", 'trx_utils') ), "value" => $h, "type" => "text" ); } } // Return sc_param value if ( !function_exists( 'lorem_ipsum_books_media_store_get_sc_param' ) ) { function lorem_ipsum_books_media_store_get_sc_param($prm) { return lorem_ipsum_books_media_store_storage_get_array('sc_params', $prm); } } // Set sc_param value if ( !function_exists( 'lorem_ipsum_books_media_store_set_sc_param' ) ) { function lorem_ipsum_books_media_store_set_sc_param($prm, $val) { lorem_ipsum_books_media_store_storage_set_array('sc_params', $prm, $val); } } // Add sc settings in the sc list if ( !function_exists( 'lorem_ipsum_books_media_store_sc_map' ) ) { function lorem_ipsum_books_media_store_sc_map($sc_name, $sc_settings) { lorem_ipsum_books_media_store_storage_set_array('shortcodes', $sc_name, $sc_settings); } } // Add sc settings in the sc list after the key if ( !function_exists( 'lorem_ipsum_books_media_store_sc_map_after' ) ) { function lorem_ipsum_books_media_store_sc_map_after($after, $sc_name, $sc_settings='') { lorem_ipsum_books_media_store_storage_set_array_after('shortcodes', $after, $sc_name, $sc_settings); } } // Add sc settings in the sc list before the key if ( !function_exists( 'lorem_ipsum_books_media_store_sc_map_before' ) ) { function lorem_ipsum_books_media_store_sc_map_before($before, $sc_name, $sc_settings='') { lorem_ipsum_books_media_store_storage_set_array_before('shortcodes', $before, $sc_name, $sc_settings); } } // Compare two shortcodes by title if ( !function_exists( 'lorem_ipsum_books_media_store_compare_sc_title' ) ) { function lorem_ipsum_books_media_store_compare_sc_title($a, $b) { return strcmp($a['title'], $b['title']); } } /* Theme setup section -------------------------------------------------------------------- */ if ( !function_exists( 'lorem_ipsum_books_media_store_shortcodes_settings_theme_setup' ) ) { // if ( lorem_ipsum_books_media_store_vc_is_frontend() ) if ( (isset($_GET['vc_editable']) && $_GET['vc_editable']=='true') || (isset($_GET['vc_action']) && $_GET['vc_action']=='vc_inline') ) add_action( 'lorem_ipsum_books_media_store_action_before_init_theme', 'lorem_ipsum_books_media_store_shortcodes_settings_theme_setup', 20 ); else add_action( 'lorem_ipsum_books_media_store_action_after_init_theme', 'lorem_ipsum_books_media_store_shortcodes_settings_theme_setup' ); function lorem_ipsum_books_media_store_shortcodes_settings_theme_setup() { if (lorem_ipsum_books_media_store_shortcodes_is_used()) { // Sort templates alphabetically $tmp = lorem_ipsum_books_media_store_storage_get('registered_templates'); ksort($tmp); lorem_ipsum_books_media_store_storage_set('registered_templates', $tmp); // Prepare arrays lorem_ipsum_books_media_store_storage_set('sc_params', array( // Current element id 'id' => array( "title" => esc_html__("Element ID", 'trx_utils'), "desc" => wp_kses_data( __("ID for current element", 'trx_utils') ), "divider" => true, "value" => "", "type" => "text" ), // Current element class 'class' => array( "title" => esc_html__("Element CSS class", 'trx_utils'), "desc" => wp_kses_data( __("CSS class for current element (optional)", 'trx_utils') ), "value" => "", "type" => "text" ), // Current element style 'css' => array( "title" => esc_html__("CSS styles", 'trx_utils'), "desc" => wp_kses_data( __("Any additional CSS rules (if need)", 'trx_utils') ), "value" => "", "type" => "text" ), // Switcher choises 'list_styles' => array( 'ul' => esc_html__('Unordered', 'trx_utils'), 'ol' => esc_html__('Ordered', 'trx_utils'), 'iconed'=> esc_html__('Iconed', 'trx_utils') ), 'yes_no' => lorem_ipsum_books_media_store_get_list_yesno(), 'on_off' => lorem_ipsum_books_media_store_get_list_onoff(), 'dir' => lorem_ipsum_books_media_store_get_list_directions(), 'align' => lorem_ipsum_books_media_store_get_list_alignments(), 'float' => lorem_ipsum_books_media_store_get_list_floats(), 'hpos' => lorem_ipsum_books_media_store_get_list_hpos(), 'show_hide' => lorem_ipsum_books_media_store_get_list_showhide(), 'sorting' => lorem_ipsum_books_media_store_get_list_sortings(), 'ordering' => lorem_ipsum_books_media_store_get_list_orderings(), 'shapes' => lorem_ipsum_books_media_store_get_list_shapes(), 'sizes' => lorem_ipsum_books_media_store_get_list_sizes(), 'sliders' => lorem_ipsum_books_media_store_get_list_sliders(), 'controls' => lorem_ipsum_books_media_store_get_list_controls(), 'categories'=> is_admin() && lorem_ipsum_books_media_store_get_value_gp('action')=='vc_edit_form' && substr(lorem_ipsum_books_media_store_get_value_gp('tag'), 0, 4)=='trx_' && isset($_POST['params']['post_type']) && $_POST['params']['post_type']!='post' ? lorem_ipsum_books_media_store_get_list_terms(false, lorem_ipsum_books_media_store_get_taxonomy_categories_by_post_type($_POST['params']['post_type'])) : lorem_ipsum_books_media_store_get_list_categories(), 'columns' => lorem_ipsum_books_media_store_get_list_columns(), 'images' => array_merge(array('none'=>"none"), lorem_ipsum_books_media_store_get_list_images(LOREM_IPSUM_BOOKS_MEDIA_STORE_FW_DIR."/images/icons", "png")), 'icons' => array_merge(array("inherit", "none"), lorem_ipsum_books_media_store_get_list_icons()), 'locations' => lorem_ipsum_books_media_store_get_list_dedicated_locations(), 'filters' => lorem_ipsum_books_media_store_get_list_portfolio_filters(), 'formats' => lorem_ipsum_books_media_store_get_list_post_formats_filters(), 'hovers' => lorem_ipsum_books_media_store_get_list_hovers(true), 'hovers_dir'=> lorem_ipsum_books_media_store_get_list_hovers_directions(true), 'schemes' => lorem_ipsum_books_media_store_get_list_color_schemes(true), 'animations' => lorem_ipsum_books_media_store_get_list_animations_in(), 'margins' => lorem_ipsum_books_media_store_get_list_margins(true), 'blogger_styles' => lorem_ipsum_books_media_store_get_list_templates_blogger(), 'forms' => lorem_ipsum_books_media_store_get_list_templates_forms(), 'posts_types' => lorem_ipsum_books_media_store_get_list_posts_types(), 'googlemap_styles' => lorem_ipsum_books_media_store_get_list_googlemap_styles(), 'field_types' => lorem_ipsum_books_media_store_get_list_field_types(), 'label_positions' => lorem_ipsum_books_media_store_get_list_label_positions() ) ); // Common params lorem_ipsum_books_media_store_set_sc_param('animation', array( "title" => esc_html__("Animation", 'trx_utils'), "desc" => wp_kses_data( __('Select animation while object enter in the visible area of page', 'trx_utils') ), "value" => "none", "type" => "select", "options" => lorem_ipsum_books_media_store_get_sc_param('animations') ) ); lorem_ipsum_books_media_store_set_sc_param('top', array( "title" => esc_html__("Top margin", 'trx_utils'), "divider" => true, "value" => "inherit", "type" => "select", "options" => lorem_ipsum_books_media_store_get_sc_param('margins') ) ); lorem_ipsum_books_media_store_set_sc_param('bottom', array( "title" => esc_html__("Bottom margin", 'trx_utils'), "value" => "inherit", "type" => "select", "options" => lorem_ipsum_books_media_store_get_sc_param('margins') ) ); lorem_ipsum_books_media_store_set_sc_param('left', array( "title" => esc_html__("Left margin", 'trx_utils'), "value" => "inherit", "type" => "select", "options" => lorem_ipsum_books_media_store_get_sc_param('margins') ) ); lorem_ipsum_books_media_store_set_sc_param('right', array( "title" => esc_html__("Right margin", 'trx_utils'), "desc" => wp_kses_data( __("Margins around this shortcode", 'trx_utils') ), "value" => "inherit", "type" => "select", "options" => lorem_ipsum_books_media_store_get_sc_param('margins') ) ); lorem_ipsum_books_media_store_storage_set('sc_params', apply_filters('lorem_ipsum_books_media_store_filter_shortcodes_params', lorem_ipsum_books_media_store_storage_get('sc_params'))); // Shortcodes list //------------------------------------------------------------------ lorem_ipsum_books_media_store_storage_set('shortcodes', array()); // Register shortcodes do_action('lorem_ipsum_books_media_store_action_shortcodes_list'); // Sort shortcodes list $tmp = lorem_ipsum_books_media_store_storage_get('shortcodes'); uasort($tmp, 'lorem_ipsum_books_media_store_compare_sc_title'); lorem_ipsum_books_media_store_storage_set('shortcodes', $tmp); } } } ?>