classes/PodsForm.php
public static function label( $name, $label, $help = '', $options = null ) {

		if ( is_array( $label ) || is_object( $label ) ) {
			$options = $label;
			$label   = $options['label'];

			if ( empty( $label ) ) {
				$label = ucwords( str_replace( '_', ' ', $name ) );
			}

			$help = $options['help'];
		} else {
			$options = self::options( null, $options );
		}

		$label = apply_filters( 'pods_form_ui_label_text', $label, $name, $help, $options );
		$help  = apply_filters( 'pods_form_ui_label_help', $help, $name, $label, $options );

		ob_start();

		$name_clean      = self::clean( $name );
		$name_more_clean = self::clean( $name, true );

		$type                = 'label';
		$attributes          = array();
		$attributes['class'] = 'pods-form-ui-' . $type . ' pods-form-ui-' . $type . '-' . $name_more_clean;
		$attributes['for']   = ( false === strpos( $name_clean, 'pods-form-ui-' ) ? 'pods-form-ui-' : '' ) . $name_clean;
		$attributes          = self::merge_attributes( $attributes, $name, $type, $options, false );

		pods_view( PODS_DIR . 'ui/fields/_label.php', compact( array_keys( get_defined_vars() ) ) );

		$output = ob_get_clean();

		return apply_filters( "pods_form_ui_{$type}", $output, $name, $label, $help, $attributes, $options );
	}
public static function label( $name, $label, $help = '', $options = null ) {

		if ( is_array( $label ) || is_object( $label ) ) {
			$options = $label;
			$label   = $options['label'];

			if ( empty( $label ) ) {
				$label = ucwords( str_replace( '_', ' ', $name ) );
			}

			$help = $options['help'];
		} else {
			$options = self::options( null, $options );
		}

		$label = apply_filters( 'pods_form_ui_label_text', $label, $name, $help, $options );
		$help  = apply_filters( 'pods_form_ui_label_help', $help, $name, $label, $options );

		ob_start();

		$name_clean      = self::clean( $name );
		$name_more_clean = self::clean( $name, true );

		$type                = 'label';
		$attributes          = array();
		$attributes['class'] = 'pods-form-ui-' . $type . ' pods-form-ui-' . $type . '-' . $name_more_clean;
		$attributes['for']   = ( false === strpos( $name_clean, 'pods-form-ui-' ) ? 'pods-form-ui-' : '' ) . $name_clean;
		$attributes          = self::merge_attributes( $attributes, $name, $type, $options, false );

		pods_view( PODS_DIR . 'ui/fields/_label.php', compact( array_keys( get_defined_vars() ) ) );

		$output = ob_get_clean();

		return apply_filters( "pods_form_ui_{$type}", $output, $name, $label, $help, $attributes, $options );
	}
public static function label ( $ name , $ label , $ help = '' , $ options = null ) { if ( is_array ( $ label ) || is_object ( $ label ) ) { $ options = $ label ; $ label = $ options [ 'label' ] ; if ( empty ( $ label ) ) { $ label = ucwords ( str_replace ( '_' , ' ' , $ name ) ) ; } $ help = $ options [ 'help' ] ; } else { $ options = self :: options ( null , $ options ) ; } $ label = apply_filters ( 'pods_form_ui_label_text' , $ label , $ name , $ help , $ options ) ; $ help = apply_filters ( 'pods_form_ui_label_help' , $ help , $ name , $ label , $ options ) ; ob_start ( ) ; $ name_clean = self :: clean ( $ name ) ; $ name_more_clean = self :: clean ( $ name , true ) ; $ type = 'label' ; $ attributes = array ( ) ; $ attributes [ 'class' ] = 'pods-form-ui-' . $ type . ' pods-form-ui-' . $ type . '-' . $ name_more_clean ; $ attributes [ 'for' ] = ( false === strpos ( $ name_clean , 'pods-form-ui-' ) ? 'pods-form-ui-' : '' ) . $ name_clean ; $ attributes = self :: merge_attributes ( $ attributes , $ name , $ type , $ options , false ) ; pods_view ( PODS_DIR . 'ui/fields/_label.php' , compact ( array_keys ( get_defined_vars ( ) ) ) ) ; $ output = ob_get_clean ( ) ; return apply_filters ( "pods_form_ui_{$type}" , $ output , $ name , $ label , $ help , $ attributes , $ options ) ; }
Output a field's label

@param string $name    Field name
@param string $label   Label text
@param string $help    Help text
@param array  $options Field options

@return string Label HTML

@since 2.0.0
Output a field s label