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
2
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
0
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
b031b707
Commit
b031b707
authored
5 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
Additional PHPCS fixes
parent
6b06aba0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2
Fix all PHPCS issues
Pipeline
#839
passed with stages
in 2 minutes and 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
external-permalinks-redux.php
+5
-5
5 additions, 5 deletions
external-permalinks-redux.php
with
5 additions
and
5 deletions
external-permalinks-redux.php
+
5
−
5
View file @
b031b707
...
@@ -133,18 +133,18 @@ class external_permalinks_redux {
...
@@ -133,18 +133,18 @@ class external_permalinks_redux {
$type
=
get_post_meta
(
$post
->
ID
,
$this
->
meta_key_type
,
true
);
$type
=
get_post_meta
(
$post
->
ID
,
$this
->
meta_key_type
,
true
);
?>
?>
<p
class=
"epr-destination"
>
<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
)
);
?>
"
/>
<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>
<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-separator"
>
</p>
<p
class=
"epr-redirect-type"
>
<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"
>
<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
<?php
foreach
(
$this
->
status_codes
as
$status_code
=>
$explanation
)
{
foreach
(
$this
->
status_codes
as
$status_code
=>
$explanation
)
{
echo
'<option value="'
.
esc_attr
(
$status_code
)
.
'"'
;
echo
'<option value="'
.
esc_attr
(
$status_code
)
.
'"'
;
...
@@ -165,7 +165,7 @@ class external_permalinks_redux {
...
@@ -165,7 +165,7 @@ class external_permalinks_redux {
* @param int $post_id Post ID.
* @param int $post_id Post ID.
*/
*/
public
function
action_save_post
(
$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.
// Target.
$url
=
isset
(
$_POST
[
$this
->
meta_key_target
.
'_url'
]
)
?
esc_url_raw
(
$_POST
[
$this
->
meta_key_target
.
'_url'
]
)
:
''
;
$url
=
isset
(
$_POST
[
$this
->
meta_key_target
.
'_url'
]
)
?
esc_url_raw
(
$_POST
[
$this
->
meta_key_target
.
'_url'
]
)
:
''
;
...
...
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