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
Merge requests
!2
Fix all PHPCS issues
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix all PHPCS issues
fix/phpcs
into
master
Overview
0
Commits
5
Pipelines
4
Changes
3
Merged
Erick Hitter
requested to merge
fix/phpcs
into
master
6 years ago
Overview
0
Commits
5
Pipelines
4
Changes
1
Expand
0
0
Merge request reports
Compare
version 2
version 3
b031b707
6 years ago
version 2
1cc5afcd
6 years ago
version 1
67f5acbf
6 years ago
master (base)
and
version 3
latest version
b3381726
5 commits,
6 years ago
version 3
b031b707
4 commits,
6 years ago
version 2
1cc5afcd
2 commits,
6 years ago
version 1
67f5acbf
1 commit,
6 years ago
Show latest version
1 file
+
7
−
8
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
external-permalinks-redux.php
+
7
−
8
Options
@@ -133,22 +133,22 @@ class external_permalinks_redux {
$type
=
get_post_meta
(
$post
->
ID
,
$this
->
meta_key_type
,
true
);
?>
<p
class=
"epr-destination"
>
<label
for=
"epr-url"
>
<?php
_e
(
'Destination Address:'
,
'external-permalinks-redux'
);
?>
</label><br
/>
<label
for=
"epr-url"
>
<?php
esc_html
_e
(
'Destination Address:'
,
'external-permalinks-redux'
);
?>
</label><br
/>
<input
name=
"
<?php
echo
esc_attr
(
$this
->
meta_key_target
);
?>
_url"
class=
"large-text code"
id=
"epr-url"
type=
"text"
value=
"
<?php
echo
esc_url
(
get_post_meta
(
$post
->
ID
,
$this
->
meta_key_target
,
true
)
);
?>
"
/>
</p>
<p
class=
"description"
>
<?php
_e
(
'To restore the original permalink, remove the link entered above.'
,
'external-permalinks-redux'
);
?>
</p>
<p
class=
"description"
>
<?php
esc_html
_e
(
'To restore the original permalink, remove the link entered above.'
,
'external-permalinks-redux'
);
?>
</p>
<p
class=
"epr-separator"
>
</p>
<p
class=
"epr-redirect-type"
>
<label
for=
"epr-type"
>
<?php
_e
(
'Redirect Type:'
,
'external-permalinks-redux'
);
?>
</label>
<label
for=
"epr-type"
>
<?php
esc_html
_e
(
'Redirect Type:'
,
'external-permalinks-redux'
);
?>
</label>
<select
name=
"
<?php
echo
esc_attr
(
$this
->
meta_key_target
);
?>
_type"
id=
"epr-type"
>
<option
value=
""
>
<?php
_e
(
'-- Select --'
,
'external-permalinks-redux'
);
?>
</option>
<option
value=
""
>
<?php
esc_html
_e
(
'-- Select --'
,
'external-permalinks-redux'
);
?>
</option>
<?php
foreach
(
$this
->
status_codes
as
$status_code
=>
$explanation
)
{
echo
'<option value="'
.
esc_attr
(
$status_code
)
.
'"'
;
echo
selected
(
$status_code
,
int
val
(
$type
)
);
selected
(
$status_code
,
(
int
)
$type
);
echo
'>'
.
esc_attr
(
$explanation
)
.
'</option>'
;
}
?>
@@ -156,8 +156,7 @@ class external_permalinks_redux {
</p>
<?php
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo
wp_nonce_field
(
'external-permalinks-redux'
,
$this
->
meta_key_target
.
'_nonce'
,
false
);
wp_nonce_field
(
'external-permalinks-redux'
,
$this
->
meta_key_target
.
'_nonce'
,
false
);
}
/**
@@ -166,7 +165,7 @@ class external_permalinks_redux {
* @param int $post_id Post ID.
*/
public
function
action_save_post
(
$post_id
)
{
if
(
isset
(
$_POST
[
$this
->
meta_key_target
.
'_nonce'
]
)
&&
wp_verify_nonce
(
sanitize_text_field
(
stripslashes_deep
(
$_POST
[
$this
->
meta_key_target
.
'_nonce'
]
)
),
'external-permalinks-redux'
)
)
{
if
(
isset
(
$_POST
[
$this
->
meta_key_target
.
'_nonce'
]
)
&&
wp_verify_nonce
(
sanitize_text_field
(
$_POST
[
$this
->
meta_key_target
.
'_nonce'
]
),
'external-permalinks-redux'
)
)
{
// Target.
$url
=
isset
(
$_POST
[
$this
->
meta_key_target
.
'_url'
]
)
?
esc_url_raw
(
$_POST
[
$this
->
meta_key_target
.
'_url'
]
)
:
''
;
Loading