Code Duplication    Length = 11-11 lines in 2 locations

classes/fields/pick.php 1 location

@@ 2019-2029 (lines=11) @@
2016
     *
2017
     * @since 2.3
2018
     */
2019
    public function data_image_sizes ( $name = null, $value = null, $options = null, $pod = null, $id = null ) {
2020
        $data = array();
2021
2022
        $image_sizes = get_intermediate_image_sizes();
2023
2024
        foreach ( $image_sizes as $image_size ) {
2025
            $data[ $image_size ] = ucwords( str_replace( '-', ' ', $image_size ) );
2026
        }
2027
2028
        return apply_filters( 'pods_form_ui_field_pick_' . __FUNCTION__, $data, $name, $value, $options, $pod, $id );
2029
    }
2030
2031
    /**
2032
     * Data callback for Countries

classes/fields/file.php 1 location

@@ 549-559 (lines=11) @@
546
	 *
547
	 * @since 2.3
548
	 */
549
	public function data_image_sizes ( $name = null, $value = null, $options = null, $pod = null, $id = null ) {
550
		$data = array();
551
552
		$image_sizes = get_intermediate_image_sizes();
553
554
		foreach ( $image_sizes as $image_size ) {
555
			$data[ $image_size ] = ucwords( str_replace( '-', ' ', $image_size ) );
556
		}
557
558
		return apply_filters( 'pods_form_ui_field_pick_' . __FUNCTION__, $data, $name, $value, $options, $pod, $id );
559
	}
560
561
	/**
562
	 * Create a WP Gallery from the passed values (need to be attachments)