Tùy biến plugin wps-hide-login đưa vào trong theme (ok)

C:\xampp82\htdocs\wp2\wp-content\themes\kadence-child\wps-hide-login\composer.json

{
  "name": "wpserveur/wps-hide-login",
  "description": "Protect your website by changing the login URL and preventing access to wp-login.php page and wp-admin directory while not logged-in.",
  "keywords": [
    "rename",
    "login",
    "wp-login",
    "wp-login.php",
    "custom login url"
  ],
  "homepage": "https://wordpress.org/plugins/wps-hide-login/",
  "autoload": {
    "psr-4": {
      "WPS\\WPS_Hide_Login\\": "classes"
    }
  },
  "authors": [
    {
      "name": "WPServeur",
      "email": "nicolas@wpserveur.net",
      "homepage": "https://www.wpserveur.net/",
      "role": "Lead Developer"
    }
  ],
  "type": "wordpress-plugin",
  "minimum-stability": "stable",
  "license": "GPL-3.0+",
  "require": {
    "php": ">=5.6.0"
  }
}

C:\xampp82\htdocs\wp2\wp-content\themes\kadence-child\functions.php

// ==
define('WPS_HIDE_LOGIN_VERSION', '1.9.16');
define('WPS_HIDE_LOGIN_FOLDER', 'wps-hide-login');
define('WPS_HIDE_LOGIN_URL', get_stylesheet_directory_uri());
define('WPS_HIDE_LOGIN_DIR', get_stylesheet_directory() . '/');
define('WPS_HIDE_LOGIN_BASENAME', '/wps-hide-login/wps-hide-login.php');
require_once WPS_HIDE_LOGIN_DIR . '/wps-hide-login/autoload.php';
register_activation_hook( __FILE__, array( '\WPS\WPS_Hide_Login\Plugin', 'activate' ) );
add_action( 'init', 'plugins_loaded_wps_hide_login_plugin' );
function plugins_loaded_wps_hide_login_plugin() {
	\WPS\WPS_Hide_Login\Plugin::get_instance();
	// load_plugin_textdomain( 'wps-hide-login', false, dirname( WPS_HIDE_LOGIN_BASENAME ) . '/languages' );
}

C:\xampp82\htdocs\wp2\wp-content\themes\kadence-child

Chú ý để hoạt động tốt chúng ta cần sửa đoạn sau

Last updated