-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add namespace to prevent linting error and move noop functions out of…
… the namespace to ensure they are global
- Loading branch information
Showing
5 changed files
with
37 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
use WP_CLI\DB\WP_SQLite_Export; | ||
use WP_CLI\DB\WP_SQLite_Import; | ||
use WP_CLI\Formatter; | ||
use WP_CLI\Utils; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
/** | ||
* While using the SQLite database integration plugin for the import and export command, do_action and | ||
* apply_filters are used to hook into the WordPress core. These functions might not be available in | ||
* the context of the import and export commands of the WP-CLI. To prevent the fatal error, we can | ||
* define these functions as no-op functions. | ||
*/ | ||
|
||
if ( ! function_exists( 'do_action' ) ) { | ||
function do_action() {} // phpcs:ignore | ||
} | ||
|
||
if ( ! function_exists( 'apply_filters' ) ) { | ||
function apply_filters() {} // phpcs:ignore | ||
} |