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
03105874
Commit
03105874
authored
2 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
Rebuild
parent
f0fdf6a8
No related branches found
No related tags found
1 merge request
!14
Add native block-editor support
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
assets/build/index.asset.php
+1
-1
1 addition, 1 deletion
assets/build/index.asset.php
assets/build/index.js
+1
-0
1 addition, 0 deletions
assets/build/index.js
assets/src/js/panel-body.js
+20
-25
20 additions, 25 deletions
assets/src/js/panel-body.js
with
22 additions
and
26 deletions
assets/build/index.asset.php
+
1
−
1
View file @
03105874
<?php
return
array
(
'dependencies'
=>
array
(
),
'version'
=>
'31d6cfe0d16ae931b73c
'
);
<?php
return
array
(
'dependencies'
=>
array
(
'wp-components'
,
'wp-compose'
,
'wp-data'
,
'wp-edit-post'
,
'wp-element'
,
'wp-i18n'
,
'wp-plugins'
,
'wp-primitives'
),
'version'
=>
'3d3b163d1105ffebab03
'
);
This diff is collapsed.
Click to expand it.
assets/build/index.js
+
1
−
0
View file @
03105874
(()
=>
{
"
use strict
"
;
const
e
=
window
.
wp
.
element
,
t
=
window
.
wp
.
compose
,
n
=
window
.
wp
.
data
,
r
=
window
.
wp
.
editPost
,
o
=
window
.
wp
.
primitives
,
l
=
(
0
,
e
.
createElement
)(
o
.
SVG
,{
xmlns
:
"
http://www.w3.org/2000/svg
"
,
viewBox
:
"
0 0 24 24
"
},(
0
,
e
.
createElement
)(
o
.
Path
,{
d
:
"
M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z
"
})),
a
=
window
.
wp
.
plugins
,
i
=
window
.
wp
.
components
,
s
=
window
.
wp
.
i18n
,{
metaKeys
:{
target
:
p
,
type
:
c
},
statusCodes
:
m
}
=
externalPermalinksReduxConfig
,
w
=
(
0
,
t
.
compose
)([(
0
,
n
.
withSelect
)((
e
=>
{
const
{
getEditedPostAttribute
:
t
}
=
e
(
"
core/editor
"
),
n
=
t
(
"
meta
"
);
return
{
target
:
n
[
p
],
type
:
n
[
c
]}})),(
0
,
n
.
withDispatch
)((
e
=>
{
const
{
editPost
:
t
}
=
e
(
"
core/editor
"
);
return
{
setTarget
:
e
=>
{
t
({
meta
:{[
p
]:
e
.
trim
()}})},
setType
:
e
=>
{
t
({
meta
:{[
c
]:
parseInt
(
e
,
10
)}})}}}))])((
t
=>
{
let
{
setTarget
:
n
,
setType
:
r
,
target
:
o
,
type
:
l
}
=
t
;
return
(
0
,
e
.
createElement
)(
e
.
Fragment
,
null
,(
0
,
e
.
createElement
)(
i
.
TextControl
,{
label
:(
0
,
s
.
__
)(
"
Destination Address:
"
,
"
external-permalinks-redux
"
),
help
:(
0
,
s
.
__
)(
"
To restore the original permalink, remove the link entered above.
"
,
"
external-permalinks-redux
"
),
onChange
:
n
,
type
:
"
url
"
,
value
:
o
}),(
0
,
e
.
createElement
)(
i
.
SelectControl
,{
label
:(
0
,
s
.
__
)(
"
Redirect Type:
"
,
"
external-permalinks-redux
"
),
onChange
:
r
,
options
:
m
,
value
:
l
}))})),{
postTypes
:
d
}
=
externalPermalinksReduxConfig
,
u
=
"
external-permalinks-redux
"
,
g
=
(
0
,
t
.
compose
)([(
0
,
n
.
withSelect
)((
e
=>
{
const
{
type
:
t
}
=
e
(
"
core/editor
"
).
getCurrentPost
();
return
{
postType
:
t
}}))])((
t
=>
{
let
{
postType
:
n
}
=
t
;
return
n
?(
0
,
e
.
createElement
)(
r
.
PluginDocumentSettingPanel
,{
name
:
u
,
title
:
d
[
n
],
className
:
u
},(
0
,
e
.
createElement
)(
w
,
null
)):
null
}));(
0
,
a
.
registerPlugin
)(
u
,{
icon
:
l
,
render
:
g
})})();
\ No newline at end of file
This diff is collapsed.
Click to expand it.
assets/src/js/panel-body.js
+
20
−
25
View file @
03105874
...
@@ -10,32 +10,27 @@ const {
...
@@ -10,32 +10,27 @@ const {
statusCodes
,
statusCodes
,
}
=
externalPermalinksReduxConfig
;
}
=
externalPermalinksReduxConfig
;
const
View
=
(
{
setTarget
,
setType
,
target
,
type
}
)
=>
{
const
View
=
(
{
setTarget
,
setType
,
target
,
type
}
)
=>
(
return
(
<>
<>
<
TextControl
<
TextControl
label
=
{
__
(
'
Destination Address:
'
,
'
external-permalinks-redux
'
)
}
label
=
{
__
(
help
=
{
__
(
'
Destination Address:
'
,
'
To restore the original permalink, remove the link entered above.
'
,
'
external-permalinks-redux
'
'
external-permalinks-redux
'
)
}
)
}
help
=
{
__
(
onChange
=
{
setTarget
}
'
To restore the original permalink, remove the link entered above.
'
,
type
=
"
url
"
'
external-permalinks-redux
'
value
=
{
target
}
)
}
/
>
onChange
=
{
setTarget
}
type
=
"
url
"
value
=
{
target
}
/
>
<
SelectControl
<
SelectControl
label
=
{
__
(
'
Redirect Type:
'
,
'
external-permalinks-redux
'
)
}
label
=
{
__
(
'
Redirect Type:
'
,
'
external-permalinks-redux
'
)
}
onChange
=
{
setType
}
onChange
=
{
setType
}
options
=
{
statusCodes
}
options
=
{
statusCodes
}
value
=
{
type
}
value
=
{
type
}
/
>
/
>
<
/
>
<
/
>
);
);
};
/**
/**
* HOC to provide meta values and methods for updating meta.
* HOC to provide meta values and methods for updating meta.
...
...
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