文件操作 - wpbakery.php
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/jimbrandstatter/public_html/wp-content/plugins/total-theme-core/inc/wpbakery.php
编辑文件内容
<?php namespace TotalThemeCore; \defined( 'ABSPATH' ) || exit; /** * WPBakery tweaks and custom shortcodes. */ class WPBakery { /** * Init. */ public static function init() { \add_action( 'vc_before_mapping', [ self::class, 'vc_before_mapping' ] ); \add_action( 'vc_load_default_params', [ self::class, 'register_params' ] ); if ( \is_admin() || \totalthemecore_call_static( 'WPBakery\Helpers', 'is_frontend_edit_mode' ) ) { \totalthemecore_init_class( 'WPBakery\Templatera\Enable_Frontend' ); \add_action( 'vc_base_register_admin_css', [ self::class, 'register_editor_css' ] ); \add_action( 'vc_base_register_admin_js', [ self::class, 'register_editor_js' ] ); \add_action( 'vc_backend_editor_enqueue_js_css', [ self::class, 'enqueue_editor_scripts' ] ); \add_action( 'vc_frontend_editor_enqueue_js_css', [ self::class, 'enqueue_editor_scripts' ] ); \add_filter( 'vc_edit_form_enqueue_script', [ self::class, 'add_editor_form_scripts' ] ); } } /** * Run functions before/needed for VC mapping. */ public static function vc_before_mapping(): void { if ( \defined( 'TOTAL_THEME_ACTIVE' ) ) { \add_filter( 'vc_iconpicker-type-ticons', [ 'TotalThemeCore\WPBakery\Iconpicker\Ticons', 'get_icons' ] ); } } /** * Registers custom params. */ public static function register_params(): void { if ( \function_exists( '\vc_add_shortcode_param' ) ) { require_once TTC_PLUGIN_DIR_PATH . 'inc/wpbakery/add-params.php'; } } /** * Register CSS editor scripts. */ public static function register_editor_css(): void { \wp_register_style( 'totalthemecore-wpbakery-editor', TTC_PLUGIN_DIR_URL . 'inc/wpbakery/assets/css/editor.css', [], TTC_VERSION ); \wp_style_add_data( 'totalthemecore-wpbakery-editor', 'rtl', 'replace' ); \wp_register_style( 'totalthemecore-chosen', TTC_PLUGIN_DIR_URL . 'assets/lib/chosen/chosen.min.css', false, '1.4.1' ); } /** * Register JS editor scripts. */ public static function register_editor_js(): void { \wp_register_script( 'totalthemecore-chosen', TTC_PLUGIN_DIR_URL . 'assets/lib/chosen/chosen.jquery.min.js', [ 'jquery' ], '1.4.1', true ); } /** * Enqueue editor scripts. */ public static function enqueue_editor_scripts(): void { \wp_enqueue_style( 'totalthemecore-chosen' ); \wp_enqueue_script( 'totalthemecore-chosen' ); // Must load after chosen for overrides to work. \wp_enqueue_style( 'totalthemecore-wpbakery-editor' ); } /** * Add editor form scripts. * * Custom params js MUST be added it won't work as expected. */ public static function add_editor_form_scripts( $scripts ) { $scripts[] = TTC_PLUGIN_DIR_URL . 'inc/wpbakery/assets/js/params.min.js?v=' . TTC_VERSION; return $scripts; } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件