Plugin Directory

Changeset 2723556


Ignore:
Timestamp:
05/13/2022 07:54:47 PM (4 years ago)
Author:
communicatti
Message:

version 1.1.23

Location:
pxl-tools
Files:
3 edited
11 copied

Legend:

Unmodified
Added
Removed
  • pxl-tools/tags/1.1.23/helpers/Youtube.php

    r2723539 r2723556  
    1515    public static function get_embeded_url($url = null, $default = null)
    1616    {
     17        if (strpos($url, 'embed')) {
     18            return $url;
     19        }
     20
    1721        parse_str(parse_url($url, PHP_URL_QUERY), $params);
    1822        $video_id = $params['v'] ?? null;
    1923        if (!$video_id) {
    20             return $default;
     24            return '//www.youtube.com/embed/' . $video_id;
    2125        }
    22         return '//www.youtube.com/embed/' . $video_id;
     26
     27        return $default;
    2328    }
    2429}
  • pxl-tools/tags/1.1.23/pxl-tools.php

    r2723539 r2723556  
    1010 * License:     GPL-2.0
    1111 * License URI: https://opensource.org/licenses/GPL-2.0
    12  * Version:     1.1.22
     12 * Version:     1.1.23
    1313 *
    1414 *
  • pxl-tools/tags/1.1.23/readme.txt

    r2723539 r2723556  
    77License: https://opensource.org/licenses/GPL-2.0
    88License URI: https://opensource.org/licenses/GPL-2.0
    9 Stable tag: 1.1.22
     9Stable tag: 1.1.23
    1010A Toolbelt for Wordpress development
    1111
    1212== Description ==
    1313Helpers, Functions and Shortcuts to Wordpress development
     14
     15=1.1.22=
     16* Add Youtube helper, and get_embeded url method
    1417
    1518=1.1.21=
  • pxl-tools/trunk/helpers/Youtube.php

    r2723539 r2723556  
    1515    public static function get_embeded_url($url = null, $default = null)
    1616    {
     17        if (strpos($url, 'embed')) {
     18            return $url;
     19        }
     20
    1721        parse_str(parse_url($url, PHP_URL_QUERY), $params);
    1822        $video_id = $params['v'] ?? null;
    1923        if (!$video_id) {
    20             return $default;
     24            return '//www.youtube.com/embed/' . $video_id;
    2125        }
    22         return '//www.youtube.com/embed/' . $video_id;
     26
     27        return $default;
    2328    }
    2429}
  • pxl-tools/trunk/pxl-tools.php

    r2723539 r2723556  
    1010 * License:     GPL-2.0
    1111 * License URI: https://opensource.org/licenses/GPL-2.0
    12  * Version:     1.1.22
     12 * Version:     1.1.23
    1313 *
    1414 *
  • pxl-tools/trunk/readme.txt

    r2723539 r2723556  
    77License: https://opensource.org/licenses/GPL-2.0
    88License URI: https://opensource.org/licenses/GPL-2.0
    9 Stable tag: 1.1.22
     9Stable tag: 1.1.23
    1010A Toolbelt for Wordpress development
    1111
    1212== Description ==
    1313Helpers, Functions and Shortcuts to Wordpress development
     14
     15=1.1.22=
     16* Add Youtube helper, and get_embeded url method
    1417
    1518=1.1.21=
Note: See TracChangeset for help on using the changeset viewer.