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
c5578c58
Commit
c5578c58
authored
11 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
Attribute escaping and updated phpdoc
parent
9dd9a044
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
external-permalinks-redux.php
+10
-7
10 additions, 7 deletions
external-permalinks-redux.php
with
10 additions
and
7 deletions
external-permalinks-redux.php
+
10
−
7
View file @
c5578c58
...
...
@@ -112,11 +112,12 @@ class external_permalinks_redux {
* Render meta box
*
* @param object $post
* @uses get_post_meta
* @uses _e
* @uses esc_attr
* @uses esc_url
* @uses get_post_meta
* @uses selected
* @uses wp_
create_nonce
* @uses wp_
nonce_field
* @return string
*/
function
meta_box
(
$post
)
{
...
...
@@ -124,7 +125,7 @@ class external_permalinks_redux {
?>
<p
class=
"epr-destination"
>
<label
for=
"epr-url"
>
<?php
_e
(
'Destination Address:'
,
'external-permalinks-redux'
);
?>
</label><br
/>
<input
name=
"
<?php
echo
$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
class=
"description"
>
<?php
_e
(
'To restore the original permalink, remove the link entered above.'
,
'external-permalinks-redux'
);
?>
</p>
...
...
@@ -133,7 +134,7 @@ class external_permalinks_redux {
<p
class=
"epr-redirect-type"
>
<label
for=
"epr-type"
>
<?php
_e
(
'Redirect Type:'
,
'external-permalinks-redux'
);
?>
</label>
<select
name=
"
<?php
echo
$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>
<?php
foreach
(
$this
->
status_codes
as
$status_code
=>
$explanation
)
{
echo
'<option value="'
.
esc_attr
(
$status_code
)
.
'"'
;
...
...
@@ -143,8 +144,8 @@ class external_permalinks_redux {
</select>
</p>
<input
type=
"hidden"
name=
"
<?php
echo
$this
->
meta_key_target
;
?>
_nonce"
value=
"
<?php
echo
wp_create_nonce
(
'external-permalinks-redux'
);
?>
"
/>
<?php
wp_nonce_field
(
'external-permalinks-redux'
,
$this
->
meta_key_target
.
'_nonce'
,
false
);
}
/**
...
...
@@ -219,7 +220,7 @@ class external_permalinks_redux {
* @uses get_post_meta
* @uses apply_filters
* @uses wp_redirect
* @action p
re_get_posts
* @action
w
p
* @return null
*/
function
action_wp
()
{
...
...
@@ -244,6 +245,8 @@ class external_permalinks_redux {
/**
* Action changed and function renamed in v1.1.
*
* @uses this::action_add_meta_boxes
*/
public
function
action_admin_init
()
{
$this
->
action_add_meta_boxes
();
...
...
@@ -258,7 +261,7 @@ external_permalinks_redux::get_instance();
* Can be used as an alternative to the epr_post_types filter found in the plugin classes's action_admin_init function.
*
* @param object $post
* @uses
$
external_permalinks_redux
* @uses external_permalinks_redux
* @return string
*/
function
external_permalinks_redux_meta_box
(
$post
)
{
...
...
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