Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ai-mu-plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
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
Noblogs
ai-mu-plugins
Commits
218bb195
Commit
218bb195
authored
3 years ago
by
lucha
Browse files
Options
Downloads
Patches
Plain Diff
embed.php: use modern PHP ?? operator
parent
ce2a6f32
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
embed.php
+6
-6
6 additions, 6 deletions
embed.php
with
6 additions
and
6 deletions
embed.php
+
6
−
6
View file @
218bb195
...
...
@@ -9,8 +9,8 @@
**/
function
wp_embed_handler_google_maps
(
$matches
,
$attr
,
$url
,
$rawattr
)
{
$width
=
(
$rawattr
[
'width'
]
)
?
$rawattr
[
'width'
]
:
425
;
$height
=
(
$rawattr
[
'height'
]
)
?
$rawattr
[
'height'
]
:
350
;
$width
=
$rawattr
[
'width'
]
?
?
425
;
$height
=
$rawattr
[
'height'
]
?
?
350
;
$query
=
add_query_arg
(
array
(
'output'
=>
'embed'
),
$matches
[
0
]);
$embed
=
'<iframe width="'
.
esc_attr
(
$width
)
.
'" height="'
.
esc_attr
(
$height
)
.
'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'
.
esc_attr
(
$query
)
.
'"></iframe>'
;
...
...
@@ -18,8 +18,8 @@ function wp_embed_handler_google_maps( $matches, $attr, $url, $rawattr ) {
}
function
wp_embed_handler_openstreetmap
(
$matches
,
$attr
,
$url
,
$rawattr
)
{
$width
=
(
$rawattr
[
'width'
]
)
?
$rawattr
[
'width'
]
:
425
;
$height
=
(
$rawattr
[
'height'
]
)
?
$rawattr
[
'height'
]
:
350
;
$width
=
$rawattr
[
'width'
]
?
?
425
;
$height
=
$rawattr
[
'height'
]
?
?
350
;
$embed
=
'<iframe width="'
.
esc_attr
(
$width
)
.
'" height="'
.
esc_attr
(
$height
)
.
'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'
.
esc_attr
(
$matches
[
0
])
.
'"></iframe>'
;
return
apply_filters
(
'embed_openstreetmap'
,
$embed
,
$matches
,
$attr
,
$url
,
$rawattr
);
...
...
@@ -59,8 +59,8 @@ function wp_embed_handler_archive( $matches, $attr, $url, $rawattr ) {
}
function
wp_embed_handler_dctptv
(
$matches
,
$attr
,
$url
,
$rawattr
)
{
$width
=
(
$attr
[
'width'
]
)
?
$attr
[
'width'
]
:
480
;
$height
=
(
$attr
[
'height'
]
)
?
$attr
[
'height'
]
:
396
;
$width
=
$attr
[
'width'
]
?
?
480
;
$height
=
$attr
[
'height'
]
?
?
396
;
$embed
=
sprintf
(
'<iframe width="%3$s" scrolling="no" height="%2$s" frameborder="0" src="%1$s" name="dctp-embed" marginwidth="0" marginheight="0"><br>
</iframe>'
,
esc_attr
(
$matches
[
0
]),
esc_attr
(
$height
),
esc_attr
(
$width
));
...
...
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