html heper - script tag - improve inclusion of source code detection
... | ... | @@ -353,18 +353,20 @@ if (! function_exists('script_tag')) { |
353 | 353 | $src = array('src' => $src);
|
354 | 354 | }
|
355 | 355 | }
|
356 | - foreach ($src as $k => $v) {
|
|
357 | - if ($k === 'src' AND $indexPage === true) {
|
|
358 | - $src[$k] = site_url($v);
|
|
359 | - }
|
|
360 | - if ( ! array_key_exists('type', $src) ) {
|
|
361 | - $src['type'] = 'text/javascript';
|
|
362 | - }
|
|
363 | - if ( $k === 'content' ) {
|
|
364 | - $contenido = $v;
|
|
365 | - continue;
|
|
356 | + if( $open_only !== TRUE ) {
|
|
357 | + foreach ($src as $k => $v) {
|
|
358 | + if ($k === 'src' AND $indexPage === true) {
|
|
359 | + $src[$k] = site_url($v);
|
|
360 | + }
|
|
361 | + if ( ! array_key_exists('type', $src) ) {
|
|
362 | + $src['type'] = 'text/javascript';
|
|
363 | + }
|
|
364 | + if ( $k === 'content' ) {
|
|
365 | + $contenido = $v;
|
|
366 | + continue;
|
|
367 | + }
|
|
368 | + $script .= $k . (null === $v ? ' ' : '="' . $v . '" ');
|
|
366 | 369 | }
|
367 | - $script .= $k . (null === $v ? ' ' : '="' . $v . '" ');
|
|
368 | 370 | }
|
369 | 371 | |
370 | 372 | $script .= '>';
|
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help