我不知道我在做什么。我正在使用WordPress Plugin Boilerplate
激活空白插件时,我收到以下错误。
Fatal error: Cannot declare class Requests, because the name is already in use in /Applications/MAMP/htdocs/wordpress/wp-content/plugins/requests/includes/class-Requests.php on line 30
以下是第30行之前该页的代码:
<?php
/**
* The file that defines the core plugin class
*
* A class definition that includes attributes and functions used across both the
* public-facing side of the site and the admin area.
*
* @link http://codykaczynski.com
* @since 1.0.0
*
* @package Requests
* @subpackage Requests/includes
*/
/**
* The core plugin class.
*
* This is used to define internationalization, admin-specific hooks, and
* public-facing site hooks.
*
* Also maintains the unique identifier of this plugin as well as the current
* version of the plugin.
*
* @since 1.0.0
* @package Requests
* @subpackage Requests/includes
* @author Cody Kaczynski <[email protected]>
*/
class Requests {
到目前为止,我所做的只是用请求替换PLUGIN\\u NAME及其变体,正如GitHub上的安装说明所述。
很抱歉问了这么一个愚蠢的问题,只是不知道发生了什么事?我对WordPress API或OOP一无所知。
非常感谢。