Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
noblogs-wp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
39
Issues
39
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ai
noblogs-wp
Commits
be829e7c
Commit
be829e7c
authored
Sep 07, 2014
by
lucha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ai-embed: removed youtube handlers since it's in the wordpress core since 4.0
parent
6311b110
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
wp-content/plugins/ai-embed/embed-function.php
wp-content/plugins/ai-embed/embed-function.php
+7
-3
No files found.
wp-content/plugins/ai-embed/embed-function.php
View file @
be829e7c
...
...
@@ -7,7 +7,11 @@
* Author: lechuck, lucha
* Author URI: http://noblogs.org
**/
function
wp_embed_handler_youtube
(
$matches
,
$attr
,
$url
,
$rawattr
)
{
/* Starting from wordpress 4.0, there is a function in the core called wp_embed_handler_youtube
* that takes care of forcing https. http://wpseek.com/wp_embed_handler_youtube/
*/
/*function wp_embed_handler_youtube( $matches, $attr, $url, $rawattr ) {
$width = ($rawattr['width']) ? $rawattr['width'] : 340 ;
$height = ($rawattr['height']) ? $rawattr['height'] : 560 ;
if (is_ssl()) {
...
...
@@ -19,7 +23,7 @@ $embed = sprintf(
'<object height="%2$s" width="%3$s"><param name="movie" value="%1$s?fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="%1$s?fs=1" type="application/x-shockwave-flash" width="%2$s" height="%3$s" allowscriptaccess="always" allowfullscreen="true"></embed></object>',esc_attr($ret_url),esc_attr($height),esc_attro($width));
return apply_filters( 'embed_youtube', $embed, $matches, $attr, $url, $rawattr );
}
}
*/
function
wp_embed_handler_google_maps
(
$matches
,
$attr
,
$url
,
$rawattr
)
{
$width
=
(
$rawattr
[
'width'
])
?
$rawattr
[
'width'
]
:
425
;
...
...
@@ -199,7 +203,7 @@ function register_embed_handlers() {
wp_embed_register_handler
(
'ogm'
,
'#http://.*?/.*?ogm#i'
,
'wp_embed_handler_ogm'
);
wp_embed_register_handler
(
'archive'
,
'#http://(.+\.)?archive.org/.*/.*\.(mp4|wmv|mov|mp3|ogv)#i'
,
'wp_embed_handler_archive'
);
wp_embed_register_handler
(
'umapper'
,
'#http://umapper.s3.amazonaws.com/.*?\.kml#i'
,
'wp_embed_handler_umapper'
);
wp_embed_register_handler
(
'youtube'
,
'#http://(www\.)?youtube\.com/v/.*?#i'
,
'wp_embed_handler_youtube'
);
//
wp_embed_register_handler( 'youtube', '#http://(www\.)?youtube\.com/v/.*?#i', 'wp_embed_handler_youtube' );
wp_embed_register_handler
(
'jamendo'
,
'#http://www\.jamendo\.com/.*/(album|track)/(.*)#i'
,
'wp_embed_handler_jamendo'
);
wp_embed_register_handler
(
'dctptv'
,
'#http://www.dctp.tv/embed/.*?/#i'
,
'wp_embed_handler_dctptv'
);
wp_embed_register_handler
(
'googlemaps'
,
'#http(s)?://maps\.google\.[^\.]+/(.*)#i'
,
'wp_embed_handler_google_maps'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment