Fix code quality issues and improve test framework
This commit is contained in:
@@ -43,9 +43,6 @@ class Admin {
|
||||
*
|
||||
* This method is hooked into 'admin_enqueue_scripts'. It checks if the current
|
||||
* screen is relevant to the plugin before enqueueing assets.
|
||||
|
||||
|
||||
*
|
||||
*/
|
||||
public function enqueue_admin_assets(): void {
|
||||
|
||||
|
||||
@@ -21,4 +21,4 @@ if ( is_multisite() ) {
|
||||
|
||||
## Testing
|
||||
|
||||
For information on testing your plugin in a multisite environment, see the [Testing Framework](.wiki/Testing-Framework.md) documentation.
|
||||
For information on testing your plugin in a multisite environment, see the [Testing Framework](../../.wiki/Testing-Framework.md) documentation.
|
||||
|
||||
@@ -36,7 +36,7 @@ class Multisite {
|
||||
*
|
||||
* @return bool Always returns true.
|
||||
*/
|
||||
public function is_multisite_compatible() {
|
||||
public function isMultisiteCompatible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -45,9 +45,9 @@ class Multisite {
|
||||
*
|
||||
* @return array An empty array as this is just a placeholder.
|
||||
*/
|
||||
public function get_network_sites() {
|
||||
public function getNetworkSites() {
|
||||
// This is just a placeholder method.
|
||||
// In a real implementation, you might use get_sites() or a custom query.
|
||||
return array();
|
||||
return function_exists('get_sites') ? get_sites(['public' => 1]) : array();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user