文件操作 - ionos-journey.php
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/ionos-journey/ionos-journey.php
编辑文件内容
<?php // phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols /** * Plugin Name: Journey * Description: Journey is your guide through WordPress. If you have never used WordPress before, Journey will show you the essential parts of the interface. You can stop and restart your Journey at any time. * Version: 3.0.2 * License: GPLv2 or later * Author: IONOS Group * Author URI: https://www.ionos-group.com/brands.html * Update URI: ionos-journey * Text Domain: ionos-journey * Domain Path: /languages * * @package Ionos\Journey */ /* Copyright 2024 IONOS Group This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Online: http://www.gnu.org/licenses/gpl.txt */ namespace Ionos\Journey; use Ionos\Libraryjourney\Options; use Ionos\Libraryjourney\Updater; $autoloader = __DIR__ . '/vendor/autoload.php'; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound if ( is_readable( $autoloader ) ) { require_once $autoloader; } /** * Init plugin. * * @return void */ function init() { Options::set_plugin_name( 'journey' ); Options::clean_up( __FILE__ ); new Manager(); new Profile(); new Updater(); } \add_action( 'plugins_loaded', 'Ionos\Journey\init' ); /** * Plugin translation. * * @return void */ function load_textdomain() { if ( false !== \strpos( \plugin_dir_path( __FILE__ ), 'mu-plugins' ) ) { \load_muplugin_textdomain( 'ionos-journey', \basename( __DIR__ ) . '/languages' ); } else { \load_plugin_textdomain( 'ionos-journey', false, \dirname( \plugin_basename( __FILE__ ) ) . '/languages/' ); } } \add_action( 'init', 'Ionos\Journey\load_textdomain' ); /** * Disable Gutenberg welcome guide. */ function disable_gutenberg_welcome_guide() { wp_add_inline_script( 'wp-data', "window.onload = function() { const isWelcomeGuidePost = wp.data.select( 'core/edit-post' ).isFeatureActive( 'welcomeGuide' ); const customizeWidgetsSelect = wp.data.select( 'core/edit-widgets' ); let isWelcomeGuideCustomizer; if ( customizeWidgetsSelect ) { isWelcomeGuideCustomizer = customizeWidgetsSelect.__unstableIsFeatureActive( 'welcomeGuide' ); if ( isWelcomeGuideCustomizer ) { wp.data.dispatch( 'core/edit-widgets' ).__unstableToggleFeature( 'welcomeGuide' ); } } if ( isWelcomeGuidePost ) { wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'welcomeGuide' ); } }" ); } add_action( 'enqueue_block_editor_assets', 'Ionos\Journey\disable_gutenberg_welcome_guide', 20 );
修改文件时间
将文件时间修改为当前时间的前一年
删除文件