Skip to content
Snippets Groups Projects
Commit f4c434f1 authored by Erick Hitter's avatar Erick Hitter
Browse files

PHPCS

parent 15e3dfe2
Branches
Tags
1 merge request!21Bump WP compat
Pipeline #8168 passed
......@@ -24,9 +24,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* @package External_Permalinks_Redux
*
* @phpcs:disable Universal.Files.SeparateFunctionsFromOO.Mixed
*/
// Include block-editor class.
// phpcs:ignore Modernize.FunctionCalls.Dirname.FileConstant
require_once dirname( __FILE__ ) . '/inc/class-external-permalinks-redux-block-editor.php';
/**
......
......@@ -129,11 +129,13 @@ class External_Permalinks_Redux_Block_Editor {
return;
}
// phpcs:ignore Modernize.FunctionCalls.Dirname.FileConstant
$asset_data = require_once dirname( dirname( __FILE__ ) ) . '/assets/build/index.asset.php';
$asset_handle = 'external-permalinks-redux';
wp_enqueue_script(
$asset_handle,
// phpcs:ignore Modernize.FunctionCalls.Dirname.FileConstant
plugins_url( 'assets/build/index.js', dirname( __FILE__ ) ),
$asset_data['dependencies'],
$asset_data['version'],
......@@ -156,6 +158,7 @@ class External_Permalinks_Redux_Block_Editor {
wp_set_script_translations(
$asset_handle,
'external-permalinks-redux',
// phpcs:ignore Modernize.FunctionCalls.Dirname.FileConstant
dirname( dirname( __FILE__ ) ) . '/languages'
);
}
......
......@@ -14,6 +14,7 @@ if ( ! $_tests_dir ) {
}
if ( ! file_exists( $_tests_dir . '/includes/functions.php' ) ) {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo "Could not find $_tests_dir/includes/functions.php, have you run bin/install-wp-tests.sh ?" . PHP_EOL; // WPCS: XSS ok.
exit( 1 );
}
......@@ -25,6 +26,7 @@ require_once $_tests_dir . '/includes/functions.php';
* Manually load the plugin being tested.
*/
function epr__manually_load_plugin() {
// phpcs:ignore Modernize.FunctionCalls.Dirname.FileConstant
require dirname( dirname( __FILE__ ) ) . '/external-permalinks-redux.php';
}
tests_add_filter( 'muplugins_loaded', 'epr__manually_load_plugin' );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment