Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
External Permalinks Redux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WP Plugins
External Permalinks Redux
Commits
f4c434f1
Commit
f4c434f1
authored
3 weeks ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
PHPCS
parent
15e3dfe2
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!21
Bump WP compat
Pipeline
#8168
passed
3 weeks ago
Stage: test
Stage: security
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
external-permalinks-redux.php
+3
-0
3 additions, 0 deletions
external-permalinks-redux.php
inc/class-external-permalinks-redux-block-editor.php
+3
-0
3 additions, 0 deletions
inc/class-external-permalinks-redux-block-editor.php
tests/bootstrap.php
+2
-0
2 additions, 0 deletions
tests/bootstrap.php
with
8 additions
and
0 deletions
external-permalinks-redux.php
+
3
−
0
View file @
f4c434f1
...
...
@@ -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'
;
/**
...
...
This diff is collapsed.
Click to expand it.
inc/class-external-permalinks-redux-block-editor.php
+
3
−
0
View file @
f4c434f1
...
...
@@ -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'
);
}
...
...
This diff is collapsed.
Click to expand it.
tests/bootstrap.php
+
2
−
0
View file @
f4c434f1
...
...
@@ -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'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment