trAvis - MANAGER
Edit File: functions.php
<?php // Exit if accessed directly if ( !defined( 'ABSPATH' ) ) exit; // BEGIN ENQUEUE PARENT ACTION // AUTO GENERATED - Do not modify or remove comment markers above or below: if ( !function_exists( 'chld_thm_cfg_locale_css' ) ): function chld_thm_cfg_locale_css( $uri ){ if ( empty( $uri ) && is_rtl() && file_exists( get_template_directory() . '/rtl.css' ) ) $uri = get_template_directory_uri() . '/rtl.css'; return $uri; } endif; add_filter( 'locale_stylesheet_uri', 'chld_thm_cfg_locale_css' ); if ( !function_exists( 'child_theme_configurator_css' ) ): function child_theme_configurator_css() { wp_enqueue_style( 'chld_thm_cfg_separate', trailingslashit( get_stylesheet_directory_uri() ) . 'ctc-style.css', array( 'hello-elementor','hello-elementor','hello-elementor-theme-style' ) ); } endif; add_action( 'wp_enqueue_scripts', 'child_theme_configurator_css', 10 ); // END ENQUEUE PARENT ACTION // // // 管理画面削除 function hide_admin_menu_items() { global $current_user; get_currentuserinfo(); if ($current_user->user_login == 'nekopanchi') { ?> <style> #menu-dashboard, #menu-pages, #menu-media, #menu-posts-mw-wp-form, #menu-posts-elementor_library, #menu-comments, #toplevel_page_theplus_welcome_page, #toplevel_page_gf_edit_forms, #menu-posts-elementor_library, #menu-users, #menu-tools, #menu-settings, #menu-appearance, #menu-plugins, #toplevel_page_edit-post_type-acf-field-group, #toplevel_page_qlwcdc, #toplevel_page_loco, #toplevel_page_qlwcdc, #toplevel_page_wpseo_dashboard, #toplevel_page_cptui_main_menu, #toplevel_page_yith_plugin_panel { display:none; } </style> <?php } } add_action('admin_head', 'hide_admin_menu_items'); // デフォルトの国を日本に設定 function set_default_country_on_registration( $user_id ) { update_user_meta( $user_id, 'billing_country', 'JP' ); update_user_meta( $user_id, 'shipping_country', 'JP' ); } add_action( 'user_register', 'set_default_country_on_registration', 10, 1 );