芝麻web文件管理V1.00
编辑当前文件:/home4/randall/public_html/sl/wp-content/plugins/trx_utils/shortcodes/core.shortcodes.php
0) { foreach ($filters as $flt) add_filter(join('_', $flt), 'lorem_ipsum_books_media_store_sc_clear_around', 1); // Priority 1 to clear spaces before do_shortcodes() } } } } // Enable/Disable shortcodes in the excerpt if (!function_exists('lorem_ipsum_books_media_store_sc_excerpt_shortcodes')) { //add_filter('the_excerpt', 'lorem_ipsum_books_media_store_sc_excerpt_shortcodes'); function lorem_ipsum_books_media_store_sc_excerpt_shortcodes($content) { if (!empty($content)) { $content = do_shortcode($content); } return $content; } } /* // Remove spaces and line breaks between close and open shortcode brackets ][: [trx_columns] [trx_column_item]Column text ...[/trx_column_item] [trx_column_item]Column text ...[/trx_column_item] [trx_column_item]Column text ...[/trx_column_item] [/trx_columns] convert to [trx_columns][trx_column_item]Column text ...[/trx_column_item][trx_column_item]Column text ...[/trx_column_item][trx_column_item]Column text ...[/trx_column_item][/trx_columns] */ if (!function_exists('lorem_ipsum_books_media_store_sc_clear_around')) { function lorem_ipsum_books_media_store_sc_clear_around($content) { if (!empty($content)) $content = preg_replace("/\](\s|\n|\r)*\[/", "][", $content); return $content; } } /* Shortcodes support utils ---------------------------------------------------------------------- */ // Lorem Ipsum Books & Media Store shortcodes load scripts if (!function_exists('lorem_ipsum_books_media_store_sc_load_scripts')) { function lorem_ipsum_books_media_store_sc_load_scripts() { static $loaded = false; if (!$loaded) { wp_enqueue_script( 'lorem-ipsum-books-media-store-shortcodes_admin-script', trx_utils_get_file_url('shortcodes/shortcodes_admin.js'), array('jquery'), null, true ); wp_enqueue_script( 'lorem-ipsum-books-media-store-selection-script', lorem_ipsum_books_media_store_get_file_url('js/jquery.selection.js'), array('jquery'), null, true ); wp_localize_script( 'lorem-ipsum-books-media-store-shortcodes_admin-script', 'LOREM_IPSUM_BOOKS_MEDIA_STORE_SHORTCODES_DATA', lorem_ipsum_books_media_store_storage_get('shortcodes') ); $loaded = true; } } } // Lorem Ipsum Books & Media Store shortcodes prepare scripts if (!function_exists('lorem_ipsum_books_media_store_sc_prepare_scripts')) { function lorem_ipsum_books_media_store_sc_prepare_scripts() { static $prepared = false; if (!$prepared) { lorem_ipsum_books_media_store_storage_set_array('js_vars', 'shortcodes_cp', is_admin() ? (!lorem_ipsum_books_media_store_storage_empty('to_colorpicker') ? lorem_ipsum_books_media_store_storage_get('to_colorpicker') : 'wp') : 'custom'); // wp | tiny | custom $prepared = true; } } } // Show shortcodes list in admin editor if (!function_exists('lorem_ipsum_books_media_store_sc_selector_add_in_toolbar')) { //add_action('media_buttons','lorem_ipsum_books_media_store_sc_selector_add_in_toolbar', 11); function lorem_ipsum_books_media_store_sc_selector_add_in_toolbar(){ if ( !lorem_ipsum_books_media_store_options_is_used() ) return; lorem_ipsum_books_media_store_sc_load_scripts(); lorem_ipsum_books_media_store_sc_prepare_scripts(); $shortcodes = lorem_ipsum_books_media_store_storage_get('shortcodes'); $shortcodes_list = '
'.esc_html__('- Select Shortcode -', 'trx_utils').'
'; if (is_array($shortcodes) && count($shortcodes) > 0) { foreach ($shortcodes as $idx => $sc) { $shortcodes_list .= '
'.esc_html($sc['title']).'
'; } } $shortcodes_list .= '
'; lorem_ipsum_books_media_store_show_layout($shortcodes_list); } } // Lorem Ipsum Books & Media Store shortcodes builder settings require_once trx_utils_get_file_dir('shortcodes/shortcodes_settings.php'); // VC shortcodes settings if ( class_exists('WPBakeryShortCode') ) { require_once trx_utils_get_file_dir('shortcodes/shortcodes_vc.php'); } // Lorem Ipsum Books & Media Store shortcodes implementation // Using get_template_part(), because shortcodes can be replaced in the child theme require_once trx_utils_get_file_dir('shortcodes/trx_basic/anchor.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/audio.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/blogger.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/br.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/call_to_action.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/chat.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/columns.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/content.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/form.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/googlemap.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/hide.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/image.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/infobox.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/intro.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/line.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/list.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/price_block.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/promo.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/quote.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/reviews.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/section.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/skills.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/slider.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/socials.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/table.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/title.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/twitter.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/video.php'); require_once trx_utils_get_file_dir('shortcodes/trx_basic/search.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/accordion.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/button.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/countdown.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/dropcaps.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/emailer.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/gap.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/highlight.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/icon.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/number.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/parallax.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/popup.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/price.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/tabs.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/toggles.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/tooltip.php'); require_once trx_utils_get_file_dir('shortcodes/trx_optional/zoom.php'); /** * Shortcodes from CPTs */ require_once trx_utils_get_file_dir('shortcodes/support_cpt_shortcodes.php'); ?>