public function addSizesToDropDownList($sizes)
    {
        $new = array();

        $data = $this->getData();
        foreach ($data as $slug => $props)
        {
            // If no 4th option, stop the loop.
            if ( !isset($props['media']) || false == $props['media'])
            {
                continue;
            }

            $new[$slug] = isset($props['mediaLabel']) ? $props['mediaLabel'] : Strings::labelizeSlug($slug);

            // Internationalize what has to be
            $new[$slug] = Strings::translate($new[$slug]);
        }

        return array_merge($sizes, $new);
    }
public function addSizesToDropDownList($sizes)
    {
        $new = array();

        $data = $this->getData();
        foreach ($data as $slug => $props)
        {
            // If no 4th option, stop the loop.
            if ( !isset($props['media']) || false == $props['media'])
            {
                continue;
            }

            $new[$slug] = isset($props['mediaLabel']) ? $props['mediaLabel'] : Strings::labelizeSlug($slug);

            // Internationalize what has to be
            $new[$slug] = Strings::translate($new[$slug]);
        }

        return array_merge($sizes, $new);
    }
public function addSizesToDropDownList ( $ sizes ) { $ new = array ( ) ; $ data = $ this -> getData ( ) ; foreach ( $ data as $ slug => $ props ) { // If no 4th option, stop the loop. if ( ! isset ( $ props [ 'media' ] ) || false == $ props [ 'media' ] ) { continue ; } $ new [ $ slug ] = isset ( $ props [ 'mediaLabel' ] ) ? $ props [ 'mediaLabel' ] : Strings :: labelizeSlug ( $ slug ) ; // Internationalize what has to be $ new [ $ slug ] = Strings :: translate ( $ new [ $ slug ] ) ; } return array_merge ( $ sizes , $ new ) ; }
Add image sizes to the media size dropdown list.

@param array $sizes The existing sizes.

@return array
Add image sizes to the media size dropdown list .