| Conditions | 4 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function hook_render_enclosure($entry, $hide_images) { |
||
|
|
|||
| 26 | |||
| 27 | $matches = array(); |
||
| 28 | |||
| 29 | if (preg_match("/\/\/www\.youtube\.com\/v\/([\w-]+)/", $entry["url"], $matches) || |
||
| 30 | preg_match("/\/\/www\.youtube\.com\/watch?v=([\w-]+)/", $entry["url"], $matches) || |
||
| 31 | preg_match("/\/\/youtu.be\/([\w-]+)/", $entry["url"], $matches)) { |
||
| 32 | |||
| 33 | $vid_id = $matches[1]; |
||
| 34 | |||
| 35 | return "<iframe class=\"youtube-player\" |
||
| 36 | type=\"text/html\" width=\"640\" height=\"385\" |
||
| 37 | src=\"https://www.youtube.com/embed/$vid_id\" |
||
| 38 | allowfullscreen frameborder=\"0\"></iframe>"; |
||
| 48 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.