deprecated/classes/Pods.php
public function get_dropdown_values( $params ) {

		if ( Pod::$deprecated_notice ) {
			pods_deprecated( 'Pods::get_dropdown_values', '2.0' );
		}

		global $wpdb;

		$params = (object) $params;

		$params->orderby = empty( $params->orderby ) ? '' : ' ORDER BY ' . $params->orderby;
		$params->join    = empty( $params->join ) ? '' : ' LEFT JOIN ' . $params->join;

		$where = ( false !== $params->exclude ) ? "WHERE `t`.term_id NOT IN ({$params->exclude})" : '';

		if ( ! empty( $params->pick_filter ) ) {
			$where .= ( empty( $where ) ? ' WHERE ' : ' AND ' ) . $params->pick_filter;
		}

		if ( ! empty( $params->where ) ) {
			$where .= ( empty( $where ) ? ' WHERE ' : ' AND ' ) . $params->where;
		}

		$sql = "
            SELECT
                `t`.`{$params->field_id}` AS `id`,
                `t`.`{$params->field_name}` AS `name`
            FROM `{$params->table}` AS `t`
            {$params->join}
            {$where}
            {$params->orderby}
        ";

		// override with custom dropdown values
		$sql = apply_filters( 'pods_get_dropdown_values', $sql, $params, $this );

		$val    = array();
		$result = pods_query( $sql );

		foreach ( $result as $row ) {
			$row           = get_object_vars( $row );
			$row['active'] = false;

			if ( ! empty( $params->selected_ids ) ) {
				$row['active'] = in_array( $row['id'], $params->selected_ids );
			}

			$val[] = $row;
		}

		return $val;
	}
public function get_dropdown_values( $params ) {

		if ( Pod::$deprecated_notice ) {
			pods_deprecated( 'Pods::get_dropdown_values', '2.0' );
		}

		global $wpdb;

		$params = (object) $params;

		$params->orderby = empty( $params->orderby ) ? '' : ' ORDER BY ' . $params->orderby;
		$params->join    = empty( $params->join ) ? '' : ' LEFT JOIN ' . $params->join;

		$where = ( false !== $params->exclude ) ? "WHERE `t`.term_id NOT IN ({$params->exclude})" : '';

		if ( ! empty( $params->pick_filter ) ) {
			$where .= ( empty( $where ) ? ' WHERE ' : ' AND ' ) . $params->pick_filter;
		}

		if ( ! empty( $params->where ) ) {
			$where .= ( empty( $where ) ? ' WHERE ' : ' AND ' ) . $params->where;
		}

		$sql = "
            SELECT
                `t`.`{$params->field_id}` AS `id`,
                `t`.`{$params->field_name}` AS `name`
            FROM `{$params->table}` AS `t`
            {$params->join}
            {$where}
            {$params->orderby}
        ";

		// override with custom dropdown values
		$sql = apply_filters( 'pods_get_dropdown_values', $sql, $params, $this );

		$val    = array();
		$result = pods_query( $sql );

		foreach ( $result as $row ) {
			$row           = get_object_vars( $row );
			$row['active'] = false;

			if ( ! empty( $params->selected_ids ) ) {
				$row['active'] = in_array( $row['id'], $params->selected_ids );
			}

			$val[] = $row;
		}

		return $val;
	}
public function get_dropdown_values ( $ params ) { if ( Pod :: $ deprecated_notice ) { pods_deprecated ( 'Pods::get_dropdown_values' , '2.0' ) ; } global $ wpdb ; $ params = ( object ) $ params ; $ params -> orderby = empty ( $ params -> orderby ) ? '' : ' ORDER BY ' . $ params -> orderby ; $ params -> join = empty ( $ params -> join ) ? '' : ' LEFT JOIN ' . $ params -> join ; $ where = ( false !== $ params -> exclude ) ? "WHERE `t`.term_id NOT IN ({$params->exclude})" : '' ; if ( ! empty ( $ params -> pick_filter ) ) { $ where .= ( empty ( $ where ) ? ' WHERE ' : ' AND ' ) . $ params -> pick_filter ; } if ( ! empty ( $ params -> where ) ) { $ where .= ( empty ( $ where ) ? ' WHERE ' : ' AND ' ) . $ params -> where ; } $ sql = "
            SELECT
                `t`.`{$params->field_id}` AS `id`,
                `t`.`{$params->field_name}` AS `name`
            FROM `{$params->table}` AS `t`
            {$params->join}
            {$where}
            {$params->orderby}
        " ; // override with custom dropdown values $ sql = apply_filters ( 'pods_get_dropdown_values' , $ sql , $ params , $ this ) ; $ val = array ( ) ; $ result = pods_query ( $ sql ) ; foreach ( $ result as $ row ) { $ row = get_object_vars ( $ row ) ; $ row [ 'active' ] = false ; if ( ! empty ( $ params -> selected_ids ) ) { $ row [ 'active' ] = in_array ( $ row [ 'id' ] , $ params -> selected_ids ) ; } $ val [ ] = $ row ; } return $ val ; }
Get pod or category drop-down values

@param array $params

@return array
Get pod or category drop - down values